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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 Statement* ParseModuleItem(bool* ok); | 750 Statement* ParseModuleItem(bool* ok); |
751 const AstRawString* ParseModuleSpecifier(bool* ok); | 751 const AstRawString* ParseModuleSpecifier(bool* ok); |
752 Statement* ParseImportDeclaration(bool* ok); | 752 Statement* ParseImportDeclaration(bool* ok); |
753 Statement* ParseExportDeclaration(bool* ok); | 753 Statement* ParseExportDeclaration(bool* ok); |
754 Statement* ParseExportDefault(bool* ok); | 754 Statement* ParseExportDefault(bool* ok); |
755 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, | 755 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, |
756 ZoneList<Scanner::Location>* export_locations, | 756 ZoneList<Scanner::Location>* export_locations, |
757 ZoneList<const AstRawString*>* local_names, | 757 ZoneList<const AstRawString*>* local_names, |
758 Scanner::Location* reserved_loc, bool* ok); | 758 Scanner::Location* reserved_loc, bool* ok); |
759 ZoneList<ImportDeclaration*>* ParseNamedImports(int pos, bool* ok); | 759 ZoneList<ImportDeclaration*>* ParseNamedImports(int pos, bool* ok); |
760 Statement* ParseStatement(ZoneList<const AstRawString*>* labels, bool* ok); | 760 Statement* ParseStatement(ZoneList<const AstRawString*>* labels, |
761 Statement* ParseSubStatement(ZoneList<const AstRawString*>* labels, bool* ok); | 761 AllowLabelledFunctionStatement allow_function, |
| 762 bool* ok); |
| 763 Statement* ParseSubStatement(ZoneList<const AstRawString*>* labels, |
| 764 AllowLabelledFunctionStatement allow_function, |
| 765 bool* ok); |
762 Statement* ParseStatementAsUnlabelled(ZoneList<const AstRawString*>* labels, | 766 Statement* ParseStatementAsUnlabelled(ZoneList<const AstRawString*>* labels, |
763 bool* ok); | 767 bool* ok); |
764 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, | 768 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, |
765 bool* ok); | 769 bool* ok); |
766 Statement* ParseFunctionDeclaration(int pos, bool is_generator, | 770 Statement* ParseFunctionDeclaration(int pos, bool is_generator, |
767 ZoneList<const AstRawString*>* names, | 771 ZoneList<const AstRawString*>* names, |
768 bool* ok); | 772 bool* ok); |
769 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, | 773 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, |
770 bool* ok); | 774 bool* ok); |
771 Statement* ParseNativeDeclaration(bool* ok); | 775 Statement* ParseNativeDeclaration(bool* ok); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 Expression* current_value_; | 897 Expression* current_value_; |
894 int recursion_level_; | 898 int recursion_level_; |
895 bool* ok_; | 899 bool* ok_; |
896 }; | 900 }; |
897 | 901 |
898 Block* ParseVariableDeclarations(VariableDeclarationContext var_context, | 902 Block* ParseVariableDeclarations(VariableDeclarationContext var_context, |
899 DeclarationParsingResult* parsing_result, | 903 DeclarationParsingResult* parsing_result, |
900 ZoneList<const AstRawString*>* names, | 904 ZoneList<const AstRawString*>* names, |
901 bool* ok); | 905 bool* ok); |
902 Statement* ParseExpressionOrLabelledStatement( | 906 Statement* ParseExpressionOrLabelledStatement( |
903 ZoneList<const AstRawString*>* labels, bool* ok); | 907 ZoneList<const AstRawString*>* labels, |
| 908 AllowLabelledFunctionStatement allow_function, bool* ok); |
904 IfStatement* ParseIfStatement(ZoneList<const AstRawString*>* labels, | 909 IfStatement* ParseIfStatement(ZoneList<const AstRawString*>* labels, |
905 bool* ok); | 910 bool* ok); |
906 Statement* ParseContinueStatement(bool* ok); | 911 Statement* ParseContinueStatement(bool* ok); |
907 Statement* ParseBreakStatement(ZoneList<const AstRawString*>* labels, | 912 Statement* ParseBreakStatement(ZoneList<const AstRawString*>* labels, |
908 bool* ok); | 913 bool* ok); |
909 Statement* ParseReturnStatement(bool* ok); | 914 Statement* ParseReturnStatement(bool* ok); |
910 Statement* ParseWithStatement(ZoneList<const AstRawString*>* labels, | 915 Statement* ParseWithStatement(ZoneList<const AstRawString*>* labels, |
911 bool* ok); | 916 bool* ok); |
912 CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok); | 917 CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok); |
913 Statement* ParseSwitchStatement(ZoneList<const AstRawString*>* labels, | 918 Statement* ParseSwitchStatement(ZoneList<const AstRawString*>* labels, |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 | 1252 |
1248 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1253 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1249 return parser_->ParseDoExpression(ok); | 1254 return parser_->ParseDoExpression(ok); |
1250 } | 1255 } |
1251 | 1256 |
1252 | 1257 |
1253 } // namespace internal | 1258 } // namespace internal |
1254 } // namespace v8 | 1259 } // namespace v8 |
1255 | 1260 |
1256 #endif // V8_PARSING_PARSER_H_ | 1261 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |