#[parser]
Expand description
§parser macro
This macro should only be attached onto type aliases when defining parsing rules or their components. The behaviour is expected to be like normal type aliases, but it fixes the compiler defects that fail to handle recursive type definitions and arbitary const generic types.
This is used when:
- It contains recursive parser rules.
- It contains inline const arguments.
§Usage
ⓘ
#[parser]
type MyRule = Some<Combinators>;
When dealing with recursive parser rules, input/output types should be specified:
ⓘ
#[parser(Input, Output)]
type MyRule = Some<Recursive<Combinators>>;