Forbid semicolons after decorators in classes (#352)
This commit is contained in:
committed by
Daniel Tschinder
parent
ad8d520406
commit
561d4f74b0
@@ -648,6 +648,9 @@ pp.parseClassBody = function (node) {
|
||||
|
||||
while (!this.eat(tt.braceR)) {
|
||||
if (this.eat(tt.semi)) {
|
||||
if (decorators.length > 0) {
|
||||
this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user