@Override
    public List<AssemblyLine> generate(Context context)
    {
        final List<AssemblyLine> lines = Lists.newLinkedList();
        
        if (Compiler.debug)
        {
            lines.add(new Comment("Start condition"));
        }
        if (children.size() == 1)
        {
            context.setValue("condTermInstruction",
                    context.getValue("condInstruction"));
            ConditionTerm term = (ConditionTerm) children.get(0);
            lines.addAll(term.generate(context));
        }
        else
        {
            boolean first = true;
            String trueLabel = context.getUniqueId("or-chain-true");
            String falseLabel = context.getUniqueId("or-chain-false");
            context.setValue("condTermInstruction", new Instruction(Opcode.SET,
                    new RegisterAccess("PC"), new LabelCall(trueLabel)));
            
            for (int i = 0; i < children.size(); i++)
            {
                AbstractSyntaxNode child = children.get(i);
                if (child instanceof Operation)
                {
                    Operation op = (Operation) child;
                    if (i == 0 || i == children.size() - 1)
                    {
                        Context.error("Unexpected ||");
                    }
                    if (op.getOpType() != Token.OR)
                    {
                        Context.error("Unexpected op " + op.getOpType());
                    }
                    
                    if (first)
                    {
                        AbstractSyntaxNode a = children.get(i - 1);
                        AbstractSyntaxNode b = children.get(i + 1);
                        lines.addAll(a.generate(context));
                        lines.addAll(b.generate(context));
                        first = false;
                    }
                    else
                    {
                        AbstractSyntaxNode factor = children.get(i + 1);
                        lines.addAll(factor.generate(context));
                        lines.add(new Instruction(Opcode.SET,
                                new RegisterAccess("PC"), new LabelCall(
                                        falseLabel)));
                    }
                    lines.add(new Label(trueLabel));
                    lines.add((AssemblyLine) context
                            .getValue("condInstruction"));
                    lines.add(new Label(falseLabel));
                }
            }
        }
        
        return lines;
    }