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 "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 CompilerStats::num_tokens_consumed++; | 325 CompilerStats::num_tokens_consumed++; |
326 } | 326 } |
327 void ConsumeRightAngleBracket(); | 327 void ConsumeRightAngleBracket(); |
328 void CheckToken(Token::Kind token_expected, const char* msg = NULL); | 328 void CheckToken(Token::Kind token_expected, const char* msg = NULL); |
329 void ExpectToken(Token::Kind token_expected); | 329 void ExpectToken(Token::Kind token_expected); |
330 void ExpectSemicolon(); | 330 void ExpectSemicolon(); |
331 void UnexpectedToken(); | 331 void UnexpectedToken(); |
332 String* ExpectUserDefinedTypeIdentifier(const char* msg); | 332 String* ExpectUserDefinedTypeIdentifier(const char* msg); |
333 String* ExpectIdentifier(const char* msg); | 333 String* ExpectIdentifier(const char* msg); |
334 bool IsLiteral(const char* literal); | 334 bool IsLiteral(const char* literal); |
335 bool IsAwaitAsKeyword(); | 335 bool IsAwaitKeyword(); |
336 | 336 |
337 void SkipIf(Token::Kind); | 337 void SkipIf(Token::Kind); |
338 void SkipBlock(); | 338 void SkipBlock(); |
339 intptr_t SkipMetadata(); | 339 intptr_t SkipMetadata(); |
340 void SkipToMatchingParenthesis(); | 340 void SkipToMatchingParenthesis(); |
341 void SkipTypeArguments(); | 341 void SkipTypeArguments(); |
342 void SkipType(bool allow_void); | 342 void SkipType(bool allow_void); |
343 void SkipInitializers(); | 343 void SkipInitializers(); |
344 void SkipExpr(); | 344 void SkipExpr(); |
345 void SkipNestedExpr(); | 345 void SkipNestedExpr(); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 intptr_t token_pos, | 512 intptr_t token_pos, |
513 AstNode* receiver); | 513 AstNode* receiver); |
514 static void AddFormalParamsToFunction(const ParamList* params, | 514 static void AddFormalParamsToFunction(const ParamList* params, |
515 const Function& func); | 515 const Function& func); |
516 void AddFormalParamsToScope(const ParamList* params, LocalScope* scope); | 516 void AddFormalParamsToScope(const ParamList* params, LocalScope* scope); |
517 | 517 |
518 SequenceNode* ParseConstructor(const Function& func, | 518 SequenceNode* ParseConstructor(const Function& func, |
519 Array* default_parameter_values); | 519 Array* default_parameter_values); |
520 SequenceNode* ParseFunc(const Function& func, | 520 SequenceNode* ParseFunc(const Function& func, |
521 Array* default_parameter_values); | 521 Array* default_parameter_values); |
522 RawClass* GetClassForAsync(const String& class_name); | |
523 | 522 |
524 void ParseNativeFunctionBlock(const ParamList* params, const Function& func); | 523 void ParseNativeFunctionBlock(const ParamList* params, const Function& func); |
525 | 524 |
526 SequenceNode* ParseInstanceGetter(const Function& func); | 525 SequenceNode* ParseInstanceGetter(const Function& func); |
527 SequenceNode* ParseInstanceSetter(const Function& func); | 526 SequenceNode* ParseInstanceSetter(const Function& func); |
528 SequenceNode* ParseStaticFinalGetter(const Function& func); | 527 SequenceNode* ParseStaticFinalGetter(const Function& func); |
529 SequenceNode* ParseStaticInitializer(); | 528 SequenceNode* ParseStaticInitializer(); |
530 SequenceNode* ParseMethodExtractor(const Function& func); | 529 SequenceNode* ParseMethodExtractor(const Function& func); |
531 SequenceNode* ParseNoSuchMethodDispatcher(const Function& func, | 530 SequenceNode* ParseNoSuchMethodDispatcher(const Function& func, |
532 Array* default_values); | 531 Array* default_values); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 bool unregister_pending_function_; | 813 bool unregister_pending_function_; |
815 | 814 |
816 LocalScope* async_temp_scope_; | 815 LocalScope* async_temp_scope_; |
817 | 816 |
818 DISALLOW_COPY_AND_ASSIGN(Parser); | 817 DISALLOW_COPY_AND_ASSIGN(Parser); |
819 }; | 818 }; |
820 | 819 |
821 } // namespace dart | 820 } // namespace dart |
822 | 821 |
823 #endif // VM_PARSER_H_ | 822 #endif // VM_PARSER_H_ |
OLD | NEW |