import { Lexeme } from "../models/Lexeme";
import { ValueComponent, TypeValue } from "../models/ValueComponent";
export declare class FunctionExpressionParser {
    /**
     * Aggregate functions that support internal ORDER BY clause
     */
    private static readonly AGGREGATE_FUNCTIONS_WITH_ORDER_BY;
    private static readonly SQL_JSON_CONSTRUCTORS;
    private static readonly QUANTIFIED_COMPARISON_FUNCTIONS;
    /**
     * Parse ARRAY expressions - handles both ARRAY[...] (literal) and ARRAY(...) (query) syntax
     * @param lexemes Array of lexemes to parse
     * @param index Current parsing index
     * @returns Parsed array expression and new index
     */
    private static parseArrayExpression;
    static parseFromLexeme(lexemes: Lexeme[], index: number): {
        value: ValueComponent;
        newIndex: number;
    };
    static tryParseBinaryExpression(lexemes: Lexeme[], index: number, left: ValueComponent, allowAndOperator?: boolean, allowOrOperator?: boolean): {
        value: ValueComponent;
        newIndex: number;
    } | null;
    static parseBetweenExpression(lexemes: Lexeme[], index: number, value: ValueComponent, negated: boolean): {
        value: ValueComponent;
        newIndex: number;
    };
    /**
     * Parse the upper bound of a BETWEEN expression with logical operator precedence
     * This stops parsing when it encounters AND/OR operators at the same level
     */
    private static parseBetweenUpperBound;
    private static parseFunctionCall;
    private static isSubqueryArgumentStart;
    private static parseSubqueryArgumentWithComments;
    /**
     * Captures SQL/JSON constructor arguments as RawString while preserving closing
     * comments via getClosingComments. Empty argument lists still use ValueList.
     * Tracking structured AST support: https://github.com/mk3008/rawsql-ts/issues/866
     */
    private static parseRawFunctionArguments;
    private static parseKeywordFunction;
    private static parseNullsTreatment;
    static parseTypeValue(lexemes: Lexeme[], index: number): {
        value: TypeValue;
        newIndex: number;
    };
    /**
     * Parse WITHIN GROUP (ORDER BY ...) clause
     * @param lexemes Array of lexemes to parse
     * @param index Current parsing index (should point to "WITHIN GROUP")
     * @returns Parsed OrderByClause and new index
     */
    private static parseWithinGroupClause;
    private static parseFilterClause;
    /**
     * Parse arguments for aggregate functions that support internal ORDER BY
     * Handles patterns like: string_agg(expr, separator ORDER BY sort_expr)
     * @param lexemes Array of lexemes to parse
     * @param index Current parsing index (should point to opening parenthesis)
     * @returns Parsed arguments, ORDER BY clause, closing parenthesis comments, and new index
     */
    private static parseAggregateArguments;
    /**
     * Parse function arguments and capture closing parenthesis comments
     * @param lexemes Array of lexemes to parse
     * @param index Current parsing index (should point to opening parenthesis)
     * @returns Parsed arguments, closing parenthesis comments, and new index
     */
    private static parseArgumentWithComments;
    /**
     * Normalize closing parenthesis comments to preserve positioned and legacy comment metadata.
     */
    private static getClosingComments;
}
