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_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/parsing/parser-base.h" | 10 #include "src/parsing/parser-base.h" |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 V8_INLINE PreParserStatement RewriteTryStatement( | 1071 V8_INLINE PreParserStatement RewriteTryStatement( |
1072 PreParserStatement try_block, PreParserStatement catch_block, | 1072 PreParserStatement try_block, PreParserStatement catch_block, |
1073 PreParserStatement finally_block, const CatchInfo& catch_info, int pos) { | 1073 PreParserStatement finally_block, const CatchInfo& catch_info, int pos) { |
1074 return PreParserStatement::Default(); | 1074 return PreParserStatement::Default(); |
1075 } | 1075 } |
1076 | 1076 |
1077 V8_INLINE void ParseAndRewriteGeneratorFunctionBody( | 1077 V8_INLINE void ParseAndRewriteGeneratorFunctionBody( |
1078 int pos, FunctionKind kind, PreParserStatementList body, bool* ok) { | 1078 int pos, FunctionKind kind, PreParserStatementList body, bool* ok) { |
1079 ParseStatementList(body, Token::RBRACE, ok); | 1079 ParseStatementList(body, Token::RBRACE, ok); |
1080 } | 1080 } |
| 1081 V8_INLINE void ParseAndRewriteAsyncGeneratorFunctionBody( |
| 1082 int pos, FunctionKind kind, PreParserStatementList body, bool* ok) { |
| 1083 ParseStatementList(body, Token::RBRACE, ok); |
| 1084 } |
1081 V8_INLINE void CreateFunctionNameAssignment( | 1085 V8_INLINE void CreateFunctionNameAssignment( |
1082 PreParserIdentifier function_name, int pos, | 1086 PreParserIdentifier function_name, int pos, |
1083 FunctionLiteral::FunctionType function_type, | 1087 FunctionLiteral::FunctionType function_type, |
1084 DeclarationScope* function_scope, PreParserStatementList result, | 1088 DeclarationScope* function_scope, PreParserStatementList result, |
1085 int index) {} | 1089 int index) {} |
1086 | 1090 |
1087 V8_INLINE PreParserExpression RewriteDoExpression(PreParserStatement body, | 1091 V8_INLINE PreParserExpression RewriteDoExpression(PreParserStatement body, |
1088 int pos, bool* ok) { | 1092 int pos, bool* ok) { |
1089 return PreParserExpression::Default(); | 1093 return PreParserExpression::Default(); |
1090 } | 1094 } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 Token::Value op, | 1288 Token::Value op, |
1285 int pos) { | 1289 int pos) { |
1286 return false; | 1290 return false; |
1287 } | 1291 } |
1288 | 1292 |
1289 V8_INLINE PreParserExpression BuildUnaryExpression( | 1293 V8_INLINE PreParserExpression BuildUnaryExpression( |
1290 PreParserExpression expression, Token::Value op, int pos) { | 1294 PreParserExpression expression, Token::Value op, int pos) { |
1291 return PreParserExpression::Default(); | 1295 return PreParserExpression::Default(); |
1292 } | 1296 } |
1293 | 1297 |
1294 V8_INLINE PreParserExpression BuildIteratorResult(PreParserExpression value, | |
1295 bool done) { | |
1296 return PreParserExpression::Default(); | |
1297 } | |
1298 | |
1299 V8_INLINE PreParserStatement | 1298 V8_INLINE PreParserStatement |
1300 BuildInitializationBlock(DeclarationParsingResult* parsing_result, | 1299 BuildInitializationBlock(DeclarationParsingResult* parsing_result, |
1301 ZoneList<const AstRawString*>* names, bool* ok) { | 1300 ZoneList<const AstRawString*>* names, bool* ok) { |
1302 for (auto declaration : parsing_result->declarations) { | 1301 for (auto declaration : parsing_result->declarations) { |
1303 DeclareAndInitializeVariables(PreParserStatement::Default(), | 1302 DeclareAndInitializeVariables(PreParserStatement::Default(), |
1304 &(parsing_result->descriptor), &declaration, | 1303 &(parsing_result->descriptor), &declaration, |
1305 names, ok); | 1304 names, ok); |
1306 } | 1305 } |
1307 return PreParserStatement::Default(); | 1306 return PreParserStatement::Default(); |
1308 } | 1307 } |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, | 1726 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, |
1728 int start, | 1727 int start, |
1729 PreParserExpression tag) { | 1728 PreParserExpression tag) { |
1730 return EmptyExpression(); | 1729 return EmptyExpression(); |
1731 } | 1730 } |
1732 | 1731 |
1733 } // namespace internal | 1732 } // namespace internal |
1734 } // namespace v8 | 1733 } // namespace v8 |
1735 | 1734 |
1736 #endif // V8_PARSING_PREPARSER_H | 1735 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |