272k members in the playrust community. The largest community for the game RUST. A central place for discussion, media, news and more.
A library that allows proc_macro function-like macros to be parsed usingthe combine parser combinator crate.
When writing a
#[proc_macro_derive] the input is Rust source code which iswell supported by the
syn crate. However, when writing a
#[proc_macro]macro, it is common to want to define a custom domain specific language.
This crate allows you to write a parser for your DSL using the
combineparser combinator library. It also preserves the source span informationin the parsed result such that
rustc can provide correct source locationsfor identifiers and literals that are re-used in the output.
This is a basic example using base
parser! macro can help remove boilerplate.
A proc macro must be defined at the crate root within the
Utilities to generate diagnostic error messages.
Wrappers and transforms to around
A collection of parsers for
A macro to remove the generics boilerplate when defining parsers.
A word of Rust code, which may be a keyword or legal variable name.
A literal string (