use of net.jangaroo.jooc.config.DebugMode in project jangaroo-tools by CoreMedia.
the class JsCodeGenerator method visitAssignmentOpExpr.
@Override
public void visitAssignmentOpExpr(AssignmentOpExpr assignmentOpExpr) throws IOException {
if (assignmentOpExpr.getOp().sym == sym.ANDANDEQ || assignmentOpExpr.getOp().sym == sym.OROREQ) {
assignmentOpExpr.getArg1().visit(this);
out.writeSymbolWhitespace(assignmentOpExpr.getOp());
out.writeToken("=");
// TODO: refactor for a simpler way to switch off white-space temporarily:
JoocConfiguration options = (JoocConfiguration) out.getOptions();
DebugMode mode = options.getDebugMode();
options.setDebugMode(null);
assignmentOpExpr.getArg1().visit(this);
options.setDebugMode(mode);
out.writeToken(assignmentOpExpr.getOp().sym == sym.ANDANDEQ ? "&&" : "||");
out.writeToken("(");
assignmentOpExpr.getArg2().visit(this);
out.writeToken(")");
} else {
visitBinaryOpExpr(assignmentOpExpr);
}
}
Aggregations