UNPKG

rawsql-ts

Version:

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

23 lines (22 loc) 828 B
import { Lexeme, TokenType } from "../models/Lexeme"; import { ValueComponent } from "../models/ValueComponent"; export declare class ValueParser { static parse(query: string): ValueComponent; /** * Parse from lexeme array with logical operator controls */ static parseFromLexeme(lexemes: Lexeme[], index: number, allowAndOperator?: boolean, allowOrOperator?: boolean): { value: ValueComponent; newIndex: number; }; /** * Parse expressions with operator precedence handling * Uses precedence climbing algorithm */ private static parseExpressionWithPrecedence; private static parseItem; static parseArgument(openToken: TokenType, closeToken: TokenType, lexemes: Lexeme[], index: number): { value: ValueComponent; newIndex: number; }; }