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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 class PreParser; | 592 class PreParser; |
593 | 593 |
594 template <> | 594 template <> |
595 struct ParserTypes<PreParser> { | 595 struct ParserTypes<PreParser> { |
596 typedef ParserBase<PreParser> Base; | 596 typedef ParserBase<PreParser> Base; |
597 typedef PreParser Impl; | 597 typedef PreParser Impl; |
598 | 598 |
599 // PreParser doesn't need to store generator variables. | 599 // PreParser doesn't need to store generator variables. |
600 typedef void GeneratorVariable; | 600 typedef void GeneratorVariable; |
601 | 601 |
602 typedef int AstProperties; | |
603 | |
604 // Return types for traversing functions. | 602 // Return types for traversing functions. |
605 typedef PreParserIdentifier Identifier; | 603 typedef PreParserIdentifier Identifier; |
606 typedef PreParserExpression Expression; | 604 typedef PreParserExpression Expression; |
607 typedef PreParserExpression YieldExpression; | |
608 typedef PreParserExpression FunctionLiteral; | 605 typedef PreParserExpression FunctionLiteral; |
609 typedef PreParserExpression ClassLiteral; | |
610 typedef PreParserExpression Literal; | |
611 typedef PreParserExpression ObjectLiteralProperty; | 606 typedef PreParserExpression ObjectLiteralProperty; |
612 typedef PreParserExpressionList ExpressionList; | 607 typedef PreParserExpressionList ExpressionList; |
613 typedef PreParserExpressionList PropertyList; | 608 typedef PreParserExpressionList PropertyList; |
614 typedef PreParserIdentifier FormalParameter; | |
615 typedef PreParserFormalParameters FormalParameters; | 609 typedef PreParserFormalParameters FormalParameters; |
616 typedef PreParserStatementList StatementList; | 610 typedef PreParserStatementList StatementList; |
617 typedef PreParserStatement Block; | 611 typedef PreParserStatement Block; |
618 | 612 |
619 // For constructing objects returned by the traversing functions. | 613 // For constructing objects returned by the traversing functions. |
620 typedef PreParserFactory Factory; | 614 typedef PreParserFactory Factory; |
621 }; | 615 }; |
622 | 616 |
623 | 617 |
624 // Preparsing checks a JavaScript program and emits preparse-data that helps | 618 // Preparsing checks a JavaScript program and emits preparse-data that helps |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 function_state_->NextMaterializedLiteralIndex(); | 1209 function_state_->NextMaterializedLiteralIndex(); |
1216 function_state_->NextMaterializedLiteralIndex(); | 1210 function_state_->NextMaterializedLiteralIndex(); |
1217 } | 1211 } |
1218 return EmptyExpression(); | 1212 return EmptyExpression(); |
1219 } | 1213 } |
1220 | 1214 |
1221 } // namespace internal | 1215 } // namespace internal |
1222 } // namespace v8 | 1216 } // namespace v8 |
1223 | 1217 |
1224 #endif // V8_PARSING_PREPARSER_H | 1218 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |