add support for class initializer properties - 6to5/6to5#619

This commit is contained in:
Sebastian McKenzie 2015-02-11 10:57:54 +11:00
parent 04cf3f3f9d
commit ac2dfced36

View File

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