pub fn parse(
i: &str,
field_naming_scheme: FieldNamingScheme,
) -> Result<Vec<RouteParserToken<'_>>, PrettyParseError<'_>>
Expand description
Parse a matching string into a vector of RouteParserTokens.
The parsing logic involves using a state machine. After a token is read, this token is fed into the state machine, causing it to transition to a new state or throw an error. Because the tokens that can be parsed in each state are limited, errors are not actually thrown in the state transition, due to the fact that erroneous tokens can’t be fed into the transition function.
This continues until the string is exhausted, or none of the parsers for the current state can parse the current input.