private void generateDoWhile(DoWhileNode node)
            throws IRException {

        try {
            scopes.enterBlock();

            Operand condition = generate(node.expression);

            csi.renew();

            Label blockLabel = new Label();
            blockLabel.setIndex(code.nextIndex());

            generate(node.block);

            code.addStatement(
                new IfGoToStatement(
                    condition,
                    blockLabel,
                    csi.endOfBlockLabel
                )
            );

            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");
        }
    }