Function findNextFeatures

  • Calculates any features that can follow the given feature stack. This also includes features following optional features and features from previously called rules that could follow the last feature.

    Parameters

    • featureStack: NextFeature<GrammarAST.AbstractElement>[][]

      A stack of features starting at the entry rule and ending at the feature of the current cursor position.

    • unparsedTokens: IToken[]

      All tokens which haven't been parsed successfully yet. This is the case when we call this function inside an alternative.

    Returns NextFeature[]

    Any AbstractElement that could be following the given feature stack.