add support for class initializer properties - 6to5/6to5#619
This commit is contained in:
parent
04cf3f3f9d
commit
ac2dfced36
12
acorn.js
12
acorn.js
@ -3674,8 +3674,20 @@
|
||||
} else {
|
||||
method.kind = "";
|
||||
}
|
||||
|
||||
var classProperty = false;
|
||||
|
||||
if (tokType === _colon) {
|
||||
method.typeAnnotation = parseTypeAnnotation();
|
||||
classProperty = true;
|
||||
}
|
||||
|
||||
if (options.playground && eat(_eq)) {
|
||||
method.value = parseMaybeAssign();
|
||||
classProperty = true;
|
||||
}
|
||||
|
||||
if (classProperty) {
|
||||
semicolon();
|
||||
classBody.body.push(finishNode(method, "ClassProperty"));
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user