Interface Parjser<T>

Interface for parsers that produce result values of type {T}

interface Parjser<out T> {
    expecting: string;
    type: string;
    apply(ps): void;
    debug(fn?): Parjser<T>;
    expects(message): Parjser<T>;
    parse(input, initialState?): ParjsResult<T>;
    pipe<const T1>(cmb1): Parjser<T1>;
    pipe<const T1, const T2>(cmb1, cmb2): Parjser<T2>;
    pipe<const T1, const T2, const T3>(cmb1, cmb2, cmb3): Parjser<T3>;
    pipe<const T1, const T2, const T3, const T4>(cmb1, cmb2, cmb3, cmb4): Parjser<T4>;
    pipe<const T1, const T2, const T3, const T4, const T5>(cmb1, cmb2, cmb3, cmb4, cmb5): Parjser<T5>;
    pipe<const T1, const T2, const T3, const T4, const T5, const T6>(cmb1, cmb2, cmb3, cmb4, cmb5, cmb6): Parjser<T6>;
}

Type Parameters

  • out T

Hierarchy (view full)

Implemented by

Properties

Methods

action

informational

Properties

expecting: string

Methods

  • Returns this parser unchanged, but logs the result of the parse to the console. This is useful for debugging.

    Parameters

    • Optional fn: ParjserDebugFunction

    Returns Parjser<T>

action

informational

type: string

Exposes the display name of the parser. Userful when debugging.