JLocal local, JExpression value) {
return new JDeclarationStatement(info, new JLocalRef(info, local), value);
}
private JField createEnumValueMap(JEnumType type) {
SourceInfo sourceInfo = type.getSourceInfo().makeChild(
JavaASTGenerationVisitor.class, "enum value lookup map");
JsonObject map = new JsonObject(sourceInfo, program.getJavaScriptObject());
for (JEnumField field : type.getEnumList()) {
// JSON maps require leading underscores to prevent collisions.
JStringLiteral key = program.getLiteralString(field.getSourceInfo(),