eager

Crates.ioeager
lib.rseager
version0.1.0
sourcesrc
created_at2018-07-07 21:31:15.67194
updated_at2018-07-07 21:31:15.67194
descriptionCrate for eager macro expansion.
homepage
repositoryhttps://github.com/Emoun/eager
max_upload_size
id73256
size58,218
Emad Jacob Maroun (Emoun)

documentation

README

eager

Build Status

Rust crate for simulating eager macro expansion.

Example

#[macro_use]
extern crate eager;

//Declare an eager macro
eager_macro_rules!{ $eager_1
    macro_rules! plus_1{
        ()=>{+ 1};
    }
}

fn main(){
	// Use the macro inside an eager! call to expand it eagerly
	assert_eq!(4, eager!{2 plus_1!() plus_1!()});
}

License

Licensed under the MIT license.

Commit count: 7

cargo fmt