Expand description
Phase-aware completion context.
Walks the tokens of the current statement (text from the previous ;
or buffer start, up to the cursor) through a small state machine.
The resulting Phase is what completion expects next at the
cursor. This is what lets us avoid suggesting SELECT in the middle
of a statement, or suggesting columns where only a table makes sense.
The detector is token-based; it ignores comments and strings.
Enums§
Functions§
- detect
- Walk the tokens to derive the current phase.