diff --git a/acorn_loose.js b/acorn_loose.js index 5ad7c916ca..fa0153f794 100644 --- a/acorn_loose.js +++ b/acorn_loose.js @@ -484,6 +484,11 @@ node.declarations.push(finishNode(decl, "VariableDeclarator")); if (!eat(tt.comma)) break; } + if (!node.declarations.length) { + var decl = startNode(); + decl.id = dummyIdent(); + node.declarations.push(finishNode(decl, "VariableDeclarator")); + } return finishNode(node, "VariableDeclaration"); }