Function getCrossReferenceTerminal

  • Determines the grammar expression used to parse a cross-reference (usually a reference to a terminal rule). A cross-reference can declare this expression explicitly in the form [Type : Terminal], but if Terminal is omitted, this function attempts to infer it from the name of the referenced Type (using findNameAssignment).

    Returns the grammar expression used to parse the given cross-reference, or undefined if it is not declared and cannot be inferred.

    Parameters

    Returns GrammarAST.AbstractElement | undefined