@@ -2737,7 +2737,7 @@ protected Statement parseStatement(boolean declaration, boolean topLevel, Set<St
27372737 return this .parseThrowStatement (startLoc );
27382738 } else if (starttype == TokenType ._try ) {
27392739 return this .parseTryStatement (startLoc );
2740- } else if (starttype == TokenType ._const || starttype == TokenType ._var ) {
2740+ } else if (starttype == TokenType ._const || starttype == TokenType ._var || starttype == TokenType . _using ) {
27412741 if (kind == null ) kind = String .valueOf (this .value );
27422742 if (!declaration && !kind .equals ("var" )) this .unexpected ();
27432743 return this .parseVarStatement (startLoc , kind );
@@ -2840,7 +2840,7 @@ protected Statement parseForStatement(Position startLoc) {
28402840 this .expect (TokenType .parenL );
28412841 if (this .type == TokenType .semi ) return this .parseFor (startLoc , null );
28422842 boolean isLet = this .isLet ();
2843- if (this .type == TokenType ._var || this .type == TokenType ._const || isLet ) {
2843+ if (this .type == TokenType ._var || this .type == TokenType ._const || isLet || this . type == TokenType . _using ) { // TODO: Add test for this.
28442844 Position initStartLoc = this .startLoc ;
28452845 String kind = isLet ? "let" : String .valueOf (this .value );
28462846 this .next ();
@@ -3122,7 +3122,7 @@ protected VariableDeclaration parseVar(Position startLoc, boolean isFor, String
31223122 Expression init = null ;
31233123 if (this .eat (TokenType .eq )) {
31243124 init = this .parseMaybeAssign (isFor , null , null );
3125- } else if (kind .equals ("const" )
3125+ } else if (( kind .equals ("const" ) || kind . equals ( "using" ) )
31263126 && !(this .type == TokenType ._in
31273127 || (this .options .ecmaVersion () >= 6 && this .isContextual ("of" )))) {
31283128 this .raiseRecoverable (
0 commit comments