| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // Report warning message at location of current token in current script. | 374 // Report warning message at location of current token in current script. |
| 375 void ReportWarning(const char* msg, ...) const PRINTF_ATTRIBUTE(2, 3); | 375 void ReportWarning(const char* msg, ...) const PRINTF_ATTRIBUTE(2, 3); |
| 376 | 376 |
| 377 // Report warning message at given location in current script. | 377 // Report warning message at given location in current script. |
| 378 void ReportWarning(intptr_t token_pos, | 378 void ReportWarning(intptr_t token_pos, |
| 379 const char* msg, ...) const PRINTF_ATTRIBUTE(3, 4); | 379 const char* msg, ...) const PRINTF_ATTRIBUTE(3, 4); |
| 380 | 380 |
| 381 void CheckRecursiveInvocation(); | 381 void CheckRecursiveInvocation(); |
| 382 | 382 |
| 383 const Instance& EvaluateConstExpr(intptr_t expr_pos, AstNode* expr); | 383 const Instance& EvaluateConstExpr(intptr_t expr_pos, AstNode* expr); |
| 384 AstNode* RunStaticFieldInitializer(const Field& field, | 384 StaticGetterNode* RunStaticFieldInitializer(const Field& field, |
| 385 intptr_t field_ref_pos); | 385 intptr_t field_ref_pos); |
| 386 RawObject* EvaluateConstConstructorCall(const Class& type_class, | 386 RawObject* EvaluateConstConstructorCall(const Class& type_class, |
| 387 const TypeArguments& type_arguments, | 387 const TypeArguments& type_arguments, |
| 388 const Function& constructor, | 388 const Function& constructor, |
| 389 ArgumentListNode* arguments); | 389 ArgumentListNode* arguments); |
| 390 AstNode* FoldConstExpr(intptr_t expr_pos, AstNode* expr); | 390 AstNode* FoldConstExpr(intptr_t expr_pos, AstNode* expr); |
| 391 | 391 |
| 392 // Support for parsing of scripts. | 392 // Support for parsing of scripts. |
| 393 void ParseTopLevel(); | 393 void ParseTopLevel(); |
| 394 void ParseEnumDeclaration(const GrowableObjectArray& pending_classes, | 394 void ParseEnumDeclaration(const GrowableObjectArray& pending_classes, |
| 395 const Class& toplevel_class, | 395 const Class& toplevel_class, |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 bool require_const); | 704 bool require_const); |
| 705 AstNode* ParseStaticCall(const Class& cls, | 705 AstNode* ParseStaticCall(const Class& cls, |
| 706 const String& method_name, | 706 const String& method_name, |
| 707 intptr_t ident_pos); | 707 intptr_t ident_pos); |
| 708 AstNode* ParseInstanceCall(AstNode* receiver, | 708 AstNode* ParseInstanceCall(AstNode* receiver, |
| 709 const String& method_name, | 709 const String& method_name, |
| 710 intptr_t ident_pos); | 710 intptr_t ident_pos); |
| 711 AstNode* ParseClosureCall(AstNode* closure); | 711 AstNode* ParseClosureCall(AstNode* closure); |
| 712 AstNode* GenerateStaticFieldLookup(const Field& field, | 712 AstNode* GenerateStaticFieldLookup(const Field& field, |
| 713 intptr_t ident_pos); | 713 intptr_t ident_pos); |
| 714 AstNode* ParseStaticFieldAccess(const Class& cls, | 714 AstNode* GenerateStaticFieldAccess(const Class& cls, |
| 715 const String& field_name, | 715 const String& field_name, |
| 716 intptr_t ident_pos, | 716 intptr_t ident_pos); |
| 717 bool consume_cascades); | |
| 718 | 717 |
| 719 LocalVariable* LookupLocalScope(const String& ident); | 718 LocalVariable* LookupLocalScope(const String& ident); |
| 720 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); | 719 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); |
| 721 bool ParsingStaticMember() const; | 720 bool ParsingStaticMember() const; |
| 722 const AbstractType* ReceiverType(const Class& cls); | 721 const AbstractType* ReceiverType(const Class& cls); |
| 723 bool IsInstantiatorRequired() const; | 722 bool IsInstantiatorRequired() const; |
| 724 bool ResolveIdentInLocalScope(intptr_t ident_pos, | 723 bool ResolveIdentInLocalScope(intptr_t ident_pos, |
| 725 const String &ident, | 724 const String &ident, |
| 726 AstNode** node); | 725 AstNode** node); |
| 727 static const bool kResolveLocally = true; | 726 static const bool kResolveLocally = true; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 | 862 |
| 864 // Indentation of parser trace. | 863 // Indentation of parser trace. |
| 865 intptr_t trace_indent_; | 864 intptr_t trace_indent_; |
| 866 | 865 |
| 867 DISALLOW_COPY_AND_ASSIGN(Parser); | 866 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 868 }; | 867 }; |
| 869 | 868 |
| 870 } // namespace dart | 869 } // namespace dart |
| 871 | 870 |
| 872 #endif // VM_PARSER_H_ | 871 #endif // VM_PARSER_H_ |
| OLD | NEW |