public Object visit(IfStatement node) {
            Statement thenPart = node.getThenPart();
            Statement elsePart = node.getElsePart();

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

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

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

            elseLabel.setLocation();

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

            endLabel.setLocation();

            return null;
        }