| 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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 ZoneList<const AstRawString*>* names, | 754 ZoneList<const AstRawString*>* names, |
| 755 bool* ok); | 755 bool* ok); |
| 756 DoExpression* ParseDoExpression(bool* ok); | 756 DoExpression* ParseDoExpression(bool* ok); |
| 757 | 757 |
| 758 struct DeclarationDescriptor { | 758 struct DeclarationDescriptor { |
| 759 enum Kind { NORMAL, PARAMETER }; | 759 enum Kind { NORMAL, PARAMETER }; |
| 760 Parser* parser; | 760 Parser* parser; |
| 761 Scope* scope; | 761 Scope* scope; |
| 762 Scope* hoist_scope; | 762 Scope* hoist_scope; |
| 763 VariableMode mode; | 763 VariableMode mode; |
| 764 bool needs_init; | |
| 765 int declaration_pos; | 764 int declaration_pos; |
| 766 int initialization_pos; | 765 int initialization_pos; |
| 767 Kind declaration_kind; | 766 Kind declaration_kind; |
| 768 }; | 767 }; |
| 769 | 768 |
| 770 struct DeclarationParsingResult { | 769 struct DeclarationParsingResult { |
| 771 struct Declaration { | 770 struct Declaration { |
| 772 Declaration(Expression* pattern, int initializer_position, | 771 Declaration(Expression* pattern, int initializer_position, |
| 773 Expression* initializer) | 772 Expression* initializer) |
| 774 : pattern(pattern), | 773 : pattern(pattern), |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 | 1211 |
| 1213 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1212 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1214 return parser_->ParseDoExpression(ok); | 1213 return parser_->ParseDoExpression(ok); |
| 1215 } | 1214 } |
| 1216 | 1215 |
| 1217 | 1216 |
| 1218 } // namespace internal | 1217 } // namespace internal |
| 1219 } // namespace v8 | 1218 } // namespace v8 |
| 1220 | 1219 |
| 1221 #endif // V8_PARSING_PARSER_H_ | 1220 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |