| 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_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
| 6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 ZoneList<const AstRawString*>* names, bool* ok); | 847 ZoneList<const AstRawString*>* names, bool* ok); |
| 848 | 848 |
| 849 static void RewriteDestructuringAssignment(Parser* parser, | 849 static void RewriteDestructuringAssignment(Parser* parser, |
| 850 RewritableExpression* expr, | 850 RewritableExpression* expr, |
| 851 Scope* Scope); | 851 Scope* Scope); |
| 852 | 852 |
| 853 static Expression* RewriteDestructuringAssignment(Parser* parser, | 853 static Expression* RewriteDestructuringAssignment(Parser* parser, |
| 854 Assignment* assignment, | 854 Assignment* assignment, |
| 855 Scope* scope); | 855 Scope* scope); |
| 856 | 856 |
| 857 void set_initializer_position(int pos) { initializer_position_ = pos; } | |
| 858 | |
| 859 private: | 857 private: |
| 860 PatternRewriter() {} | 858 PatternRewriter() {} |
| 861 | 859 |
| 862 #define DECLARE_VISIT(type) void Visit##type(v8::internal::type* node) override; | 860 #define DECLARE_VISIT(type) void Visit##type(v8::internal::type* node) override; |
| 863 // Visiting functions for AST nodes make this an AstVisitor. | 861 // Visiting functions for AST nodes make this an AstVisitor. |
| 864 AST_NODE_LIST(DECLARE_VISIT) | 862 AST_NODE_LIST(DECLARE_VISIT) |
| 865 #undef DECLARE_VISIT | 863 #undef DECLARE_VISIT |
| 866 void Visit(AstNode* node) override; | 864 void Visit(AstNode* node) override; |
| 867 | 865 |
| 868 enum PatternContext { | 866 enum PatternContext { |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 | 1292 |
| 1295 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1293 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1296 return parser_->ParseDoExpression(ok); | 1294 return parser_->ParseDoExpression(ok); |
| 1297 } | 1295 } |
| 1298 | 1296 |
| 1299 | 1297 |
| 1300 } // namespace internal | 1298 } // namespace internal |
| 1301 } // namespace v8 | 1299 } // namespace v8 |
| 1302 | 1300 |
| 1303 #endif // V8_PARSING_PARSER_H_ | 1301 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |