| 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 #include "src/parsing/preparse-data.h" |
| 10 | 11 |
| 11 namespace v8 { | 12 namespace v8 { |
| 12 namespace internal { | 13 namespace internal { |
| 13 | 14 |
| 14 // Whereas the Parser generates AST during the recursive descent, | 15 // Whereas the Parser generates AST during the recursive descent, |
| 15 // the PreParser doesn't create a tree. Instead, it passes around minimal | 16 // the PreParser doesn't create a tree. Instead, it passes around minimal |
| 16 // data objects (PreParserExpression, PreParserIdentifier etc.) which contain | 17 // data objects (PreParserExpression, PreParserIdentifier etc.) which contain |
| 17 // just enough data for the upper layer functions. PreParserFactory is | 18 // just enough data for the upper layer functions. PreParserFactory is |
| 18 // responsible for creating these dummy objects. It provides a similar kind of | 19 // responsible for creating these dummy objects. It provides a similar kind of |
| 19 // interface as AstNodeFactory, so ParserBase doesn't need to care which one is | 20 // interface as AstNodeFactory, so ParserBase doesn't need to care which one is |
| (...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 function_state_->NextMaterializedLiteralIndex(); | 1563 function_state_->NextMaterializedLiteralIndex(); |
| 1563 function_state_->NextMaterializedLiteralIndex(); | 1564 function_state_->NextMaterializedLiteralIndex(); |
| 1564 } | 1565 } |
| 1565 return EmptyExpression(); | 1566 return EmptyExpression(); |
| 1566 } | 1567 } |
| 1567 | 1568 |
| 1568 } // namespace internal | 1569 } // namespace internal |
| 1569 } // namespace v8 | 1570 } // namespace v8 |
| 1570 | 1571 |
| 1571 #endif // V8_PARSING_PREPARSER_H | 1572 #endif // V8_PARSING_PREPARSER_H |
| OLD | NEW |