use of net.jangaroo.jooc.ast.IdeExpr in project jangaroo-tools by CoreMedia.
the class JsCodeGenerator method visitApplyExpr.
@Override
public void visitApplyExpr(ApplyExpr applyExpr) throws IOException {
generateFunJsCode(applyExpr);
if (applyExpr.getArgs() != null) {
boolean isAssert = applyExpr.getFun() instanceof IdeExpr && SyntacticKeywords.ASSERT.equals(applyExpr.getFun().getSymbol().getText());
if (isAssert) {
JooSymbol symKeyword = applyExpr.getFun().getSymbol();
out.writeSymbol(applyExpr.getArgs().getLParen());
applyExpr.getArgs().getExpr().visit(this);
out.writeToken(", ");
out.writeString(new File(symKeyword.getFileName()).getName());
out.writeToken(", ");
out.writeInt(symKeyword.getLine());
out.write(", ");
out.writeInt(symKeyword.getColumn());
out.writeSymbol(applyExpr.getArgs().getRParen());
} else {
applyExpr.getArgs().visit(this);
}
}
}