Spectre.Stack.DSL (Spectre v0.3.0)

Copy Markdown View Source

Parser helper for package-local Stack declarations.

Stack keeps package blocks as unexpanded AST. An installable package calls this helper with its own closed vocabulary and receives evaluated arguments without importing package verbs into the Stack or Agent namespace.

Summary

Functions

Compiles a package block into ordered {form, arguments} entries.

Types

arities()

@type arities() :: non_neg_integer() | [non_neg_integer()] | Range.t()

Functions

compile!(block, caller, allowed)

@spec compile!(Macro.t() | nil, Macro.Env.t(), keyword(arities())) :: [
  {atom(), [term()]}
]

Compiles a package block into ordered {form, arguments} entries.