simplify Parser::semicolon method

This commit is contained in:
Sebastian McKenzie 2015-11-03 11:46:11 +00:00
parent 14ca4d1dc9
commit c3b1b25966

View File

@ -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,