| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 kParameterMetadataOffset, | 278 kParameterMetadataOffset, |
| 279 kParameterEntrySize, | 279 kParameterEntrySize, |
| 280 }; | 280 }; |
| 281 static RawObject* ParseFunctionParameters(const Function& func); | 281 static RawObject* ParseFunctionParameters(const Function& func); |
| 282 | 282 |
| 283 private: | 283 private: |
| 284 friend class EffectGraphVisitor; // For BuildNoSuchMethodArguments. | 284 friend class EffectGraphVisitor; // For BuildNoSuchMethodArguments. |
| 285 | 285 |
| 286 struct Block; | 286 struct Block; |
| 287 class TryStack; | 287 class TryStack; |
| 288 class TokenPosScope; |
| 288 | 289 |
| 289 Parser(const Script& script, | 290 Parser(const Script& script, |
| 290 const Library& library, | 291 const Library& library, |
| 291 TokenPosition token_pos); | 292 TokenPosition token_pos); |
| 292 Parser(const Script& script, | 293 Parser(const Script& script, |
| 293 ParsedFunction* function, | 294 ParsedFunction* function, |
| 294 TokenPosition token_pos); | 295 TokenPosition token_pos); |
| 295 ~Parser(); | 296 ~Parser(); |
| 296 | 297 |
| 297 // The function for which we will generate code. | 298 // The function for which we will generate code. |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 SequenceNode* ParseNestedStatement(bool parsing_loop_body, | 746 SequenceNode* ParseNestedStatement(bool parsing_loop_body, |
| 746 SourceLabel* label); | 747 SourceLabel* label); |
| 747 void ParseStatementSequence(); | 748 void ParseStatementSequence(); |
| 748 bool IsIdentifier(); | 749 bool IsIdentifier(); |
| 749 bool IsSymbol(const String& symbol); | 750 bool IsSymbol(const String& symbol); |
| 750 bool IsSimpleLiteral(const AbstractType& type, Instance* value); | 751 bool IsSimpleLiteral(const AbstractType& type, Instance* value); |
| 751 bool IsFunctionTypeAliasName(); | 752 bool IsFunctionTypeAliasName(); |
| 752 bool IsMixinAppAlias(); | 753 bool IsMixinAppAlias(); |
| 753 bool TryParseQualIdent(); | 754 bool TryParseQualIdent(); |
| 754 bool TryParseTypeParameters(); | 755 bool TryParseTypeParameters(); |
| 756 bool TryParseTypeArguments(); |
| 757 bool IsTypeParameters(); |
| 758 bool IsArgumentPart(); |
| 759 bool IsParameterPart(); |
| 755 bool TryParseOptionalType(); | 760 bool TryParseOptionalType(); |
| 756 bool TryParseReturnType(); | 761 bool TryParseReturnType(); |
| 757 bool IsVariableDeclaration(); | 762 bool IsVariableDeclaration(); |
| 763 bool IsFunctionReturnType(); |
| 758 bool IsFunctionDeclaration(); | 764 bool IsFunctionDeclaration(); |
| 759 bool IsFunctionLiteral(); | 765 bool IsFunctionLiteral(); |
| 760 bool IsForInStatement(); | 766 bool IsForInStatement(); |
| 761 bool IsTopLevelAccessor(); | 767 bool IsTopLevelAccessor(); |
| 762 | 768 |
| 763 AstNode* ParseBinaryExpr(int min_preced); | 769 AstNode* ParseBinaryExpr(int min_preced); |
| 764 LiteralNode* ParseConstExpr(); | 770 LiteralNode* ParseConstExpr(); |
| 765 static const bool kRequireConst = true; | 771 static const bool kRequireConst = true; |
| 766 static const bool kAllowConst = false; | 772 static const bool kAllowConst = false; |
| 767 static const bool kConsumeCascades = true; | 773 static const bool kConsumeCascades = true; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 | 973 |
| 968 intptr_t recursion_counter_; | 974 intptr_t recursion_counter_; |
| 969 friend class RecursionChecker; | 975 friend class RecursionChecker; |
| 970 | 976 |
| 971 DISALLOW_COPY_AND_ASSIGN(Parser); | 977 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 972 }; | 978 }; |
| 973 | 979 |
| 974 } // namespace dart | 980 } // namespace dart |
| 975 | 981 |
| 976 #endif // VM_PARSER_H_ | 982 #endif // VM_PARSER_H_ |
| OLD | NEW |