| Index: src/parser.h
|
| diff --git a/src/parser.h b/src/parser.h
|
| index eea617f8dc0d1d1e82e86cd4746e4eaad84d1acb..ae600d6753e0b974639952deb96619fe9b0d6738 100644
|
| --- a/src/parser.h
|
| +++ b/src/parser.h
|
| @@ -437,6 +437,7 @@ class Parser BASE_EMBEDDED {
|
| bool allow_modules() { return scanner().HarmonyModules(); }
|
| bool allow_harmony_scoping() { return scanner().HarmonyScoping(); }
|
| bool allow_generators() const { return allow_generators_; }
|
| + bool allow_for_of() const { return allow_for_of_; }
|
|
|
| void set_allow_natives_syntax(bool allow) { allow_natives_syntax_ = allow; }
|
| void set_allow_lazy(bool allow) { allow_lazy_ = allow; }
|
| @@ -445,6 +446,7 @@ class Parser BASE_EMBEDDED {
|
| scanner().SetHarmonyScoping(allow);
|
| }
|
| void set_allow_generators(bool allow) { allow_generators_ = allow; }
|
| + void set_allow_for_of(bool allow) { allow_for_of_ = allow; }
|
|
|
| // Parses the source code represented by the compilation info and sets its
|
| // function literal. Returns false (and deallocates any allocated AST
|
| @@ -721,13 +723,16 @@ class Parser BASE_EMBEDDED {
|
|
|
| bool is_generator() const { return current_function_state_->is_generator(); }
|
|
|
| + bool CheckInOrOf(ForEachStatement::VisitMode* visit_mode);
|
| +
|
| bool peek_any_identifier();
|
|
|
| INLINE(void Consume(Token::Value token));
|
| void Expect(Token::Value token, bool* ok);
|
| bool Check(Token::Value token);
|
| void ExpectSemicolon(bool* ok);
|
| - void ExpectContextualKeyword(const char* keyword, bool* ok);
|
| + bool CheckContextualKeyword(Vector<const char> keyword);
|
| + void ExpectContextualKeyword(Vector<const char> keyword, bool* ok);
|
|
|
| Handle<String> LiteralString(PretenureFlag tenured) {
|
| if (scanner().is_literal_ascii()) {
|
| @@ -850,6 +855,7 @@ class Parser BASE_EMBEDDED {
|
| bool allow_natives_syntax_;
|
| bool allow_lazy_;
|
| bool allow_generators_;
|
| + bool allow_for_of_;
|
| bool stack_overflow_;
|
| // If true, the next (and immediately following) function literal is
|
| // preceded by a parenthesis.
|
|
|