Derive Macro Grammar

Source
#[derive(Grammar)]
{
    // Attributes available to this derive:
    #[rule]
}
Expand description

Derive macro for Grammar

Every Symbol must have a #[rule(process_func, symbol *)] attribute. process_func is a closure that specifies how data should be extracted from the symbols consumed in this rule. symbols are any amount of variants of this enum making up this rule. See https://en.wikipedia.org/wiki/Formal_grammar for more info. The first variant with a #[rule] attribute always is the starting symbol of the grammar

ยงPanics

Panics if any attributes are invalid