PtcRunner.Lisp.CoreAST (PtcRunner v0.4.1)
View SourceCore, validated AST for PTC-Lisp.
This module defines the type specifications for the intermediate representation that the analyzer produces. The interpreter evaluates CoreAST to produce results.
Pipeline
source → Parser → RawAST → Analyze → CoreAST → Eval → result
Summary
Types
@type field_path() :: {:field, [field_segment()]}
@type t() :: literal() | {:vector, [t()]} | {:map, [{t(), t()}]} | {:set, [t()]} | {:var, atom()} | {:ctx, atom()} | {:call, t(), [t()]} | {:let, [binding()], t()} | {:if, t(), t(), t()} | {:fn, fn_params(), t()} | {:do, [t()]} | {:and, [t()]} | {:or, [t()]} | {:where, field_path(), where_op(), t() | nil} | {:pred_combinator, :all_of | :any_of | :none_of, [t()]} | {:return, t()} | {:fail, t()} | {:builtin_call, String.t(), t()} | {:ctx_call, atom(), [t()]} | {:def, atom(), t()} | {:loop, [binding()], t()} | {:recur, [t()]}
@type where_op() ::
:eq | :not_eq | :gt | :lt | :gte | :lte | :includes | :in | :truthy