import type { Dialect } from "../dialect.js"; /** * Per-dialect tuning for the ATN candidate walk (`collectCandidates`). * * - `preferredRules`: parser rule indices that denote a *name* slot (identifier / column / * table reference). When the walk reaches the caret about to enter one of these rules it * records the rule (instead of descending to enumerate every keyword/identifier token the * name could start with) — the editor then resolves that slot with schema-aware names. * - `ignoredTokens`: token types never worth offering as a literal candidate (EOF, etc.). */ export interface CompletionConfig { preferredRules: Set; ignoredTokens: Set; /** Subset of `preferredRules` reached at a TABLE / relation-name position (post-FROM). When the * walk's recorded rules intersect this set, complete() offers schema table names. */ tableRules: Set; /** Subset of `preferredRules` reached at a COLUMN / value-expression position (SELECT/WHERE/…). * When the walk's rules intersect this set, complete() offers scope columns + function names. */ columnRules: Set; /** Lexer token types that introduce a relation in a FROM/JOIN clause. Used by the broken-input * FROM-relation fallback: when a mid-edit statement mis-parses (e.g. an empty projection makes * the grammar read `SELECT FROM t` as `SELECT FROM AS t`, so the scope has no source), complete() * scans the token stream for ` ` and surfaces those tables' schema columns. */ relationKeywordTokens: Set; /** Lexer token types that can be a relation NAME after a relation keyword (plain / quoted ident). */ nameTokens: Set; } export declare const COMPLETION_CONFIG: Record;