Predicate analysis for where clauses and predicate combinators.
Transforms predicate expressions (where, all-of, any-of, none-of) from RawAST into CoreAST representations used for filtering collections.
Summary
Functions
@spec analyze_pred_comb(atom(), list(), (list() -> {:ok, list()} | {:error, term()})) :: {:ok, term()} | {:error, term()}
Analyzes a predicate combinator (all-of, any-of, none-of).
Takes the combinator kind, arguments, and an analyzer function for the predicates.
@spec analyze_where(list(), (term() -> {:ok, term()} | {:error, term()})) :: {:ok, term()} | {:error, term()}
Analyzes a where expression.
Takes the arguments to a where form and an analyzer function for nested values.
Forms
(where field)- truthy check on field(where field op value)- comparison using op