pub fn parameter<'a, I>(
input: I,
indexer: &mut usize,
) -> IResult<I, Parameter<I>, Error<I>>Expand description
Parses a parameter as defined in the grammar spec.
§Grammar
parameter = '{', name*, '}'
name = (- name-to-escape) | ('\', name-to-escape)
name-to-escape = '{' | '}' | '(' | '/' | '\'§Example
{}
{name}
{with spaces}
{escaped \/\{\(}
{no need to escape )}
{🦀}§Errors
§Recoverable Error
- If
inputdoesn’t start with{.
§Irrecoverable Failure.
EscapedNonReservedCharacter.NestedParameter.OptionalInParameter.UnescapedReservedCharacter.UnfinishedParameter.
§Indexing
The given indexer is incremented only if the parsed Parameter is
returned.