Revert "babylon: throw parse error if class properties do not have a semicolon (fixes T6873)"

This reverts commit 976edfc067.
This commit is contained in:
Logan Smyth
2016-02-06 18:36:31 -08:00
parent d9ade8a63a
commit 0c35bbfc07
5 changed files with 2 additions and 18 deletions

View File

@@ -595,7 +595,7 @@ pp.parseClass = function (node, isStatement, optionalId) {
};
pp.isClassProperty = function () {
return this.match(tt.eq) || this.match(tt.semi) || this.canInsertSemicolon();
return this.match(tt.eq) || this.isLineTerminator();
};
pp.parseClassBody = function (node) {
@@ -747,9 +747,7 @@ pp.parseClassProperty = function (node) {
} else {
node.value = null;
}
if (!this.eat(tt.semi)) {
this.raise(this.state.start, "A semicolon is required after a class property");
}
this.semicolon();
return this.finishNode(node, "ClassProperty");
};