Expand description
Macro authoring and expansion: the LispMacro contract, macro objects, the
registry-backed expander, and shape constructors for macro syntax.
Structs§
- MacroCx
- Expansion context passed to macros: the evaluation context, current phase, environment, expansion budget, and the active macro stack.
- Macro
Expansion Limits - Bounds that stop runaway macro expansion.
- Macro
Object - Runtime object wrapping a macro and whether its parser output is trusted.
- Native
Expr Macro - Macro implemented by a native Rust expansion function.
- Registry
Macro Expander - Macro expander that resolves macros through the context registry, bounded by configurable expansion limits.
- Source
Template Macro - Macro defined in source by a template expression instantiated from captures.
Traits§
- Lisp
Macro - Contract for an expandable macro: its name, its syntax shape, and the expansion that rewrites a matched form into a new expression.
Functions§
- expand_
expr - Fully expands macros in an expression within a macro context.
- list_
macro_ shape - Builds a list shape with a fixed head symbol followed by the given tail.
- list_
macro_ shape_ with_ rest - Builds a list shape with a fixed head and tail plus a trailing rest shape.
- literal_
head_ shape - Builds a shape matching an exact head symbol, for macro syntax.
- macro_
value - Boxes a macro into a value, trusting its parser output.
- macro_
value_ with_ parser_ trust - Boxes a macro into a value with an explicit parser-trust flag.
- macroexpand_
function - Builds the
macroexpandfunction object that expands a quoted expression. - positional_
macro_ shape - Builds a macro syntax shape that captures named positional parameters and an optional rest parameter after the head symbol.
- register_
macro - Registers a macro in the context, trusting its parser, and returns its id.
- register_
macro_ with_ parser_ trust - Registers a macro with an explicit parser-trust flag and returns its id.
Type Aliases§
- Native
Macro Impl - Signature of a native macro expansion function.