| 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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 enum Kind { NORMAL, PARAMETER }; | 978 enum Kind { NORMAL, PARAMETER }; |
| 979 Parser* parser; | 979 Parser* parser; |
| 980 Scope* declaration_scope; | 980 Scope* declaration_scope; |
| 981 Scope* scope; | 981 Scope* scope; |
| 982 Scope* hoist_scope; | 982 Scope* hoist_scope; |
| 983 VariableMode mode; | 983 VariableMode mode; |
| 984 bool is_const; | 984 bool is_const; |
| 985 bool needs_init; | 985 bool needs_init; |
| 986 int declaration_pos; | 986 int declaration_pos; |
| 987 int initialization_pos; | 987 int initialization_pos; |
| 988 Token::Value init_op; | |
| 989 Kind declaration_kind; | 988 Kind declaration_kind; |
| 990 }; | 989 }; |
| 991 | 990 |
| 992 struct DeclarationParsingResult { | 991 struct DeclarationParsingResult { |
| 993 struct Declaration { | 992 struct Declaration { |
| 994 Declaration(Expression* pattern, int initializer_position, | 993 Declaration(Expression* pattern, int initializer_position, |
| 995 Expression* initializer) | 994 Expression* initializer) |
| 996 : pattern(pattern), | 995 : pattern(pattern), |
| 997 initializer_position(initializer_position), | 996 initializer_position(initializer_position), |
| 998 initializer(initializer) {} | 997 initializer(initializer) {} |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 | 1386 |
| 1388 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1387 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1389 return parser_->ParseDoExpression(ok); | 1388 return parser_->ParseDoExpression(ok); |
| 1390 } | 1389 } |
| 1391 | 1390 |
| 1392 | 1391 |
| 1393 } // namespace internal | 1392 } // namespace internal |
| 1394 } // namespace v8 | 1393 } // namespace v8 |
| 1395 | 1394 |
| 1396 #endif // V8_PARSER_H_ | 1395 #endif // V8_PARSER_H_ |
| OLD | NEW |