| Index: src/parser.h
|
| diff --git a/src/parser.h b/src/parser.h
|
| index 1defbf27427adff426b5b7a46152794c70df15d0..181b62e0578d74fa6b68989f54041e24921b14f1 100644
|
| --- a/src/parser.h
|
| +++ b/src/parser.h
|
| @@ -436,6 +436,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; }
|
| @@ -444,6 +445,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
|
| @@ -739,13 +741,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()) {
|
| @@ -868,6 +873,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.
|
|
|