public Object visit(TernaryExpression node) {
            Expression thenPart = node.getThenPart();
            Expression elsePart = node.getElsePart();
            Expression condition = node.getCondition();

            Label elseLabel = mBuilder.createLabel();
            Label endLabel = mBuilder.createLabel();

            // if elvis relationship (then/condition the same), generate shared
            // statement
            if (thenPart == condition) {
                // create temporary assignment and reference both
                condition = thenPart = createAssignment(condition).getLValue();
            }

            if (thenPart == null) {
                generateBranch(condition, endLabel, true);
            }
            else {
                generateBranch(condition, elseLabel, false);
            }

            if (thenPart != null) {
                generate(thenPart);
                if (elsePart != null) {
                    mBuilder.branch(endLabel);
                }
            }

            elseLabel.setLocation();

            if (elsePart != null) {
                generate(elsePart);
            }

            endLabel.setLocation();

            return null;
        }