rustre_parser::parser::ident

Function parse_id_any

Source
pub fn parse_id_any<'slice, 'src>(
    input: Input<'slice, 'src, LustreLang>,
) -> IResult<'slice, 'src, LustreLang, ParserError, ParserError>
Expand description

Parses an Lv6Id or an Lv6IdRef wrapped in an IdNode, with an optional pragma

This parser should be used when parsing any ID, even when only one of the two types should actually be used. This makes the parser more lax and allows for better diagnostics.

ยงTolerated syntax errors

  • Pragma after Lv6IdRef, when it should only occur after an Lv6Id
  • This parser is supposed to be called every time an Lv6Id or Lv6IdRef is expected, even if only one of those is actually valid