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

Unified Diff: src/preparser.h

Issue 1450193002: Rename destructuring flag to "--harmony-destructuring-bind" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 5b66e9a11401c5406795c891e637bae475cf4b99..97dde9e02b50b8c306b4655e1728183cc4561b2c 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -113,7 +113,7 @@ class ParserBase : public Traits {
allow_harmony_sloppy_let_(false),
allow_harmony_rest_parameters_(false),
allow_harmony_default_parameters_(false),
- allow_harmony_destructuring_(false),
+ allow_harmony_destructuring_bind_(false),
allow_strong_mode_(false),
allow_legacy_const_(true),
allow_harmony_do_expressions_(false) {}
@@ -129,7 +129,7 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(harmony_sloppy_let);
ALLOW_ACCESSORS(harmony_rest_parameters);
ALLOW_ACCESSORS(harmony_default_parameters);
- ALLOW_ACCESSORS(harmony_destructuring);
+ ALLOW_ACCESSORS(harmony_destructuring_bind);
ALLOW_ACCESSORS(strong_mode);
ALLOW_ACCESSORS(legacy_const);
ALLOW_ACCESSORS(harmony_do_expressions);
@@ -834,7 +834,7 @@ class ParserBase : public Traits {
bool allow_harmony_sloppy_let_;
bool allow_harmony_rest_parameters_;
bool allow_harmony_default_parameters_;
- bool allow_harmony_destructuring_;
+ bool allow_harmony_destructuring_bind_;
bool allow_strong_mode_;
bool allow_legacy_const_;
bool allow_harmony_do_expressions_;
@@ -2303,13 +2303,13 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier,
return this->ParseRegExpLiteral(false, classifier, ok);
case Token::LBRACK:
- if (!allow_harmony_destructuring()) {
+ if (!allow_harmony_destructuring_bind()) {
BindingPatternUnexpectedToken(classifier);
}
return this->ParseArrayLiteral(classifier, ok);
case Token::LBRACE:
- if (!allow_harmony_destructuring()) {
+ if (!allow_harmony_destructuring_bind()) {
BindingPatternUnexpectedToken(classifier);
}
return this->ParseObjectLiteral(classifier, ok);
@@ -2975,7 +2975,8 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN,
return expression;
}
- if (!(allow_harmony_destructuring() || allow_harmony_default_parameters())) {
+ if (!(allow_harmony_destructuring_bind() ||
+ allow_harmony_default_parameters())) {
BindingPatternUnexpectedToken(classifier);
}
@@ -3755,7 +3756,7 @@ void ParserBase<Traits>::ParseFormalParameter(
if (!*ok) return;
if (!Traits::IsIdentifier(pattern)) {
- if (is_rest || !allow_harmony_destructuring()) {
+ if (is_rest || !allow_harmony_destructuring_bind()) {
ReportUnexpectedToken(next);
*ok = false;
return;
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698