"in" L C I(word, Word("in"), yyextra->in_.top() ? tk::In_ : tk::In);
"instanceof" L C I(word, Word("instanceof"), tk::InstanceOf);
"new" L C I(word, Word("new"), tk::New);
+"of" L C I(word, Word("of"), tk::Of);
"return" L R I(word, Word("return"), tk::Return);
"switch" L C I(word, Word("switch"), tk::Switch);
"this" L C I(this, This(), tk::This);
%token <word_> In_ "!in"
%token <word_> InstanceOf "instanceof"
%token <word_> New "new"
+%token <word_> Of "of"
%token <word_> Return "return"
%token <word_> Switch "switch"
%token <this_> This "this"
/* XXX: | "instanceof" { $$ = $1; } */
| "new" { $$ = $1; }
| "null" { $$ = $1; }
+ | "of" { $$ = $1; }
| "return" NewLineOpt { $$ = $1; }
| "super" { $$ = $1; }
| "switch" { $$ = $1; }
| LexSetRegExp "var" VariableDeclarationList { $$ = CYNew CYForDeclarations($3); }
;
/* }}} */
-/* 12.6.4 The for-in Statement {{{ */
+/* 12.6.4 The for-in and for-of Statements {{{ */
ForInStatement
: "for" "(" LexPushInOn ForInStatementInitialiser LexPopIn "!in" Expression ")" Statement { $$ = CYNew CYForIn($4, $7, $9); }
+ | "for" "(" LexPushInOn ForInStatementInitialiser LexPopIn "of" Expression ")" Statement { $$ = CYNew CYForEachIn($4, $7, $9); }
;
ForInStatementInitialiser