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

Unified Diff: src/preparser.h

Issue 885243002: Implement parsing of ES6 Rest Parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | src/scanner.cc » ('J')
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 3ba48826194bb5df1924fad039b03c4a4805997d..67a559c77f4367b49218607d8c0f66aaa41e5013 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -89,7 +89,8 @@ class ParserBase : public Traits {
allow_harmony_arrow_functions_(false),
allow_harmony_object_literals_(false),
allow_harmony_sloppy_(false),
- allow_harmony_computed_property_names_(false) {}
+ allow_harmony_computed_property_names_(false),
+ allow_harmony_rest_params_(false) {}
// Getters that indicate whether certain syntactical constructs are
// allowed to be parsed by this instance of the parser.
@@ -113,6 +114,9 @@ class ParserBase : public Traits {
bool allow_harmony_computed_property_names() const {
return allow_harmony_computed_property_names_;
}
+ bool allow_harmony_rest_params() const {
+ return allow_harmony_rest_params_;
+ }
// Setters that determine whether certain syntactical constructs are
// allowed to be parsed by this instance of the parser.
@@ -148,6 +152,9 @@ class ParserBase : public Traits {
void set_allow_harmony_computed_property_names(bool allow) {
allow_harmony_computed_property_names_ = allow;
}
+ void set_allow_harmony_rest_params(bool allow) {
+ allow_harmony_rest_params_ = allow;
+ }
protected:
enum AllowEvalOrArgumentsAsIdentifier {
@@ -625,6 +632,7 @@ class ParserBase : public Traits {
bool allow_harmony_object_literals_;
bool allow_harmony_sloppy_;
bool allow_harmony_computed_property_names_;
+ bool allow_harmony_rest_params_;
};
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | src/scanner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698