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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 PreParserExpression NewArrayLiteral(PreParserExpressionList values, | 447 PreParserExpression NewArrayLiteral(PreParserExpressionList values, |
448 int literal_index, | 448 int literal_index, |
449 int pos) { | 449 int pos) { |
450 return PreParserExpression::ArrayLiteral(); | 450 return PreParserExpression::ArrayLiteral(); |
451 } | 451 } |
452 PreParserExpression NewArrayLiteral(PreParserExpressionList values, | 452 PreParserExpression NewArrayLiteral(PreParserExpressionList values, |
453 int first_spread_index, int literal_index, | 453 int first_spread_index, int literal_index, |
454 int pos) { | 454 int pos) { |
455 return PreParserExpression::ArrayLiteral(); | 455 return PreParserExpression::ArrayLiteral(); |
456 } | 456 } |
| 457 PreParserExpression NewClassLiteralProperty(PreParserExpression key, |
| 458 PreParserExpression value, |
| 459 ClassLiteralProperty::Kind kind, |
| 460 bool is_static, |
| 461 bool is_computed_name) { |
| 462 return PreParserExpression::Default(); |
| 463 } |
457 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, | 464 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, |
458 PreParserExpression value, | 465 PreParserExpression value, |
459 ObjectLiteralProperty::Kind kind, | 466 ObjectLiteralProperty::Kind kind, |
460 bool is_static, | |
461 bool is_computed_name) { | 467 bool is_computed_name) { |
462 return PreParserExpression::Default(); | 468 return PreParserExpression::Default(); |
463 } | 469 } |
464 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, | 470 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, |
465 PreParserExpression value, | 471 PreParserExpression value, |
466 bool is_static, | |
467 bool is_computed_name) { | 472 bool is_computed_name) { |
468 return PreParserExpression::Default(); | 473 return PreParserExpression::Default(); |
469 } | 474 } |
470 PreParserExpression NewObjectLiteral(PreParserExpressionList properties, | 475 PreParserExpression NewObjectLiteral(PreParserExpressionList properties, |
471 int literal_index, | 476 int literal_index, |
472 int boilerplate_properties, | 477 int boilerplate_properties, |
473 int pos) { | 478 int pos) { |
474 return PreParserExpression::ObjectLiteral(); | 479 return PreParserExpression::ObjectLiteral(); |
475 } | 480 } |
476 PreParserExpression NewVariableProxy(void* variable) { | 481 PreParserExpression NewVariableProxy(void* variable) { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 typedef PreParser Impl; | 602 typedef PreParser Impl; |
598 | 603 |
599 // PreParser doesn't need to store generator variables. | 604 // PreParser doesn't need to store generator variables. |
600 typedef void GeneratorVariable; | 605 typedef void GeneratorVariable; |
601 | 606 |
602 // Return types for traversing functions. | 607 // Return types for traversing functions. |
603 typedef PreParserIdentifier Identifier; | 608 typedef PreParserIdentifier Identifier; |
604 typedef PreParserExpression Expression; | 609 typedef PreParserExpression Expression; |
605 typedef PreParserExpression FunctionLiteral; | 610 typedef PreParserExpression FunctionLiteral; |
606 typedef PreParserExpression ObjectLiteralProperty; | 611 typedef PreParserExpression ObjectLiteralProperty; |
| 612 typedef PreParserExpression ClassLiteralProperty; |
607 typedef PreParserExpressionList ExpressionList; | 613 typedef PreParserExpressionList ExpressionList; |
608 typedef PreParserExpressionList PropertyList; | 614 typedef PreParserExpressionList PropertyList; |
609 typedef PreParserFormalParameters FormalParameters; | 615 typedef PreParserFormalParameters FormalParameters; |
610 typedef PreParserStatementList StatementList; | 616 typedef PreParserStatementList StatementList; |
611 typedef PreParserStatement Block; | 617 typedef PreParserStatement Block; |
612 | 618 |
613 // For constructing objects returned by the traversing functions. | 619 // For constructing objects returned by the traversing functions. |
614 typedef PreParserFactory Factory; | 620 typedef PreParserFactory Factory; |
615 }; | 621 }; |
616 | 622 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 } | 1000 } |
995 V8_INLINE static PreParserExpression EmptyExpression() { | 1001 V8_INLINE static PreParserExpression EmptyExpression() { |
996 return PreParserExpression::Empty(); | 1002 return PreParserExpression::Empty(); |
997 } | 1003 } |
998 V8_INLINE static PreParserExpression EmptyLiteral() { | 1004 V8_INLINE static PreParserExpression EmptyLiteral() { |
999 return PreParserExpression::Default(); | 1005 return PreParserExpression::Default(); |
1000 } | 1006 } |
1001 V8_INLINE static PreParserExpression EmptyObjectLiteralProperty() { | 1007 V8_INLINE static PreParserExpression EmptyObjectLiteralProperty() { |
1002 return PreParserExpression::Default(); | 1008 return PreParserExpression::Default(); |
1003 } | 1009 } |
| 1010 V8_INLINE static PreParserExpression EmptyClassLiteralProperty() { |
| 1011 return PreParserExpression::Default(); |
| 1012 } |
1004 V8_INLINE static PreParserExpression EmptyFunctionLiteral() { | 1013 V8_INLINE static PreParserExpression EmptyFunctionLiteral() { |
1005 return PreParserExpression::Default(); | 1014 return PreParserExpression::Default(); |
1006 } | 1015 } |
1007 | 1016 |
1008 V8_INLINE static bool IsEmptyExpression(PreParserExpression expr) { | 1017 V8_INLINE static bool IsEmptyExpression(PreParserExpression expr) { |
1009 return expr.IsEmpty(); | 1018 return expr.IsEmpty(); |
1010 } | 1019 } |
1011 | 1020 |
1012 V8_INLINE static PreParserExpressionList NullExpressionList() { | 1021 V8_INLINE static PreParserExpressionList NullExpressionList() { |
1013 return PreParserExpressionList(); | 1022 return PreParserExpressionList(); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 function_state_->NextMaterializedLiteralIndex(); | 1218 function_state_->NextMaterializedLiteralIndex(); |
1210 function_state_->NextMaterializedLiteralIndex(); | 1219 function_state_->NextMaterializedLiteralIndex(); |
1211 } | 1220 } |
1212 return EmptyExpression(); | 1221 return EmptyExpression(); |
1213 } | 1222 } |
1214 | 1223 |
1215 } // namespace internal | 1224 } // namespace internal |
1216 } // namespace v8 | 1225 } // namespace v8 |
1217 | 1226 |
1218 #endif // V8_PARSING_PREPARSER_H | 1227 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |