Validates and desugars RawAST into CoreAST.
The analyzer transforms the parser's output (RawAST) into a validated, desugared intermediate form (CoreAST) that the interpreter can safely evaluate.
Error Handling
Returns {:ok, CoreAST.t()} on success or {:error, error_reason()} on failure.
Summary
Functions
Returns the canonical list of all forms handled by the analyzer.
Types
Functions
@spec analyze(term()) :: {:ok, PtcRunner.Lisp.CoreAST.t()} | {:error, error_reason()}
@spec supported_forms() :: [atom()]
Returns the canonical list of all forms handled by the analyzer.
These are forms dispatched via dispatch_list_form/4 — special forms,
macros, predicate builders, and control flow that the analyzer intercepts
before the interpreter sees them.
Examples
iex> :let in PtcRunner.Lisp.Analyze.supported_forms()
true
iex> :filter in PtcRunner.Lisp.Analyze.supported_forms()
false