Skip to main content

reject_parser_keyword_name

Function reject_parser_keyword_name 

Source
pub fn reject_parser_keyword_name(
    working_set: &mut StateWorkingSet<'_>,
    name: &str,
    kind: &str,
    span: Span,
) -> bool
Expand description

If name is a parser keyword, records ParseError::NameIsKeyword and returns true.

kind is embedded in the error (e.g. "command" or "alias"). Callers should abort the definition when this returns true.