Crate wagon_macros
source ·Expand description
Procedural macros for use in the WAGon suite of libraries.
It would make more sense to put these in the wagon-utils
crate.
But Rust does not allow use to export procedural macros and regular functions from the same crate. So here we are.
Macros§
- Automatically return a parse error if an unexpected token is encountered.
- Given a hand-written, complete [
wagon-parser::Wag
] without any Span information, creates a proper one with dummy Span data.
Attribute Macros§
- A procedural macro to extend lexers from a base lexer. Used by
wagon-lexer::math::Math
andwagon-lexer::productions::Productions
. - Given a struct/enum with
wagon-parser::SpannableNode
fields, creates constructors which do not require anySpannableNode
wrapping.
Derive Macros§
- Derive macro for the
wagon-parser::helpers::TokenMapper
trait. - Automatically derive this operation for
wagon-value::Valueable
types. - Automatically derive this operation for
wagon-value::Valueable
types. - Automatically derive this operation for
wagon-value::Valueable
types. - Automatically derive all value operations
- Automatically derive this operation for
wagon-value::Valueable
types. - Automatically derive this operation for
wagon-value::Valueable
types. - Automatically derive this operation for
wagon-value::Valueable
types.