macro_rules! impl_parse_one_subkeyword {
{
$ty:ident $( < $O:ident > )?:
$( ( $($spec:tt)+ ) ),* $(,)?
} => { ... };
{ @ $bind:tt @ $exp:ident } => { ... };
{ @ $bind:tt @ $exp:literal: . $($field:tt)+ } => { ... };
{ @ ($self:expr, $got:expr, $ps:expr) @ .. $($substruct:tt)+ } => { ... };
{ @@ ($self:expr, $got:expr, $ps:expr) @ $exp:expr, .$($field:tt)+ } => { ... };
}Expand description
Implements ParseOneSubkeyword for the use of ParseUsingSubkeywords
Input syntax is TYPE: (SUBKEYWORD-SPEC), (SUBKEYWORD-SPEC), ...
where each SUBKEYWORD-SPEC is one of:
(field): recognises"field"and stores inself.field.("subkw": .field): recognises"subkw"(..substruct): callsself.substruct.process_one_keyword, thereby incorporating the sub-structure’s subkeywords
You can write TYPE<O>: ...
which results in
impl<O: SubstParseContext> ... for TYPE<O>.