Skip to main content

identifier

Function identifier 

Source
pub fn identifier<'i>(input: &mut Input<'i>) -> PResult<&'i str>
Expand description

Parse an identifier: a word that is not a keyword.

Returns the borrowed slice — no allocation on parse (or on backtrack). Call sites that store the name in the AST take ownership there with .map(str::to_string).