Chromium Code Reviews| 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_PARSING_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
| 6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 745 Statement* ParseModuleItem(bool* ok); | 745 Statement* ParseModuleItem(bool* ok); |
| 746 const AstRawString* ParseModuleSpecifier(bool* ok); | 746 const AstRawString* ParseModuleSpecifier(bool* ok); |
| 747 Statement* ParseImportDeclaration(bool* ok); | 747 Statement* ParseImportDeclaration(bool* ok); |
| 748 Statement* ParseExportDeclaration(bool* ok); | 748 Statement* ParseExportDeclaration(bool* ok); |
| 749 Statement* ParseExportDefault(bool* ok); | 749 Statement* ParseExportDefault(bool* ok); |
| 750 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, | 750 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, |
| 751 ZoneList<Scanner::Location>* export_locations, | 751 ZoneList<Scanner::Location>* export_locations, |
| 752 ZoneList<const AstRawString*>* local_names, | 752 ZoneList<const AstRawString*>* local_names, |
| 753 Scanner::Location* reserved_loc, bool* ok); | 753 Scanner::Location* reserved_loc, bool* ok); |
| 754 ZoneList<ImportDeclaration*>* ParseNamedImports(int pos, bool* ok); | 754 ZoneList<ImportDeclaration*>* ParseNamedImports(int pos, bool* ok); |
| 755 Statement* ParseStatement(ZoneList<const AstRawString*>* labels, bool* ok); | 755 Statement* ParseStatement(ZoneList<const AstRawString*>* labels, |
| 756 Statement* ParseSubStatement(ZoneList<const AstRawString*>* labels, bool* ok); | 756 AllowLabelledFunctionStatement, bool* ok); |
|
adamk
2016/03/24 01:15:52
Sadly I think v8 style here is to name the argumen
| |
| 757 Statement* ParseSubStatement(ZoneList<const AstRawString*>* labels, | |
| 758 AllowLabelledFunctionStatement, bool* ok); | |
| 757 Statement* ParseStatementAsUnlabelled(ZoneList<const AstRawString*>* labels, | 759 Statement* ParseStatementAsUnlabelled(ZoneList<const AstRawString*>* labels, |
| 758 bool* ok); | 760 bool* ok); |
| 759 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, | 761 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, |
| 760 bool* ok); | 762 bool* ok); |
| 761 Statement* ParseFunctionDeclaration(int pos, bool is_generator, | 763 Statement* ParseFunctionDeclaration(int pos, bool is_generator, |
| 762 ZoneList<const AstRawString*>* names, | 764 ZoneList<const AstRawString*>* names, |
| 763 bool* ok); | 765 bool* ok); |
| 764 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, | 766 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, |
| 765 bool* ok); | 767 bool* ok); |
| 766 Statement* ParseNativeDeclaration(bool* ok); | 768 Statement* ParseNativeDeclaration(bool* ok); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 888 Expression* current_value_; | 890 Expression* current_value_; |
| 889 int recursion_level_; | 891 int recursion_level_; |
| 890 bool* ok_; | 892 bool* ok_; |
| 891 }; | 893 }; |
| 892 | 894 |
| 893 Block* ParseVariableDeclarations(VariableDeclarationContext var_context, | 895 Block* ParseVariableDeclarations(VariableDeclarationContext var_context, |
| 894 DeclarationParsingResult* parsing_result, | 896 DeclarationParsingResult* parsing_result, |
| 895 ZoneList<const AstRawString*>* names, | 897 ZoneList<const AstRawString*>* names, |
| 896 bool* ok); | 898 bool* ok); |
| 897 Statement* ParseExpressionOrLabelledStatement( | 899 Statement* ParseExpressionOrLabelledStatement( |
| 898 ZoneList<const AstRawString*>* labels, bool* ok); | 900 ZoneList<const AstRawString*>* labels, AllowLabelledFunctionStatement, |
| 901 bool* ok); | |
| 899 IfStatement* ParseIfStatement(ZoneList<const AstRawString*>* labels, | 902 IfStatement* ParseIfStatement(ZoneList<const AstRawString*>* labels, |
| 900 bool* ok); | 903 bool* ok); |
| 901 Statement* ParseContinueStatement(bool* ok); | 904 Statement* ParseContinueStatement(bool* ok); |
| 902 Statement* ParseBreakStatement(ZoneList<const AstRawString*>* labels, | 905 Statement* ParseBreakStatement(ZoneList<const AstRawString*>* labels, |
| 903 bool* ok); | 906 bool* ok); |
| 904 Statement* ParseReturnStatement(bool* ok); | 907 Statement* ParseReturnStatement(bool* ok); |
| 905 Statement* ParseWithStatement(ZoneList<const AstRawString*>* labels, | 908 Statement* ParseWithStatement(ZoneList<const AstRawString*>* labels, |
| 906 bool* ok); | 909 bool* ok); |
| 907 CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok); | 910 CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok); |
| 908 Statement* ParseSwitchStatement(ZoneList<const AstRawString*>* labels, | 911 Statement* ParseSwitchStatement(ZoneList<const AstRawString*>* labels, |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1237 | 1240 |
| 1238 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1241 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1239 return parser_->ParseDoExpression(ok); | 1242 return parser_->ParseDoExpression(ok); |
| 1240 } | 1243 } |
| 1241 | 1244 |
| 1242 | 1245 |
| 1243 } // namespace internal | 1246 } // namespace internal |
| 1244 } // namespace v8 | 1247 } // namespace v8 |
| 1245 | 1248 |
| 1246 #endif // V8_PARSING_PARSER_H_ | 1249 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |