Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emoun/eager
Rust crate for eager macro expansion
https://github.com/emoun/eager
crate eager macros rust rust-library
Last synced: about 1 month ago
JSON representation
Rust crate for eager macro expansion
- Host: GitHub
- URL: https://github.com/emoun/eager
- Owner: Emoun
- License: mit
- Created: 2018-07-07T19:23:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-24T14:01:19.000Z (almost 5 years ago)
- Last Synced: 2024-10-31T11:25:21.615Z (about 2 months ago)
- Topics: crate, eager, macros, rust, rust-library
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eager
[![Build Status](https://travis-ci.org/Emoun/eager.svg?branch=master)](https://travis-ci.org/Emoun/eager)
[![](http://meritbadge.herokuapp.com/eager)](https://crates.io/crates/eager)
[![](https://docs.rs/eager/badge.svg)](https://docs.rs/eager)Rust crate for simulating eager macro expansion.
### Example
```Rust
#[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.