private void generateFor(ForNode node)
            throws IRException {

        try {
            scopes.enterBlock();

            generate(node.initialization);
            csi.conditionLabel.setIndex(code.nextIndex());
            Operand condition = generate(node.expression);

            csi.renew();

            Label block = new Label();

            code.addStatement(
                new IfGoToStatement(condition, block, csi.endOfBlockLabel)
            );
            block.setIndex(code.nextIndex());

            generate(node.block);
            generate(node.step);
            code.addStatement(new GoToStatement(csi.conditionLabel));
            csi.endOfBlockLabel.setIndex(code.nextIndex());

            scopes.leaveBlock();
        } catch(IRException ex) {
            throw ex;
        } catch(Exception ex) {
            throw (NonGenerationException)new NonGenerationException(ex)
                    .Log("ru.bmstu.iu9.compiler.ir");
        }
    }