| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
| 6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 } | 739 } |
| 740 Scope* DeclarationScope(VariableMode mode) { | 740 Scope* DeclarationScope(VariableMode mode) { |
| 741 return IsLexicalVariableMode(mode) | 741 return IsLexicalVariableMode(mode) |
| 742 ? scope_ : scope_->DeclarationScope(); | 742 ? scope_ : scope_->DeclarationScope(); |
| 743 } | 743 } |
| 744 | 744 |
| 745 // All ParseXXX functions take as the last argument an *ok parameter | 745 // All ParseXXX functions take as the last argument an *ok parameter |
| 746 // which is set to false if parsing failed; it is unchanged otherwise. | 746 // which is set to false if parsing failed; it is unchanged otherwise. |
| 747 // By making the 'exception handling' explicit, we are forced to check | 747 // By making the 'exception handling' explicit, we are forced to check |
| 748 // for failure at the call sites. | 748 // for failure at the call sites. |
| 749 void* ParseStatementList(ZoneList<Statement*>* processor, int end_token, | 749 void* ParseStatementList(ZoneList<Statement*>* body, int end_token, |
| 750 bool is_eval, Scope** ad_hoc_eval_scope, bool* ok); | 750 bool is_eval, Scope** ad_hoc_eval_scope, bool* ok); |
| 751 Statement* ParseStatementListItem(bool* ok); | 751 Statement* ParseStatementListItem(bool* ok); |
| 752 Module* ParseModule(bool* ok); | 752 Statement* ParseModule(bool* ok); |
| 753 Statement* ParseModuleItem(bool* ok); | 753 Statement* ParseModuleItem(bool* ok); |
| 754 Module* ParseModuleSpecifier(bool* ok); | 754 Literal* ParseModuleSpecifier(bool* ok); |
| 755 Statement* ParseImportDeclaration(bool* ok); | 755 Statement* ParseImportDeclaration(bool* ok); |
| 756 Statement* ParseExportDeclaration(bool* ok); | 756 Statement* ParseExportDeclaration(bool* ok); |
| 757 Statement* ParseExportDefault(bool* ok); | 757 Statement* ParseExportDefault(bool* ok); |
| 758 void* ParseExportClause(ZoneList<const AstRawString*>* names, | 758 void* ParseExportClause(ZoneList<const AstRawString*>* names, |
| 759 Scanner::Location* reserved_loc, bool* ok); | 759 Scanner::Location* reserved_loc, bool* ok); |
| 760 void* ParseNamedImports(ZoneList<const AstRawString*>* names, bool* ok); | 760 void* ParseNamedImports(ZoneList<const AstRawString*>* names, bool* ok); |
| 761 Statement* ParseStatement(ZoneList<const AstRawString*>* labels, bool* ok); | 761 Statement* ParseStatement(ZoneList<const AstRawString*>* labels, bool* ok); |
| 762 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, | 762 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, |
| 763 bool* ok); | 763 bool* ok); |
| 764 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, | 764 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 } | 997 } |
| 998 | 998 |
| 999 | 999 |
| 1000 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, | 1000 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, |
| 1001 int start, Expression* tag) { | 1001 int start, Expression* tag) { |
| 1002 return parser_->CloseTemplateLiteral(state, start, tag); | 1002 return parser_->CloseTemplateLiteral(state, start, tag); |
| 1003 } | 1003 } |
| 1004 } } // namespace v8::internal | 1004 } } // namespace v8::internal |
| 1005 | 1005 |
| 1006 #endif // V8_PARSER_H_ | 1006 #endif // V8_PARSER_H_ |
| OLD | NEW |