Macro pear_codegen::switch[][src]

switch!() { /* proc-macro */ }
Expand description

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.

switch! {
    parser() => expr,
    x@parser1() | x@parser2(a, b, c) => expr(x),
    _ => last_expr
}