private Node expression() {
        if (!(currentToken instanceof Identifier)) {
            return compare();
        }
        Node node = compare();
        if (node.getType() == NodeType.VARIABLE && currentToken == Symbol.ASSIGN) {
            nextToken();
            node = assign((VariableNode) node, expression());
            String name = ((AssignNode) node).getVariable().getName();
            if (!variables.hasVariable(name)) {
                variables.addVariable(name, TypesAnalyzer.inferType(((AssignNode) node).getValue()));
            }
        }
        return node;
    }