[−][src]Macro pear::macros::switch
switch!() { /* proc-macro */ }
Invoked much like match, except each condition must be a parser, which is executed, and the corresponding arm is executed only if the parser succeeds. Once a condition succeeds, no other condition is executed.
ⓘThis example is not tested
switch! { parser() => expr, x@parser1() | x@parser2(a, b, c) => expr(x), _ => last_expr }