@Override
    public Node parseAtom() throws ParsingErrorException {
        switch (currentToken.getType()) {
            case IDENTIFIER:
                Node identifier = new Node(currentToken);

                getToken();

                if (currentToken.hasType(Token.Type.OPEN_BRACKET)) {
                    getToken();

                    Node paramList = parseParamList();

                    MethodCallNode methodCallNode = new MethodCallNode(identifier.getValueToken(), paramList);

                    checkAndPassCurrentToken(Token.Type.CLOSE_BRACKET);

                    return methodCallNode;
                } else {
                    VariableNode variableNode = new VariableNode(identifier.getValueToken().getValue());
                    variableNode.setNodeType(NodeType.VARIABLE_GET);
                    return variableNode;
                }

            case INTEGER_VALUE: {
                ValueNode valueNode = new ValueNode(currentToken);
                valueNode.setValueType(ValueNode.ValueType.INTEGER_VALUE);
                getToken();
                return valueNode;
            }

            case DOUBLE_VALUE: {
                ValueNode valueNode = new ValueNode(currentToken);
                valueNode.setValueType(ValueNode.ValueType.DOUBLE_VALUE);
                getToken();
                return valueNode;
            }

            case MINUS:
                return parseExpression();

            case OPEN_BRACKET:
                getToken();

                Node expression = parseExpression();

                checkAndPassCurrentToken(Token.Type.CLOSE_BRACKET);

                if ( isTokenComparisonOperator(currentToken) ) {
                    Token operation = currentToken;

                    System.out.println(operation);

                    getToken();

                    checkAndPassCurrentToken(Token.Type.OPEN_BRACKET);

                    Node right = parseExpression();

                    checkAndPassCurrentToken(Token.Type.CLOSE_BRACKET);

                    Node result = new Node(operation, expression, right);
                    result.setNodeType(NodeType.EXPRESSION);

                    return result;
                }

                return expression;
        }

        throw new ParsingErrorException("Cannot parse atom: unexpected token " + currentToken);
    }