Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ILexerErrorMessageProvider

Hierarchy

  • ILexerErrorMessageProvider

Index

Methods

buildUnableToPopLexerModeMessage

  • buildUnableToPopLexerModeMessage(token: IToken): string
  • Unable To Pop Lexer Mode Error happens when lexer tries to pop the last remaining mode from the mode stack so that there is no longer any active lexer mode This error only relevant for multi-mode lexers

    Parameters

    • token: IToken

      The Token that requested pop mode.

    Returns string

buildUnexpectedCharactersMessage

  • buildUnexpectedCharactersMessage(fullText: string, startOffset: number, length: number, line?: number, column?: number): string
  • An Unexpected Character Error occurs when the lexer is unable to match a range of one or more characters in the input text against any of the Token Types in it's Lexer definition

    Parameters

    • fullText: string

      Full original input text.

    • startOffset: number

      Offset in input text where error starts.

    • length: number

      Error length.

    • Optional line: number

      Line number where the error occured. (optional) Will not be provided when lexer is not defined to track lines/columns

    • Optional column: number

      Column number where the error occured. (optional) Will not be provided when lexer is not defined to track lines/columns

    Returns string

Generated using TypeDoc