Skip to main content

parse_compound_assignment_value

Function parse_compound_assignment_value 

Source
pub fn parse_compound_assignment_value(
    value: &str,
    options: &ParserOptions,
) -> Option<Vec<(Option<Word>, Word)>>
Expand description

Parses text as a compound assignment value, returning its optionally-keyed element words. Returns None if the text is not a well-formed compound value.

This exists so that text which only becomes recognizable as a compound value after expansion can be reinterpreted without reconstructing and re-parsing a whole assignment word.

ยงArguments

  • value - The candidate compound value text, including its enclosing parentheses.
  • options - The parser options to use.