| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 // Support for parsing libraries. | 193 // Support for parsing libraries. |
| 194 Dart_Handle CallLibraryTagHandler(Dart_LibraryTag tag, | 194 Dart_Handle CallLibraryTagHandler(Dart_LibraryTag tag, |
| 195 intptr_t token_pos, | 195 intptr_t token_pos, |
| 196 const String& url); | 196 const String& url); |
| 197 void ParseLibraryDefinition(); | 197 void ParseLibraryDefinition(); |
| 198 void ParseLibraryName(); | 198 void ParseLibraryName(); |
| 199 void ParseLibraryImport(); | 199 void ParseLibraryImport(); |
| 200 void ParseLibraryInclude(); | 200 void ParseLibraryInclude(); |
| 201 | 201 |
| 202 bool ResolveTypeFromClass(intptr_t type_pos, const Class& cls, Type* type); | 202 void TryResolveTypeFromClass(intptr_t type_pos, const Class& cls, Type* type); |
| 203 enum TypeResolution { | 203 enum TypeResolution { |
| 204 kDoNotResolve, // Type resolution is postponed. | 204 kDoNotResolve, // Type resolution is postponed. |
| 205 kCanResolve, // Type resolution is optional. | 205 kCanResolve, // Type resolution is optional. |
| 206 kMustResolve // Type resolution is required. | 206 kMustResolve // Type resolution is required. |
| 207 }; | 207 }; |
| 208 RawType* ParseType(TypeResolution type_resolution); | 208 RawType* ParseType(TypeResolution type_resolution); |
| 209 void ParseTypeParameters(const Class& cls); | 209 void ParseTypeParameters(const Class& cls); |
| 210 RawTypeArguments* ParseTypeArguments(TypeResolution type_resolution); | 210 RawTypeArguments* ParseTypeArguments(TypeResolution type_resolution); |
| 211 RawType* ParseInterface(); | 211 RawType* ParseInterface(); |
| 212 void ParseQualIdent(QualIdent* qual_ident); | 212 void ParseQualIdent(QualIdent* qual_ident); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 intptr_t ident_pos); | 361 intptr_t ident_pos); |
| 362 AstNode* ParseStaticFieldAccess(const Class& cls, | 362 AstNode* ParseStaticFieldAccess(const Class& cls, |
| 363 const String& field_name, | 363 const String& field_name, |
| 364 intptr_t ident_pos); | 364 intptr_t ident_pos); |
| 365 | 365 |
| 366 RawClass* LookupClass(const String& class_name); | 366 RawClass* LookupClass(const String& class_name); |
| 367 RawObject* LookupTypeClass(const QualIdent& type_name, | 367 RawObject* LookupTypeClass(const QualIdent& type_name, |
| 368 TypeResolution type_resolution); | 368 TypeResolution type_resolution); |
| 369 LocalVariable* LookupLocalScope(const String& ident); | 369 LocalVariable* LookupLocalScope(const String& ident); |
| 370 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); | 370 void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name); |
| 371 void CheckTypeParameterReference(intptr_t type_parameter_pos, | 371 RawClass* TypeParametersScopeClass(); |
| 372 const String& type_parameter_name); | |
| 373 bool ResolveIdentInLocalScope(intptr_t ident_pos, | 372 bool ResolveIdentInLocalScope(intptr_t ident_pos, |
| 374 const String &ident, | 373 const String &ident, |
| 375 AstNode** node); | 374 AstNode** node); |
| 376 static const bool kResolveLocally = true; | 375 static const bool kResolveLocally = true; |
| 377 static const bool kResolveIncludingImports = false; | 376 static const bool kResolveIncludingImports = false; |
| 378 AstNode* ResolveIdentInLibraryScope(const Library& lib, | 377 AstNode* ResolveIdentInLibraryScope(const Library& lib, |
| 379 const QualIdent& qual_ident, | 378 const QualIdent& qual_ident, |
| 380 bool resolve_locally); | 379 bool resolve_locally); |
| 381 AstNode* ResolveVarOrField(intptr_t ident_pos, const String &ident); | 380 AstNode* ResolveVarOrField(intptr_t ident_pos, const String &ident); |
| 382 AstNode* OptimizeBinaryOpNode(intptr_t op_pos, | 381 AstNode* OptimizeBinaryOpNode(intptr_t op_pos, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 TryBlocks* try_blocks_list_; | 442 TryBlocks* try_blocks_list_; |
| 444 | 443 |
| 445 char error_msg_[kErrorBuflen]; | 444 char error_msg_[kErrorBuflen]; |
| 446 | 445 |
| 447 DISALLOW_COPY_AND_ASSIGN(Parser); | 446 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 448 }; | 447 }; |
| 449 | 448 |
| 450 } // namespace dart | 449 } // namespace dart |
| 451 | 450 |
| 452 #endif // VM_PARSER_H_ | 451 #endif // VM_PARSER_H_ |
| OLD | NEW |