Expand description
Query parsing and in-memory evaluation. Pure: no git, no I/O.
Grammar lives in ADR 0003. This module turns a query string into a
ScanPlan and decides whether a candidate loop matches it.
Structs§
- Candidate
- A loop as seen by the evaluator. Borrowed to keep
matchesallocation-free. - Resolve
Options - Options for
resolve_plan. - Scan
Plan - The parsed query, derived before any heavy I/O.
Enums§
- Attr
Filter - An attribute filter evaluated in memory after the scan.
- Cmp
- Numeric/temporal comparator for
idle/ahead/behind. - Context
Persistence - Whether an explicit
@token in the query should update persisted config.
Functions§
- context_
persistence_ from_ query - Parses
@usage for config persistence (call afterresolve_plansucceeds). - merge_
scan_ plans - Merges two plans with AND semantics across filters and OR across flags.
- parse
- Parses a query string into a
ScanPlan. Tokens split on whitespace only — a/is literal inside a term. - parse_
duration - Parses
<N><unit>where unit is one of m/h/d/w. - resolve_
plan - Resolves
@contexttokens and default context into a singleScanPlan.