| 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 "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 9873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9884 UnexpectedToken(); | 9884 UnexpectedToken(); |
| 9885 UNREACHABLE(); | 9885 UNREACHABLE(); |
| 9886 } | 9886 } |
| 9887 break; | 9887 break; |
| 9888 } | 9888 } |
| 9889 } | 9889 } |
| 9890 | 9890 |
| 9891 | 9891 |
| 9892 void Parser::SkipSelectors() { | 9892 void Parser::SkipSelectors() { |
| 9893 while (true) { | 9893 while (true) { |
| 9894 if ((CurrentToken() == Token::kPERIOD) || | 9894 if (CurrentToken() == Token::kCASCADE) { |
| 9895 (CurrentToken() == Token::kCASCADE)) { | 9895 ConsumeToken(); |
| 9896 if (CurrentToken() == Token::kLBRACK) { |
| 9897 continue; // Consume [ in next loop iteration. |
| 9898 } else { |
| 9899 ExpectIdentifier("identifier or [ expected after .."); |
| 9900 } |
| 9901 } else if (CurrentToken() == Token::kPERIOD) { |
| 9896 ConsumeToken(); | 9902 ConsumeToken(); |
| 9897 ExpectIdentifier("identifier expected"); | 9903 ExpectIdentifier("identifier expected"); |
| 9898 } else if (CurrentToken() == Token::kLBRACK) { | 9904 } else if (CurrentToken() == Token::kLBRACK) { |
| 9899 ConsumeToken(); | 9905 ConsumeToken(); |
| 9900 SkipNestedExpr(); | 9906 SkipNestedExpr(); |
| 9901 ExpectToken(Token::kRBRACK); | 9907 ExpectToken(Token::kRBRACK); |
| 9902 } else if (CurrentToken() == Token::kLPAREN) { | 9908 } else if (CurrentToken() == Token::kLPAREN) { |
| 9903 SkipActualParameters(); | 9909 SkipActualParameters(); |
| 9904 } else { | 9910 } else { |
| 9905 break; | 9911 break; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9986 void Parser::SkipQualIdent() { | 9992 void Parser::SkipQualIdent() { |
| 9987 ASSERT(IsIdentifier()); | 9993 ASSERT(IsIdentifier()); |
| 9988 ConsumeToken(); | 9994 ConsumeToken(); |
| 9989 if (CurrentToken() == Token::kPERIOD) { | 9995 if (CurrentToken() == Token::kPERIOD) { |
| 9990 ConsumeToken(); // Consume the kPERIOD token. | 9996 ConsumeToken(); // Consume the kPERIOD token. |
| 9991 ExpectIdentifier("identifier expected after '.'"); | 9997 ExpectIdentifier("identifier expected after '.'"); |
| 9992 } | 9998 } |
| 9993 } | 9999 } |
| 9994 | 10000 |
| 9995 } // namespace dart | 10001 } // namespace dart |
| OLD | NEW |