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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 | 867 |
868 static SequenceNode* NodeAsSequenceNode(TokenPosition sequence_pos, | 868 static SequenceNode* NodeAsSequenceNode(TokenPosition sequence_pos, |
869 AstNode* node, | 869 AstNode* node, |
870 LocalScope* scope); | 870 LocalScope* scope); |
871 | 871 |
872 SequenceNode* MakeImplicitConstructor(const Function& func); | 872 SequenceNode* MakeImplicitConstructor(const Function& func); |
873 AstNode* MakeStaticCall(const String& cls_name, | 873 AstNode* MakeStaticCall(const String& cls_name, |
874 const String& func_name, | 874 const String& func_name, |
875 ArgumentListNode* arguments); | 875 ArgumentListNode* arguments); |
876 String& Interpolate(const GrowableArray<AstNode*>& values); | 876 String& Interpolate(const GrowableArray<AstNode*>& values); |
877 AstNode* MakeAssertCall(TokenPosition begin, TokenPosition end); | |
878 AstNode* ThrowTypeError(TokenPosition type_pos, | 877 AstNode* ThrowTypeError(TokenPosition type_pos, |
879 const AbstractType& type, | 878 const AbstractType& type, |
880 LibraryPrefix* prefix = NULL); | 879 LibraryPrefix* prefix = NULL); |
881 AstNode* ThrowNoSuchMethodError(TokenPosition call_pos, | 880 AstNode* ThrowNoSuchMethodError(TokenPosition call_pos, |
882 const Class& cls, | 881 const Class& cls, |
883 const String& function_name, | 882 const String& function_name, |
884 ArgumentListNode* function_arguments, | 883 ArgumentListNode* function_arguments, |
885 InvocationMirror::Call call, | 884 InvocationMirror::Call call, |
886 InvocationMirror::Type type, | 885 InvocationMirror::Type type, |
887 const Function* func, | 886 const Function* func, |
888 const LibraryPrefix* prefix = NULL); | 887 const LibraryPrefix* prefix = NULL); |
889 | 888 |
890 void SetupSavedTryContext(LocalVariable* saved_try_context); | 889 void SetupSavedTryContext(LocalVariable* saved_try_context); |
891 | 890 |
892 void CheckOperatorArity(const MemberDesc& member); | 891 void CheckOperatorArity(const MemberDesc& member); |
893 | 892 |
894 void EnsureExpressionTemp(); | 893 void EnsureExpressionTemp(); |
895 bool IsLegalAssignableSyntax(AstNode* expr, TokenPosition end_pos); | 894 bool IsLegalAssignableSyntax(AstNode* expr, TokenPosition end_pos); |
896 AstNode* CreateAssignmentNode(AstNode* original, | 895 AstNode* CreateAssignmentNode(AstNode* original, |
897 AstNode* rhs, | 896 AstNode* rhs, |
898 const String* left_ident, | 897 const String* left_ident, |
899 TokenPosition left_pos, | 898 TokenPosition left_pos, |
900 bool is_compound = false); | 899 bool is_compound = false); |
901 AstNode* HandleAssertCondition(AstNode* condition); | |
902 | 900 |
903 ConstructorCallNode* CreateConstructorCallNode( | 901 ConstructorCallNode* CreateConstructorCallNode( |
904 TokenPosition token_pos, | 902 TokenPosition token_pos, |
905 const TypeArguments& type_arguments, | 903 const TypeArguments& type_arguments, |
906 const Function& constructor, | 904 const Function& constructor, |
907 ArgumentListNode* arguments); | 905 ArgumentListNode* arguments); |
908 | 906 |
909 void AddEqualityNullCheck(); | 907 void AddEqualityNullCheck(); |
910 | 908 |
911 AstNode* BuildClosureCall(TokenPosition token_pos, | 909 AstNode* BuildClosureCall(TokenPosition token_pos, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 | 984 |
987 intptr_t recursion_counter_; | 985 intptr_t recursion_counter_; |
988 friend class RecursionChecker; | 986 friend class RecursionChecker; |
989 | 987 |
990 DISALLOW_COPY_AND_ASSIGN(Parser); | 988 DISALLOW_COPY_AND_ASSIGN(Parser); |
991 }; | 989 }; |
992 | 990 |
993 } // namespace dart | 991 } // namespace dart |
994 | 992 |
995 #endif // VM_PARSER_H_ | 993 #endif // VM_PARSER_H_ |
OLD | NEW |