Skip to main content

Module assertion_ast

Module assertion_ast 

Source
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§

AssertionExpr
A complete assertion expression (top-level).
BinaryOp
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 Raw if parsing fails.
remove_redundant_parens
Remove redundant parentheses.