Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: src/parsing/parser.h

Issue 1517973002: [es6] support AssignmentPattern as LHS in for-in/of loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Centralize the error validation to a single place, to ease confusion Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/ast.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 3e3c41114929b32ec08354f9359e7b18b4b4a2c8..8febe70bee3dc69d38655aa9b523e0880e27f36b 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -1047,8 +1047,11 @@ class Parser : public ParserBase<ParserTraits> {
ZoneList<const AstRawString*>* names, bool* ok);
static void RewriteDestructuringAssignment(
- Parser* parser, RewritableAssignmentExpression* expr, Scope* Scope,
- bool* ok);
+ Parser* parser, RewritableAssignmentExpression* expr, Scope* Scope);
+
+ static Expression* RewriteDestructuringAssignment(Parser* parser,
+ Assignment* assignment,
+ Scope* scope);
void set_initializer_position(int pos) { initializer_position_ = pos; }
@@ -1144,10 +1147,9 @@ class Parser : public ParserBase<ParserTraits> {
// Initialize the components of a for-in / for-of statement.
- void InitializeForEachStatement(ForEachStatement* stmt,
- Expression* each,
- Expression* subject,
- Statement* body);
+ void InitializeForEachStatement(ForEachStatement* stmt, Expression* each,
+ Expression* subject, Statement* body,
+ bool is_destructuring);
Statement* DesugarLexicalBindingsInForStatement(
Scope* inner_scope, bool is_const, ZoneList<const AstRawString*>* names,
ForStatement* loop, Statement* init, Expression* cond, Statement* next,
« no previous file with comments | « src/ast/ast.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698