use of com.google.javascript.jscomp.parsing.parser.trees.ComputedPropertyFieldTree in project closure-compiler by google.
the class Parser method parseFieldDefinition.
private ParseTree parseFieldDefinition(PartialClassElement partial) {
ParseTree initializer = null;
if (peek(TokenType.EQUAL)) {
initializer = parseInitializer(Expression.NORMAL);
}
eatPossiblyImplicitSemiColon();
if (partial.getName() != null) {
checkState(partial.getNameExpr() == null);
return new FieldDeclarationTree(getTreeLocation(partial.start), partial.getName(), partial.isStatic, initializer);
} else {
return new ComputedPropertyFieldTree(getTreeLocation(partial.start), partial.getNameExpr(), partial.isStatic, initializer);
}
}
Aggregations