Skip to main content

Crate carbon_proc_macros

Crate carbon_proc_macros 

Source
Expand description

Procedural macros backing Carbon’s instruction-decoder collection pattern.

§Components

  • instruction_decoder_collection! — function-like macro that generates a sum-type enum over many program decoders plus its InstructionDecoderCollection impl, dispatching on program_id.
  • InstructionType — derive macro that emits a sibling *Type enum (variant tags only) and a get_instruction_type accessor on the source enum.

Macros§

instruction_decoder_collection
Generate a sum-type instruction enum over multiple program decoders along with its InstructionDecoderCollection impl.

Derive Macros§

InstructionType
Derive a sibling *Type enum (variant tags only) and a get_instruction_type(&self) -> *Type accessor on the annotated enum.