Fix template string parsing

This commit is contained in:
Fugiman 2016-01-18 21:28:26 -08:00
parent 1cd9a2df9a
commit c1073eacc0

View File

@ -1414,10 +1414,8 @@ function parse($TEXT, options) {
tokenizer_S.next(); tokenizer_S.next();
next(); next();
segments.push(expression()); segments.push(expression());
expect("}"); if (!is("punc", "}"))
if (is("punc", "`")) { token_error(tokenizer_S.token, "Unexpected token " + tokenizer_S.token.type + " «" + tokenizer_S.token.value + "»" + ", expected punc «}»");
break;
}
continue; continue;
} }
segment += ch; segment += ch;