Type alias Bad<CTX, PROBLEM>Internal

Bad<CTX, PROBLEM>: {
    bag: Bag<CTX, PROBLEM>;
    haveConsumed: boolean;
    kind: "Bad";
}

If a step is Bad it means the parser failed. It contains the new state of the parser, and a problem that describes what went wrong.

The bag is a data structure that contains all the problems that happened during the parsing and what order. It is used to generate error messages.

See

Type Parameters

  • CTX

  • PROBLEM

Type declaration

  • Readonly bag: Bag<CTX, PROBLEM>
  • Readonly haveConsumed: boolean
  • Readonly kind: "Bad"