[−][src]Macro parze::rule
rule!() { /* proc-macro */ }
A macro to define parser rules.
Operators
Listed in order of precedence
Syntax | Name | Description |
---|---|---|
~ x | before padding | Equivalent to x.before_padding() |
x ~ | after padding | Equivalent to x.after_padding() |
x * | any | Equivalent to x.repeat(..) |
x + | at least one | Equivalent to x.repeat(1..) |
x ? | optional | Equivalent to x.or_not() |
x .% | chained | Equivalent to x.chained() |
x .# | flatten | Equivalent to x.flatten() |
x .@ | link | Equivalent to x.link() |
x ... y | separated | Equivalent to x.separated_by(y) |
x & y | then | Equivalent to x.then(y) |
x % y | chain | Equivalent to x.chain(y) |
x | % y | or chain |
x -& y | delimiter for | Equivalent to x.delimiter_for(y) |
x &- y | delimited by | Equivalent to x.delimited_by(y) |
x -> Y | to | Equivalent to x.to(y) |
x => F | map | Equivalent to x.map(F) |
x <: F | reduce left | Equivalent to x.reduce_left(F) |
x :> F | reduce right | Equivalent to x.reduce_right(F) |
x | y | or | Equivalent to x.or(y) |
{ X } | expr | Considers X to be a Rust expression |