From c3b1b259668a03366c8273462b2d4365ecefa4ef Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 3 Nov 2015 11:46:11 +0000 Subject: [PATCH] simplify Parser::semicolon method --- src/parser/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/util.js b/src/parser/util.js index 64d4bffe3c..03ca0b2e57 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -69,7 +69,7 @@ pp.isLineTerminator = function () { // pretend that there is a semicolon at this position. pp.semicolon = function () { - if (!this.eat(tt.semi) && !this.canInsertSemicolon()) this.unexpected(); + if (!this.isLineTerminator()) this.unexpected(); }; // Expect a token of a given type. If found, consume it, otherwise,