Skip to content

Query Runtime โ€‹

src/query/ stages: parser.zig turns S-expressions into flat PatternNodes (groups, fields, captures, quantifiers, anchors) plus interned captures and predicates; matcher.zig runs backtracking descent with per-alternative scratch save/restore; predicate.zig filters matches with equality, substring, and a small built-in regex subset; cursor.zig owns collected matches. Root patterns are tried at every tree node (iterative stack walk); nested patterns require direct children; quantifier repetition is greedy. Invalid query text fails at compile time with positional error kinds โ€” never silently.

Queries, Query Predicates

Released under the MIT License.