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::Mathandwagon-lexer::productions::Productions. - new_
unspanned - Given a struct/enum with
wagon-parser::SpannableNodefields, creates constructors which do not require anySpannableNodewrapping.
Derive Macros§
- Token
Mapper - Derive macro for the
wagon-parser::helpers::TokenMappertrait. - Value
Add - Automatically derive this operation for
wagon-value::Valueabletypes. - Value
Div - Automatically derive this operation for
wagon-value::Valueabletypes. - Value
Mul - Automatically derive this operation for
wagon-value::Valueabletypes. - Value
Ops - Automatically derive all value operations
- Value
Pow - Automatically derive this operation for
wagon-value::Valueabletypes. - Value
Rem - Automatically derive this operation for
wagon-value::Valueabletypes. - Value
Sub - Automatically derive this operation for
wagon-value::Valueabletypes.