A compiled CEL program — parse once, evaluate many times.
Usage
{:ok, program} = Celixir.compile("x > 10 && y < 20")
{:ok, true} = Celixir.Program.eval(program, %{x: 15, y: 5})
{:ok, false} = Celixir.Program.eval(program, %{x: 5, y: 5})
Summary
Functions
Evaluates the program with the given bindings.
Evaluates the program, raising on error.
Creates a program from a parsed AST, compiling to a native function.
Types
@type t() :: %Celixir.Program{ ast: Celixir.AST.expr(), fun: (Celixir.Environment.t() -> {:ok, any()} | {:error, String.t()}) | nil, source: String.t() }