14 lines
413 B
Rust
14 lines
413 B
Rust
//! This crate provides procedural macros for the nix-js project.
|
|
use proc_macro::TokenStream;
|
|
|
|
mod ir;
|
|
|
|
/// A procedural macro to reduce boilerplate when defining an Intermediate Representation (IR).
|
|
///
|
|
/// It generates an enum for the IR, along with `Ref` and `Mut` variants,
|
|
/// `From` implementations, and a `ToIr` trait.
|
|
#[proc_macro]
|
|
pub fn ir(input: TokenStream) -> TokenStream {
|
|
ir::ir_impl(input)
|
|
}
|