Macro flexar::parser

source ·
macro_rules! parser {
    ([[$node:ty] $parxt:ident: $token:ident] $($func:ident {$($($pats:tt),* => $body:tt$end:tt)*} else $else:ident$else_body:tt;)*) => { ... };
    (@req $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident $depth:expr, [$out:ident: $func:expr], $($tail:tt),* => $body:tt$end:tt) => { ... };
    (@req $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident $depth:expr, [$out:ident: $func:expr] => $body:tt$end:tt) => { ... };
    (@req $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident $depth:expr, ($head:ident$($neck:tt)?), $($tail:tt),* => $body:tt$end:tt) => { ... };
    (@req $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident $depth:expr, ($head:ident$($neck:tt)?) => $body:tt$end:tt) => { ... };
    (@body $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident {$($($pats:tt),* => $body:tt$end:tt)*} $((else $else:ident$else_body:tt))? $(;)? | $depth:expr) => { ... };
    (@body $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident ($node:ident$($data:tt)?); | $depth:expr) => { ... };
    (@body $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident ($data:tt); | $depth:expr) => { ... };
    (@body $token:ident $start_pos:ident $parxt:ident $child:ident $last_error:ident [$node:expr]; | $depth:expr) => { ... };
    (@else $start_pos:ident $parxt:ident Err($err:ident $(:$($rest:expr),+)?) $depth:expr) => { ... };
    (@else $start_pos:ident $parxt:ident Ok($else:expr) $depth:expr) => { ... };
    (@else $start_pos:ident $parxt:ident Raw($raw:expr) $depth:expr) => { ... };
    (@else $start_pos:ident $parxt:ident Other($variant:ident $else:expr) $depth:expr) => { ... };
    (@output $variant:ident $rest:tt) => { ... };
    (@output $rest:tt) => { ... };
}
Expand description

Creates a parsing function for a node