class IfInstructionFactory extends InstructionFactory {
    @Override
    public boolean createInstruction(ExpressRunner expressRunner, InstructionSet result,
        Stack<ForRelBreakContinue> forStack, ExpressNode node, boolean isRoot) throws Exception {<FILL_FUNCTION_BODY>}
}

        ExpressNode[] oldChildren = node.getChildrenArray();
        if (oldChildren.length < 2) {
            throw new QLCompileException("if 操作符至少需要2个操作数 ");
        } else if (oldChildren.length > 5) {
            throw new QLCompileException("if 操作符最多只有5个操作数 ");
        }
        ExpressNode[] children = new ExpressNode[3];
        int point = 0;
        for (ExpressNode oldChild : oldChildren) {
            if (oldChild.isTypeEqualsOrChild("then")
                || oldChild.isTypeEqualsOrChild("else")
                || oldChild.isTypeEqualsOrChild("?")
                || oldChild.isTypeEqualsOrChild(":")) {
                continue;
            }
            children[point] = oldChild;
            point = point + 1;
        }
        if (point == 2) {
            children[2] = new ExpressNode(expressRunner.getNodeTypeManager().findNodeType("STAT_BLOCK"), null);
        }

        //condition
        boolean r1 = expressRunner.createInstructionSetPrivate(result, forStack, children[0], false);
        InstructionGoToWithCondition goToFalseBody = new InstructionGoToWithCondition(false, 0, true);
        goToFalseBody.setLine(node.getLine());
        result.addInstruction(goToFalseBody);
        int conditionEndPoint = result.getCurrentPoint();

        //true
        boolean r2 = expressRunner.createInstructionSetPrivate(result, forStack, children[1], false);
        InstructionGoTo goToEnd = new InstructionGoTo(0);
        goToEnd.setLine(node.getLine());
        result.addInstruction(goToEnd);
        goToFalseBody.setOffset(result.getCurrentPoint() - conditionEndPoint + 1);

        int trueBodyEndPoint = result.getCurrentPoint();

        //false
        boolean r3 = expressRunner.createInstructionSetPrivate(result, forStack, children[2], false);
        goToEnd.setOffset(result.getCurrentPoint() - trueBodyEndPoint + 1);
        return r1 || r2 || r3;
    
<methods>public non-sealed void <init>() ,public abstract boolean createInstruction(com.ql.util.express.ExpressRunner, com.ql.util.express.InstructionSet, Stack<com.ql.util.express.instruction.ForRelBreakContinue>, com.ql.util.express.parse.ExpressNode, boolean) throws java.lang.Exception,public static com.ql.util.express.instruction.InstructionFactory getInstructionFactory(java.lang.String) <variables>private static final Map<java.lang.String,com.ql.util.express.instruction.InstructionFactory> INSTRUCTION_FACTORY_MAP