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/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/parsing/parser-base.h" | 9 #include "src/parsing/parser-base.h" |
10 | 10 |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 PreParserExpression NewArrayLiteral(PreParserExpressionList values, | 473 PreParserExpression NewArrayLiteral(PreParserExpressionList values, |
474 int literal_index, | 474 int literal_index, |
475 int pos) { | 475 int pos) { |
476 return PreParserExpression::ArrayLiteral(); | 476 return PreParserExpression::ArrayLiteral(); |
477 } | 477 } |
478 PreParserExpression NewArrayLiteral(PreParserExpressionList values, | 478 PreParserExpression NewArrayLiteral(PreParserExpressionList values, |
479 int first_spread_index, int literal_index, | 479 int first_spread_index, int literal_index, |
480 int pos) { | 480 int pos) { |
481 return PreParserExpression::ArrayLiteral(); | 481 return PreParserExpression::ArrayLiteral(); |
482 } | 482 } |
| 483 PreParserExpression NewClassLiteralProperty(PreParserExpression key, |
| 484 PreParserExpression value, |
| 485 ClassLiteralProperty::Kind kind, |
| 486 bool is_static, |
| 487 bool is_computed_name) { |
| 488 return PreParserExpression::Default(); |
| 489 } |
483 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, | 490 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, |
484 PreParserExpression value, | 491 PreParserExpression value, |
485 ObjectLiteralProperty::Kind kind, | 492 ObjectLiteralProperty::Kind kind, |
486 bool is_static, | |
487 bool is_computed_name) { | 493 bool is_computed_name) { |
488 return PreParserExpression::Default(); | 494 return PreParserExpression::Default(); |
489 } | 495 } |
490 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, | 496 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, |
491 PreParserExpression value, | 497 PreParserExpression value, |
492 bool is_static, | |
493 bool is_computed_name) { | 498 bool is_computed_name) { |
494 return PreParserExpression::Default(); | 499 return PreParserExpression::Default(); |
495 } | 500 } |
496 PreParserExpression NewObjectLiteral(PreParserExpressionList properties, | 501 PreParserExpression NewObjectLiteral(PreParserExpressionList properties, |
497 int literal_index, | 502 int literal_index, |
498 int boilerplate_properties, | 503 int boilerplate_properties, |
499 int pos) { | 504 int pos) { |
500 return PreParserExpression::ObjectLiteral(); | 505 return PreParserExpression::ObjectLiteral(); |
501 } | 506 } |
502 PreParserExpression NewVariableProxy(void* variable) { | 507 PreParserExpression NewVariableProxy(void* variable) { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 typedef PreParser Impl; | 649 typedef PreParser Impl; |
645 | 650 |
646 // PreParser doesn't need to store generator variables. | 651 // PreParser doesn't need to store generator variables. |
647 typedef void GeneratorVariable; | 652 typedef void GeneratorVariable; |
648 | 653 |
649 // Return types for traversing functions. | 654 // Return types for traversing functions. |
650 typedef PreParserIdentifier Identifier; | 655 typedef PreParserIdentifier Identifier; |
651 typedef PreParserExpression Expression; | 656 typedef PreParserExpression Expression; |
652 typedef PreParserExpression FunctionLiteral; | 657 typedef PreParserExpression FunctionLiteral; |
653 typedef PreParserExpression ObjectLiteralProperty; | 658 typedef PreParserExpression ObjectLiteralProperty; |
| 659 typedef PreParserExpression ClassLiteralProperty; |
654 typedef PreParserExpressionList ExpressionList; | 660 typedef PreParserExpressionList ExpressionList; |
655 typedef PreParserExpressionList PropertyList; | 661 typedef PreParserExpressionList PropertyList; |
656 typedef PreParserFormalParameters FormalParameters; | 662 typedef PreParserFormalParameters FormalParameters; |
657 typedef PreParserStatement Statement; | 663 typedef PreParserStatement Statement; |
658 typedef PreParserStatementList StatementList; | 664 typedef PreParserStatementList StatementList; |
659 typedef PreParserStatement Block; | 665 typedef PreParserStatement Block; |
660 | 666 |
661 // For constructing objects returned by the traversing functions. | 667 // For constructing objects returned by the traversing functions. |
662 typedef PreParserFactory Factory; | 668 typedef PreParserFactory Factory; |
663 | 669 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 } | 1047 } |
1042 V8_INLINE static PreParserExpression EmptyExpression() { | 1048 V8_INLINE static PreParserExpression EmptyExpression() { |
1043 return PreParserExpression::Empty(); | 1049 return PreParserExpression::Empty(); |
1044 } | 1050 } |
1045 V8_INLINE static PreParserExpression EmptyLiteral() { | 1051 V8_INLINE static PreParserExpression EmptyLiteral() { |
1046 return PreParserExpression::Default(); | 1052 return PreParserExpression::Default(); |
1047 } | 1053 } |
1048 V8_INLINE static PreParserExpression EmptyObjectLiteralProperty() { | 1054 V8_INLINE static PreParserExpression EmptyObjectLiteralProperty() { |
1049 return PreParserExpression::Default(); | 1055 return PreParserExpression::Default(); |
1050 } | 1056 } |
| 1057 V8_INLINE static PreParserExpression EmptyClassLiteralProperty() { |
| 1058 return PreParserExpression::Default(); |
| 1059 } |
1051 V8_INLINE static PreParserExpression EmptyFunctionLiteral() { | 1060 V8_INLINE static PreParserExpression EmptyFunctionLiteral() { |
1052 return PreParserExpression::Default(); | 1061 return PreParserExpression::Default(); |
1053 } | 1062 } |
1054 | 1063 |
1055 V8_INLINE static bool IsEmptyExpression(PreParserExpression expr) { | 1064 V8_INLINE static bool IsEmptyExpression(PreParserExpression expr) { |
1056 return expr.IsEmpty(); | 1065 return expr.IsEmpty(); |
1057 } | 1066 } |
1058 | 1067 |
1059 V8_INLINE static PreParserExpressionList NullExpressionList() { | 1068 V8_INLINE static PreParserExpressionList NullExpressionList() { |
1060 return PreParserExpressionList::Null(); | 1069 return PreParserExpressionList::Null(); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 function_state_->NextMaterializedLiteralIndex(); | 1283 function_state_->NextMaterializedLiteralIndex(); |
1275 function_state_->NextMaterializedLiteralIndex(); | 1284 function_state_->NextMaterializedLiteralIndex(); |
1276 } | 1285 } |
1277 return EmptyExpression(); | 1286 return EmptyExpression(); |
1278 } | 1287 } |
1279 | 1288 |
1280 } // namespace internal | 1289 } // namespace internal |
1281 } // namespace v8 | 1290 } // namespace v8 |
1282 | 1291 |
1283 #endif // V8_PARSING_PREPARSER_H | 1292 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |