babylon: fix error location for class properties with a missing semicolon
This commit is contained in:
@@ -748,7 +748,7 @@ pp.parseClassProperty = function (node) {
|
||||
node.value = null;
|
||||
}
|
||||
if (!this.eat(tt.semi)) {
|
||||
this.raise(this.state.start, "A semicolon is required after a class property");
|
||||
this.raise(node.value && node.value.end || node.key.end, "A semicolon is required after a class property");
|
||||
}
|
||||
return this.finishNode(node, "ClassProperty");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user