Skip to main content

Module ast

Module ast 

Source
Expand description

Tokenizer and parser: query text → Ast (OR of AND groups).

Structs§

Ast
OR of AND groups: a b | c[[a, b], [c]].

Enums§

ParseError
Reasons parse rejects malformed query text.
Term
A single matchable condition within an AND group of the Ast.

Constants§

FIELDS 🔒

Functions§

has_wildcard 🔒
name_or_path_term 🔒
parse
Tokenize and parse query text into an Ast.
parse_date_period 🔒
One date period → [start, end_exclusive).
parse_date_range 🔒
dm: value → [start, end) civil-date bounds. Forms: 2024, 2024-03, 2024/03/05, a..b, >x, >=x, <x, <=x.
parse_size 🔒
parse_size_range 🔒
size: value → inclusive byte range. Forms: 123, 1kb, 1.5mb, >1gb, >=, <, <=, 1mb..2gb.
read_atom 🔒
Read one atom: up to whitespace or |, honoring quoted sections ("two words", path:"Program Files").
terms_from_atom 🔒
unquote 🔒