diff --git a/acorn.js b/acorn.js index 7fec92f7d0..22a9ca1326 100644 --- a/acorn.js +++ b/acorn.js @@ -2107,7 +2107,7 @@ elem.tail = false; next(); node.quasis.push(finishNode(elem, "TemplateElement")); - if (eat(_bquote)) { // '`', end of template + if (tokType === _bquote) { // '`', end of template elem.tail = true; break; } @@ -2118,6 +2118,7 @@ expect(_braceR); } inTemplate = false; + next(); return finishNode(node, "TemplateLiteral"); }