| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 const Class& cls, | 206 const Class& cls, |
| 207 AbstractType* type); | 207 AbstractType* type); |
| 208 enum TypeResolution { | 208 enum TypeResolution { |
| 209 kDoNotResolve, // Type resolution is postponed. | 209 kDoNotResolve, // Type resolution is postponed. |
| 210 kCanResolve, // Type resolution is optional. | 210 kCanResolve, // Type resolution is optional. |
| 211 kMustResolve // Type resolution is required. | 211 kMustResolve // Type resolution is required. |
| 212 }; | 212 }; |
| 213 RawAbstractType* ParseType(TypeResolution type_resolution); | 213 RawAbstractType* ParseType(TypeResolution type_resolution); |
| 214 void ParseTypeParameters(const Class& cls); | 214 void ParseTypeParameters(const Class& cls); |
| 215 RawTypeArguments* ParseTypeArguments(TypeResolution type_resolution); | 215 RawTypeArguments* ParseTypeArguments(TypeResolution type_resolution); |
| 216 RawAbstractType* ParseInterface(); | |
| 217 void ParseQualIdent(QualIdent* qual_ident); | 216 void ParseQualIdent(QualIdent* qual_ident); |
| 218 void ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method); | 217 void ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method); |
| 219 void ParseFieldDefinition(ClassDesc* members, MemberDesc* field); | 218 void ParseFieldDefinition(ClassDesc* members, MemberDesc* field); |
| 220 void ParseClassMemberDefinition(ClassDesc* members); | 219 void ParseClassMemberDefinition(ClassDesc* members); |
| 221 void ParseFormalParameter(bool allow_explicit_default_value, | 220 void ParseFormalParameter(bool allow_explicit_default_value, |
| 222 ParamList* params); | 221 ParamList* params); |
| 223 void ParseFormalParameters(bool allow_explicit_default_values, | 222 void ParseFormalParameters(bool allow_explicit_default_values, |
| 224 ParamList* params); | 223 ParamList* params); |
| 225 void ParseFormalParameterList(bool allow_explicit_default_values, | 224 void ParseFormalParameterList(bool allow_explicit_default_values, |
| 226 ParamList* params); | 225 ParamList* params); |
| 227 void ParseNamedFormalParameters(bool are_implicitly_const, ParamList* params); | 226 void ParseNamedFormalParameters(bool are_implicitly_const, ParamList* params); |
| 228 void CheckConstFieldsInitialized(const Class& cls); | 227 void CheckConstFieldsInitialized(const Class& cls); |
| 229 void CheckConstructors(ClassDesc* members); | 228 void CheckConstructors(ClassDesc* members); |
| 230 void ParseInitializedInstanceFields(const Class& cls, | 229 void ParseInitializedInstanceFields(const Class& cls, |
| 231 GrowableArray<FieldInitExpression>* initializers); | 230 GrowableArray<FieldInitExpression>* initializers); |
| 232 void GenerateSuperConstructorCall(const Class& cls, | 231 void GenerateSuperConstructorCall(const Class& cls, |
| 233 LocalVariable* receiver); | 232 LocalVariable* receiver); |
| 234 AstNode* ParseSuperInitializer(const Class& cls, LocalVariable* receiver); | 233 AstNode* ParseSuperInitializer(const Class& cls, LocalVariable* receiver); |
| 235 AstNode* ParseInitializer(const Class& cls, LocalVariable* receiver); | 234 AstNode* ParseInitializer(const Class& cls, LocalVariable* receiver); |
| 236 void ParseConstructorRedirection(const Class& cls, LocalVariable* receiver); | 235 void ParseConstructorRedirection(const Class& cls, LocalVariable* receiver); |
| 237 void ParseInitializers(const Class& cls, LocalVariable* receiver); | 236 void ParseInitializers(const Class& cls, LocalVariable* receiver); |
| 238 String& ParseNativeDeclaration(); | 237 String& ParseNativeDeclaration(); |
| 238 // TODO(srdjan): Return TypeArguments instead of Array? |
| 239 RawArray* ParseInterfaceList(); | 239 RawArray* ParseInterfaceList(); |
| 240 void AddInterfaces(intptr_t interfaces_pos, | 240 void AddInterfaces(intptr_t interfaces_pos, |
| 241 const Class& cls, | 241 const Class& cls, |
| 242 const Array& interfaces); | 242 const Array& interfaces); |
| 243 RawFunction* GetSuperFunction(intptr_t token_pos, const String& name); | 243 RawFunction* GetSuperFunction(intptr_t token_pos, const String& name); |
| 244 AstNode* ParseSuperCall(const String& function_name); | 244 AstNode* ParseSuperCall(const String& function_name); |
| 245 AstNode* ParseSuperFieldAccess(const String& field_name); | 245 AstNode* ParseSuperFieldAccess(const String& field_name); |
| 246 AstNode* ParseSuperOperator(); | 246 AstNode* ParseSuperOperator(); |
| 247 | 247 |
| 248 static void SetupDefaultsForOptionalParams(const ParamList* params, | 248 static void SetupDefaultsForOptionalParams(const ParamList* params, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 // code at all points in the try block where an exit from the block is | 446 // code at all points in the try block where an exit from the block is |
| 447 // done using 'return', 'break' or 'continue' statements. | 447 // done using 'return', 'break' or 'continue' statements. |
| 448 TryBlocks* try_blocks_list_; | 448 TryBlocks* try_blocks_list_; |
| 449 | 449 |
| 450 DISALLOW_COPY_AND_ASSIGN(Parser); | 450 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 451 }; | 451 }; |
| 452 | 452 |
| 453 } // namespace dart | 453 } // namespace dart |
| 454 | 454 |
| 455 #endif // VM_PARSER_H_ | 455 #endif // VM_PARSER_H_ |
| OLD | NEW |