Parser and AST (@signalql/parser)
The @signalql/parser package exposes:
parse(query: string)→Querytokenize(query: string)for tokenizer debuggingParseErrorfor structured failures
Implementation lives in @signalql/compiler; the standalone parser package gives downstream tools a stable import surface without pulling codegen unless needed.
Stability expectations
- AST node kinds span every spec version — v0.1 (
count,funnel), v0.2 (retrieve,sequence), v0.3 (retrieve_v03,funnel_v03,describe,watch), and v0.4 (graph,reachability,path,trace,context) — and align withschemas/signalql-ast-v0.4.schema.json(current). - Breaking AST changes require a spec minor/major bump and schema revision.
Tests
See packages/parser/test/parser.test.ts and packages/compiler/test/compile.test.ts.