| 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 #ifndef VM_PARSER_H_ | 5 #ifndef VM_PARSER_H_ |
| 6 #define VM_PARSER_H_ | 6 #define VM_PARSER_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "vm/ast.h" | 10 #include "vm/ast.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 void ConsumeToken() { | 212 void ConsumeToken() { |
| 213 // Reset cache and advance the token. | 213 // Reset cache and advance the token. |
| 214 token_kind_ = Token::kILLEGAL; | 214 token_kind_ = Token::kILLEGAL; |
| 215 tokens_iterator_.Advance(); | 215 tokens_iterator_.Advance(); |
| 216 CompilerStats::num_tokens_consumed++; | 216 CompilerStats::num_tokens_consumed++; |
| 217 } | 217 } |
| 218 void ConsumeRightAngleBracket(); | 218 void ConsumeRightAngleBracket(); |
| 219 void ExpectToken(Token::Kind token_expected); | 219 void ExpectToken(Token::Kind token_expected); |
| 220 void ExpectSemicolon(); | 220 void ExpectSemicolon(); |
| 221 void UnexpectedToken(); | 221 void UnexpectedToken(); |
| 222 String* ExpectClassIdentifier(const char* msg); | 222 String* ExpectUserDefinedTypeIdentifier(const char* msg); |
| 223 String* ExpectIdentifier(const char* msg); | 223 String* ExpectIdentifier(const char* msg); |
| 224 bool IsLiteral(const char* literal); | 224 bool IsLiteral(const char* literal); |
| 225 | 225 |
| 226 void SkipIf(Token::Kind); | 226 void SkipIf(Token::Kind); |
| 227 void SkipBlock(); | 227 void SkipBlock(); |
| 228 void SkipMetadata(); | 228 void SkipMetadata(); |
| 229 void SkipToMatchingParenthesis(); | 229 void SkipToMatchingParenthesis(); |
| 230 void SkipTypeArguments(); | 230 void SkipTypeArguments(); |
| 231 void SkipType(bool allow_void); | 231 void SkipType(bool allow_void); |
| 232 void SkipInitializers(); | 232 void SkipInitializers(); |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 | 619 |
| 620 // Allocate temporary only once per function. | 620 // Allocate temporary only once per function. |
| 621 LocalVariable* expression_temp_; | 621 LocalVariable* expression_temp_; |
| 622 | 622 |
| 623 DISALLOW_COPY_AND_ASSIGN(Parser); | 623 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 624 }; | 624 }; |
| 625 | 625 |
| 626 } // namespace dart | 626 } // namespace dart |
| 627 | 627 |
| 628 #endif // VM_PARSER_H_ | 628 #endif // VM_PARSER_H_ |
| OLD | NEW |