diff --git a/acorn.js b/acorn.js index 4d5b23e578..ade6e3f92b 100644 --- a/acorn.js +++ b/acorn.js @@ -1476,6 +1476,7 @@ var node = startNode(), update = tokType.isUpdate; node.operator = tokVal; node.prefix = true; + tokRegexpAllowed = true; next(); node.argument = parseMaybeUnary(); if (update) checkLVal(node.argument); diff --git a/index.html b/index.html index 968745e008..4099e39ffa 100644 --- a/index.html +++ b/index.html @@ -1082,6 +1082,7 @@ operator that has a lower precedence than the set it is parsing.
var node = startNode(), update = tokType.isUpdate; node.operator = tokVal; node.prefix = true; + tokRegexpAllowed = true; next(); node.argument = parseMaybeUnary(); if (update) checkLVal(node.argument);