jitcraft/Parser.cpp
changeset 28 a9665857cfd5
parent 25 23e8b3d8e4e6
child 38 88049d677e3f
     1.1 --- a/jitcraft/Parser.cpp	Mon Jul 02 14:04:29 2012 -0700
     1.2 +++ b/jitcraft/Parser.cpp	Mon Jul 02 23:37:12 2012 -0700
     1.3 @@ -250,6 +250,8 @@
     1.4  
     1.5          return new (pool_) IncDecExpression(pos, token, expr, false);
     1.6        }
     1.7 +      default:
     1.8 +        break;
     1.9      }
    1.10  
    1.11  
    1.12 @@ -316,7 +318,7 @@
    1.13  }
    1.14  
    1.15  Expression *
    1.16 -Parser::bitand()
    1.17 +Parser::bitand_()
    1.18  {
    1.19      Expression *left = shift();
    1.20      while (left) {
    1.21 @@ -334,7 +336,7 @@
    1.22  Expression *
    1.23  Parser::bitxor()
    1.24  {
    1.25 -    Expression *left = bitand();
    1.26 +    Expression *left = bitand_();
    1.27      while (left) {
    1.28          if (!match(TOK_BITXOR))
    1.29              break;
    1.30 @@ -348,7 +350,7 @@
    1.31  }
    1.32  
    1.33  Expression *
    1.34 -Parser::bitor()
    1.35 +Parser::bitor_()
    1.36  {
    1.37      Expression *left = bitxor();
    1.38      while (left) {
    1.39 @@ -366,7 +368,7 @@
    1.40  Expression *
    1.41  Parser::relational()
    1.42  {
    1.43 -    Expression *left = bitor();
    1.44 +    Expression *left = bitor_();
    1.45      while (left) {
    1.46          TokenKind kind = scanner_.peek();
    1.47          if (kind < TOK_LT || kind > TOK_GE)
    1.48 @@ -651,7 +653,7 @@
    1.49          }
    1.50  
    1.51          if (!expect(TOK_IF))
    1.52 -            return false;
    1.53 +            return NULL;
    1.54  
    1.55          SourcePosition pos = scanner_.begin();
    1.56          if (!expect(TOK_LPAREN))
    1.57 @@ -726,6 +728,9 @@
    1.58  
    1.59          case TOK_LBRACE:
    1.60            return block();
    1.61 +
    1.62 +	default:
    1.63 +	  break;
    1.64      }
    1.65  
    1.66      if (!statement) {