Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IGrammarValidatorErrorMessageProvider

Implementing this interface enables customizing grammar validation errors when using custom APIs.

Hierarchy

  • IGrammarValidatorErrorMessageProvider

Index

Methods

buildAlternationAmbiguityError

  • buildAlternationAmbiguityError(options: { alternation: Alternation; ambiguityIndices: number[]; prefixPath: TokenType[]; topLevelRule: Rule }): string

buildAlternationPrefixAmbiguityError

  • buildAlternationPrefixAmbiguityError(options: { alternation: Alternation; ambiguityIndices: number[]; prefixPath: TokenType[]; topLevelRule: Rule }): string

buildDuplicateFoundError

buildDuplicateRuleNameError

  • buildDuplicateRuleNameError(options: { grammarName: string; topLevelRule: Rule | string }): string

buildEmptyAlternationError

  • buildEmptyAlternationError(options: { alternation: Alternation; emptyChoiceIdx: number; topLevelRule: Rule }): any

buildEmptyRepetitionError

buildInvalidRuleNameError

  • buildInvalidRuleNameError(options: { expectedPattern: RegExp; topLevelRule: Rule }): string
  • deprecated
    • There are no longer constraints on Rule names
              This method will be removed from the interface in future versions.
              Providing it will currently have no impact on the runtime.

    Parameters

    • options: { expectedPattern: RegExp; topLevelRule: Rule }
      • expectedPattern: RegExp
      • topLevelRule: Rule

    Returns string

buildLeftRecursionError

  • buildLeftRecursionError(options: { leftRecursionPath: Rule[]; topLevelRule: Rule }): string

buildNamespaceConflictError

  • buildNamespaceConflictError(topLevelRule: Rule): string

buildTokenNameError

  • buildTokenNameError(options: { expectedPattern: RegExp; tokenType: TokenType }): any
  • deprecated
    • There are no longer constraints on Token names
              This method will be removed from the interface in future versions.
              Providing it will currently have no impact on the runtime.

    Parameters

    • options: { expectedPattern: RegExp; tokenType: TokenType }
      • expectedPattern: RegExp
      • tokenType: TokenType

    Returns any

buildTooManyAlternativesError

  • buildTooManyAlternativesError(options: { alternation: Alternation; topLevelRule: Rule }): string

Generated using TypeDoc