• Find a single CST node within the given node that corresponds to the specified keyword.

    Parameters

    • node: undefined | CstNode

      A CST node in which to look for keywords. If this is undefined, the result is undefined.

    • keyword: string

      A keyword as specified in the grammar.

    • Optionalindex: number

      If no index is specified or the index is less than zero, the first found node is returned. If the specified index exceeds the number of keyword occurrences, the last found node is returned. Otherwise, the node with the specified index is returned.

    Returns CstNode | undefined