| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 8814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8825 ConsumeToken(); | 8825 ConsumeToken(); |
| 8826 SkipUnaryExpr(); | 8826 SkipUnaryExpr(); |
| 8827 } else { | 8827 } else { |
| 8828 SkipPostfixExpr(); | 8828 SkipPostfixExpr(); |
| 8829 } | 8829 } |
| 8830 } | 8830 } |
| 8831 | 8831 |
| 8832 | 8832 |
| 8833 void Parser::SkipBinaryExpr() { | 8833 void Parser::SkipBinaryExpr() { |
| 8834 SkipUnaryExpr(); | 8834 SkipUnaryExpr(); |
| 8835 while (Token::Precedence(Token::kOR) <= Token::Precedence(CurrentToken()) && | 8835 const int min_prec = Token::Precedence(Token::kOR); |
| 8836 Token::Precedence(CurrentToken()) <= Token::Precedence(Token::kMUL)) { | 8836 const int max_prec = Token::Precedence(Token::kMUL); |
| 8837 while (((min_prec <= Token::Precedence(CurrentToken())) && |
| 8838 (Token::Precedence(CurrentToken()) <= max_prec)) || |
| 8839 IsLiteral("as")) { |
| 8837 ConsumeToken(); | 8840 ConsumeToken(); |
| 8838 SkipUnaryExpr(); | 8841 SkipUnaryExpr(); |
| 8839 } | 8842 } |
| 8840 } | 8843 } |
| 8841 | 8844 |
| 8842 | 8845 |
| 8843 void Parser::SkipConditionalExpr() { | 8846 void Parser::SkipConditionalExpr() { |
| 8844 SkipBinaryExpr(); | 8847 SkipBinaryExpr(); |
| 8845 if (CurrentToken() == Token::kCONDITIONAL) { | 8848 if (CurrentToken() == Token::kCONDITIONAL) { |
| 8846 ConsumeToken(); | 8849 ConsumeToken(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 8873 void Parser::SkipQualIdent() { | 8876 void Parser::SkipQualIdent() { |
| 8874 ASSERT(IsIdentifier()); | 8877 ASSERT(IsIdentifier()); |
| 8875 ConsumeToken(); | 8878 ConsumeToken(); |
| 8876 if (CurrentToken() == Token::kPERIOD) { | 8879 if (CurrentToken() == Token::kPERIOD) { |
| 8877 ConsumeToken(); // Consume the kPERIOD token. | 8880 ConsumeToken(); // Consume the kPERIOD token. |
| 8878 ExpectIdentifier("identifier expected after '.'"); | 8881 ExpectIdentifier("identifier expected after '.'"); |
| 8879 } | 8882 } |
| 8880 } | 8883 } |
| 8881 | 8884 |
| 8882 } // namespace dart | 8885 } // namespace dart |
| OLD | NEW |