Expand description
AST nodes for assertion expressions.
Pipeline: text → tokenize_assertion() → Vec<Token> → parse_assertion() → AssertionExpr
The tokenizer (super::tokenizer) is the single source of tokens with exact byte positions.
Precedence (low to high):
pipe (| not)
or
xor
and
binary (==, !=, >, <, contains, matches, …)
unary (!, not, not not, !!)
atom (literal, @plugin, .path, paren)
Enums§
- Assertion
Expr - A complete assertion expression (top-level).
- Binary
Op - Expr
- Atomic expressions (leaf nodes).
- Literal
Functions§
- assertion_
to_ string - Convert AssertionExpr back to string (ternary for if-then-else).
- parse_
assertion - Parse a raw assertion string into an AST.
Falls back to
Rawif parsing fails. - remove_
redundant_ parens - Remove redundant parentheses.