Expand description
Thompson-like NFA construction for query compilation.
Compiles query AST expressions into bytecode IR with symbolic labels. Labels are resolved to concrete StepIds during the layout phase. Member indices use deferred resolution via MemberRef for correct absolute indices.
§Module Organization
The compiler is split into focused modules:
capture: Capture effects handling (Node/Text + Set)expressions: Leaf expression compilation (named/anon nodes, refs, fields, captures)navigation: Navigation mode computation for anchors and quantifiersquantifier: Unified quantifier compilation (*, +, ?)scope: Scope management for struct/array wrapperssequences: Sequence and alternation compilation
Structs§
- Capture
Effects - Capture effects to attach to match instructions.
- Compile
Ctx - Compilation context bundling all shared compilation state.
- Compile
Result - Result of compilation.
- Compiler
- Compiler state for Thompson construction.
Enums§
- Compile
Error - Error during compilation.