Skip to content

Commit

Permalink
Raise specific errors for unterminated template literals
Browse files Browse the repository at this point in the history
Closes #707
  • Loading branch information
marijnh committed Sep 10, 2018
1 parent 1461c7c commit 22b22f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ pp.parseTemplate = function({isTagged = false} = {}) {
let curElt = this.parseTemplateElement({isTagged})
node.quasis = [curElt]
while (!curElt.tail) {
if (this.type === tt.eof) this.raise(this.pos, "Unterminated template literal")
this.expect(tt.dollarBraceL)
node.expressions.push(this.parseExpression())
this.expect(tt.braceR)
Expand Down

0 comments on commit 22b22f3

Please sign in to comment.