• Make a Matcher that always succeeds and makes a value with provided function without consuming input.

    Use emit if you want to emit the same value every time.

    Use action if you only need a side effect.

    Use token if you want to make a value based on an input token.

    Type Parameters

    • TToken

    • TOptions

    • TValue

    Parameters

    • f: ((data: Data<TToken, TOptions>, i: number) => TValue)

      A function to get the value.

        • (data: Data<TToken, TOptions>, i: number): TValue
        • Parameters

          • data: Data<TToken, TOptions>

            Data object (tokens and options).

          • i: number

            Parser position in the tokens array.

          Returns TValue

    Returns Matcher<TToken, TOptions, TValue>

Generated using TypeDoc