Type alias OperatorInfo<T>

OperatorInfo<T>: {
    apply: ((left, right) => T);
    assoc: Associativity;
    op: Parser<any>;
}

Type Parameters

  • T

Type declaration

  • apply: ((left, right) => T)

    A function that combines the left and right operands. For example: (a, b) => a + b

      • (left, right): T
      • Parameters

        • left: T
        • right: T

        Returns T

  • assoc: Associativity

    Whether the operator is left- or right-associative

  • op: Parser<any>

    A parser that matches the operator (e.g. char("+") or str("**"))

Generated using TypeDoc