private VariableOperand generateLeftHandValue(BaseNode node)
            throws IRException {

        try {
            switch(node.nodeType()) {
                case VARIABLE:
                {
                    VariableLeaf l = (VariableLeaf) node;

                    return
                        new NamedVariableOperand(varTable, varTable.get(l.name));
                }
                case BINARY_OPERATION:
                {
                    BinaryOperationNode o = (BinaryOperationNode) node;

                    switch(o.operation()) {
                        case ARRAY_ELEMENT:
                            return generateArrayIndex(o);
                        case MEMBER_SELECT:
                            return generateStructField(o);
                        default:
                            throw
                                new InvalidLeftHandValueException(o.operation())
                                    .initPosition(o.dInfo.position);
                    }
                }
                case UNARY_OPERATION:
                {
                    UnaryOperationNode o = (UnaryOperationNode) node;

                    if (o.is(UnaryOperationNode.Operation.DEREF)) {
                        if(o.node.is(UnaryOperationNode.Operation.DEREF)) {
                            TmpVariableOperand tmp =
                                new TmpVariableOperand(o.node.realType(), varTable);

                            code.addStatement(
                                new UnaryOperationStatement(
                                    tmp,
                                    generateLeftHandValue(o.node),
                                    UnaryOperationStatement.Operation.DEREF
                                )
                            );

                            return tmp;
                        } else {
                            generate(o.node);
                        }
                    } else {
                        throw new InvalidLeftHandValueException(o.operation())
                                .initPosition(o.dInfo.position);
                    }
                }
                default:
                    throw new InvalidLeftHandValueException(
                        node.nodeType(),
                        new Position(-1, -1, -1)
                    );
            }
        } catch(IRException ex) {
            throw ex;
        } catch(Exception ex) {
            throw (NonGenerationException)new NonGenerationException(ex)
                    .Log("ru.bmstu.iu9.compiler.ir");
        }
    }