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_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency | 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 ZoneList<const AstRawString*>* names, | 943 ZoneList<const AstRawString*>* names, |
944 bool* ok); | 944 bool* ok); |
945 | 945 |
946 struct DeclarationDescriptor { | 946 struct DeclarationDescriptor { |
947 Parser* parser; | 947 Parser* parser; |
948 Scope* declaration_scope; | 948 Scope* declaration_scope; |
949 Scope* scope; | 949 Scope* scope; |
950 VariableMode mode; | 950 VariableMode mode; |
951 bool is_const; | 951 bool is_const; |
952 bool needs_init; | 952 bool needs_init; |
953 int pos; | 953 int declaration_pos; |
| 954 int initialization_pos; |
954 Token::Value init_op; | 955 Token::Value init_op; |
955 }; | 956 }; |
956 | 957 |
957 struct DeclarationParsingResult { | 958 struct DeclarationParsingResult { |
958 struct Declaration { | 959 struct Declaration { |
959 Declaration(Expression* pattern, int initializer_position, | 960 Declaration(Expression* pattern, int initializer_position, |
960 Expression* initializer) | 961 Expression* initializer) |
961 : pattern(pattern), | 962 : pattern(pattern), |
962 initializer_position(initializer_position), | 963 initializer_position(initializer_position), |
963 initializer(initializer) {} | 964 initializer(initializer) {} |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 } | 1272 } |
1272 | 1273 |
1273 | 1274 |
1274 Expression* ParserTraits::SpreadCallNew( | 1275 Expression* ParserTraits::SpreadCallNew( |
1275 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { | 1276 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { |
1276 return parser_->SpreadCallNew(function, args, pos); | 1277 return parser_->SpreadCallNew(function, args, pos); |
1277 } | 1278 } |
1278 } } // namespace v8::internal | 1279 } } // namespace v8::internal |
1279 | 1280 |
1280 #endif // V8_PARSER_H_ | 1281 #endif // V8_PARSER_H_ |
OLD | NEW |