use of net.jangaroo.jooc.ast.Declaration in project jangaroo-tools by CoreMedia.
the class JsCodeGenerator method visitClassBody.
@Override
public void visitClassBody(ClassBody classBody) throws IOException {
out.writeSymbolWhitespace(classBody.getLBrace());
boolean inStaticInitializerBlock = false;
for (Directive directive : classBody.getDirectives()) {
final boolean isStaticInitializer = directive instanceof Statement && !(directive instanceof Declaration);
if (isStaticInitializer) {
inStaticInitializerBlock = beginStaticInitializer(out, inStaticInitializerBlock);
} else {
inStaticInitializerBlock = endStaticInitializer(out, inStaticInitializerBlock);
}
directive.visit(this);
}
endStaticInitializer(out, inStaticInitializerBlock);
out.writeSymbolWhitespace(classBody.getRBrace());
}
Aggregations