UNPKG

rawsql-ts

Version:

[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.

30 lines (29 loc) 1.16 kB
import { Lexeme } from "../models/Lexeme"; import { ValueComponent, TypeValue } from "../models/ValueComponent"; export declare class FunctionExpressionParser { /** * 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): { value: ValueComponent; newIndex: number; } | null; static parseBetweenExpression(lexemes: Lexeme[], index: number, value: ValueComponent, negated: boolean): { value: ValueComponent; newIndex: number; }; private static parseFunctionCall; private static parseKeywordFunction; static parseTypeValue(lexemes: Lexeme[], index: number): { value: TypeValue; newIndex: number; }; }