Macro obj

Source
macro_rules! obj {
    {} => { ... };
    (@key $key:literal) => { ... };
    (@key $key:ident) => { ... };
    (@key $key:expr) => { ... };
    (@set $json:ident ($($key:tt)+) ($($val:tt)+)) => { ... };
    (@set_and_continue $json:ident ($($key:tt)+) ($($val:tt)+) ($($rest:tt)+)) => { ... };
    (@set_and_continue $json:ident ($($key:tt)+) ($($val:tt)+)) => { ... };
    (@next_value $json:ident ($($key:tt)+) ($($rest:tt)+)) => { ... };
    (@next_key $json:ident ($key:ident, $($rest:tt)+)) => { ... };
    (@next_key $json:ident ($key:ident)) => { ... };
    (@next_key $json:ident ($key:literal: $($rest:tt)+)) => { ... };
    (@next_key $json:ident ($key:ident: $($rest:tt)+)) => { ... };
    (@next_key $json:ident ([$key:expr] : $($rest:tt)+)) => { ... };
    (@flat_expr_or_continue $json:ident (...{$($val:tt)*}, $($rest:tt)*)) => { ... };
    (@flat_expr_or_continue $json:ident (...{$($val:tt)*})) => { ... };
    (@flat_expr_or_continue $json:ident (...$val:expr , $($rest:tt)*)) => { ... };
    (@flat_expr_or_continue $json:ident (...$val:expr)) => { ... };
    (@flat_expr_or_continue $json:ident ($($rest:tt)*)) => { ... };
    {$($tt:tt)*} => { ... };
}