Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IErrorMessageProvider

Hierarchy

  • IErrorMessageProvider

Index

Methods

Optional buildEarlyExitMessage

  • buildEarlyExitMessage(options: object): string
  • An Early Exit Error happens when the parser cannot detect the first mandatory iteration of a repetition. It corresponds to a failed "AT_LEAST_ONE[_SEP]" in Chevrotain DSL terms.

    Parameters

    Returns string

Optional buildMismatchTokenMessage

  • buildMismatchTokenMessage(options: object): string
  • Mismatched Token Error happens when the parser attempted to consume a terminal and failed. It corresponds to a failed "CONSUME(expected)" in Chevrotain DSL terms.

    Parameters

    • options: object
      • actual: IToken

        The actual Token "instance".

      • expected: TokenConstructor

        The expected Token Type.

      • ruleName: string

        The rule in which the error occurred.

    Returns string

Optional buildNoViableAltMessage

  • buildNoViableAltMessage(options: object): string
  • A No Viable Alternative Error happens when the parser cannot detect any valid alternative in an alternation. It corresponds to a failed "OR" in Chevrotain DSL terms.

    Parameters

    Returns string

Optional buildNotAllInputParsedMessage

  • buildNotAllInputParsedMessage(options: object): string
  • A Redundant Input Error happens when the parser has completed parsing but there is still unprocessed input remaining.

    Parameters

    • options: object
      • firstRedundant: IToken

        The first unprocessed token "instance".

      • ruleName: string

        The rule in which the error occurred.

    Returns string

Generated using TypeDoc