pub fn alternative<'a, I>(input: I) -> IResult<I, Alternative<I>, Error<I>>
Expand description
Parses an alternative
as defined in the grammar spec.
§Grammar
alternative = optional | (text-in-alternative+)
text-in-alternative = (- alternative-to-escape)
| ('\', alternative-to-escape)
alternative-to-escape = ' ' | '(' | '{' | '/' | '\'
§Example
text
escaped\ whitespace
no-need-to-escape)}
🦀
(optional)
§Errors
§Irrecoverable Failure
Any Failure
of optional()
.