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

Unified Diff: src/parser.h

Issue 1168643005: [es6] parse destructuring assignment (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase on top of rest+arrow functions Created 5 years, 6 months 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
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index a9834e25d767c654a191e2e5d5599e7e877d696a..8fb3c3f62ae02005c6e27dfc0a3e0b7fabb65f28 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -837,6 +837,8 @@ class ParserTraits {
ZoneList<v8::internal::Expression*>* args,
int pos);
+ inline Expression* RewriteDestructuringAssignment(Expression* expr, bool* ok);
+
private:
Parser* parser_;
};
@@ -1064,6 +1066,8 @@ class Parser : public ParserBase<ParserTraits> {
ForStatement* loop, Statement* init, Expression* cond, Statement* next,
Statement* body, bool* ok);
+ Expression* DesugarDestructuringAssignment(Expression* expr, bool* ok);
+
FunctionLiteral* ParseFunctionLiteral(
const AstRawString* name, Scanner::Location function_name_location,
bool name_is_strict_reserved, FunctionKind kind,
@@ -1287,6 +1291,12 @@ void ParserTraits::DeclareFormalParameter(Scope* scope,
parser_->scanner()->location());
}
}
+
+
+inline Expression* ParserTraits::RewriteDestructuringAssignment(
+ Expression* expr, bool* ok) {
+ return parser_->DesugarDestructuringAssignment(expr, ok);
+}
} } // namespace v8::internal
#endif // V8_PARSER_H_

Powered by Google App Engine
This is Rietveld 408576698