UNPKG

rawsql-ts

Version:

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

18 lines (17 loc) 557 B
import { KeywordTrie } from "../models/KeywordTrie"; export declare enum KeywordMatchResult { NotAKeyword = 0,// "Not recognized as a keyword" PartialOnly = 1,// "Partial match (this will not be the end)" PartialOrFinal = 2,// "Partial or complete match (it can stop here)" Final = 3 } export declare class KeywordParser { private trie; constructor(trie: KeywordTrie); private isEndOfInput; private canParse; parse(input: string, position: number): { keyword: string; newPosition: number; } | null; }