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§
- match_
error - Automatically return a parse error if an unexpected token is encountered.
- unspanned_
tree - Given a hand-written, complete [
wagon-parser::Wag
] without any Span information, creates a proper one with dummy Span data.
Attribute Macros§
- inherit_
from_ base - A procedural macro to extend lexers from a base lexer. Used by
wagon-lexer::math::Math
andwagon-lexer::productions::Productions
. - new_
unspanned - Given a struct/enum with
wagon-parser::SpannableNode
fields, creates constructors which do not require anySpannableNode
wrapping.
Derive Macros§
- Token
Mapper - Derive macro for the
wagon-parser::helpers::TokenMapper
trait. - Value
Add - Automatically derive this operation for
wagon-value::Valueable
types. - Value
Div - Automatically derive this operation for
wagon-value::Valueable
types. - Value
Mul - Automatically derive this operation for
wagon-value::Valueable
types. - Value
Ops - Automatically derive all value operations
- Value
Pow - Automatically derive this operation for
wagon-value::Valueable
types. - Value
Rem - Automatically derive this operation for
wagon-value::Valueable
types. - Value
Sub - Automatically derive this operation for
wagon-value::Valueable
types.