| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 // Support for parsing libraries. | 209 // Support for parsing libraries. |
| 210 Dart_Handle CallLibraryTagHandler(Dart_LibraryTag tag, | 210 Dart_Handle CallLibraryTagHandler(Dart_LibraryTag tag, |
| 211 intptr_t token_pos, | 211 intptr_t token_pos, |
| 212 const String& url); | 212 const String& url); |
| 213 void ParseLibraryDefinition(); | 213 void ParseLibraryDefinition(); |
| 214 void ParseLibraryName(); | 214 void ParseLibraryName(); |
| 215 void ParseLibraryImport(); | 215 void ParseLibraryImport(); |
| 216 void ParseLibraryInclude(); | 216 void ParseLibraryInclude(); |
| 217 | 217 |
| 218 void TryResolveTypeFromClass(intptr_t type_pos, | |
| 219 const Class& cls, | |
| 220 AbstractType* type); | |
| 221 enum TypeResolution { | 218 enum TypeResolution { |
| 222 kIgnore, // Parsed type is ignored and replaced by Dynamic. | 219 kIgnore, // Parsed type is ignored and replaced by Dynamic. |
| 223 kDoNotResolve, // Type resolution is postponed. | 220 kDoNotResolve, // Type resolution is postponed. |
| 224 kCanResolve, // Type resolution is optional. | 221 kCanResolve, // Type resolution is optional. |
| 225 kMustResolve // Type resolution is required. | 222 kMustResolve // Type resolution is required. |
| 226 }; | 223 }; |
| 224 void ResolveTypeFromClass(intptr_t type_pos, |
| 225 const Class& cls, |
| 226 TypeResolution type_resolution, |
| 227 AbstractType* type); |
| 227 RawAbstractType* ParseType(TypeResolution type_resolution); | 228 RawAbstractType* ParseType(TypeResolution type_resolution); |
| 228 void ParseTypeParameters(const Class& cls); | 229 void ParseTypeParameters(const Class& cls); |
| 229 RawAbstractTypeArguments* ParseTypeArguments(TypeResolution type_resolution); | 230 RawAbstractTypeArguments* ParseTypeArguments(TypeResolution type_resolution); |
| 230 void ParseQualIdent(QualIdent* qual_ident); | 231 void ParseQualIdent(QualIdent* qual_ident); |
| 231 void ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method); | 232 void ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method); |
| 232 void ParseFieldDefinition(ClassDesc* members, MemberDesc* field); | 233 void ParseFieldDefinition(ClassDesc* members, MemberDesc* field); |
| 233 void ParseClassMemberDefinition(ClassDesc* members); | 234 void ParseClassMemberDefinition(ClassDesc* members); |
| 234 void ParseFormalParameter(bool allow_explicit_default_value, | 235 void ParseFormalParameter(bool allow_explicit_default_value, |
| 235 ParamList* params); | 236 ParamList* params); |
| 236 void ParseFormalParameters(bool allow_explicit_default_values, | 237 void ParseFormalParameters(bool allow_explicit_default_values, |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 // code at all points in the try block where an exit from the block is | 455 // code at all points in the try block where an exit from the block is |
| 455 // done using 'return', 'break' or 'continue' statements. | 456 // done using 'return', 'break' or 'continue' statements. |
| 456 TryBlocks* try_blocks_list_; | 457 TryBlocks* try_blocks_list_; |
| 457 | 458 |
| 458 DISALLOW_COPY_AND_ASSIGN(Parser); | 459 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 459 }; | 460 }; |
| 460 | 461 |
| 461 } // namespace dart | 462 } // namespace dart |
| 462 | 463 |
| 463 #endif // VM_PARSER_H_ | 464 #endif // VM_PARSER_H_ |
| OLD | NEW |