Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index 5b06e52a95948da3a64266050e466234081cbc18..32cdbd5c16dc05f07bc37f18041bc96fe3b3dee5 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -632,6 +632,40 @@ class ParserBase { |
Mode old_mode_; |
}; |
+ struct DeclarationDescriptor { |
nickie
2016/08/30 14:04:34
(I'm wondering...) Would it be better if this wer
|
+ enum Kind { NORMAL, PARAMETER }; |
+ Scope* scope; |
+ Scope* hoist_scope; |
+ VariableMode mode; |
+ int declaration_pos; |
+ int initialization_pos; |
+ Kind declaration_kind; |
+ }; |
+ |
+ struct DeclarationParsingResult { |
+ struct Declaration { |
+ Declaration(ExpressionT pattern, int initializer_position, |
+ ExpressionT initializer) |
+ : pattern(pattern), |
+ initializer_position(initializer_position), |
+ initializer(initializer) {} |
+ |
+ ExpressionT pattern; |
+ int initializer_position; |
+ ExpressionT initializer; |
+ }; |
+ |
+ DeclarationParsingResult() |
+ : declarations(4), |
+ first_initializer_loc(Scanner::Location::invalid()), |
+ bindings_loc(Scanner::Location::invalid()) {} |
+ |
+ DeclarationDescriptor descriptor; |
+ List<Declaration> declarations; |
+ Scanner::Location first_initializer_loc; |
+ Scanner::Location bindings_loc; |
+ }; |
+ |
DeclarationScope* NewScriptScope() const { |
return new (zone()) DeclarationScope(zone()); |
} |