ErrorFormatter
Abstraction for error formatting logic. Instantiate with a custom configuration or override with custom logic.
Value parameters
- expandTabs
-
whether and how tabs in the error input line are to be expanded. The value indicates the column multiples that a tab represents (equals the number of spaces that a leading tab is expanded into). Set to a value < 0 to disable tab expansion.
- showExpected
-
whether a description of the expected input is to be shown
- showFrameStartOffset
-
whether formatted traces should include the frame start offset
- showLine
-
whether the input line with a error position indicator is to be shown
- showPosition
-
whether the error position is to be shown
- showTraces
-
whether the error's rule trace are to be shown
- traceCutOff
-
the maximum number of (trailing) characters shown for a rule trace
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Performs tab expansion as configured by the expandTabs member. The errorColumn as well as the returned Int value are both 1-based.
Performs tab expansion as configured by the expandTabs member. The errorColumn as well as the returned Int value are both 1-based.
Attributes
Formats the given ParseError into a String using the settings configured for this formatter instance.
Formats the given ParseError into a String using the settings configured for this formatter instance.
Attributes
Formats the given ParseError into the given StringBuilder using the settings configured for this formatter instance.
Formats the given ParseError into the given StringBuilder using the settings configured for this formatter instance.
Attributes
Formats the given trace into an "expected" string.
Formats the given trace into an "expected" string.
Attributes
Formats the input line in which the error occurred and underlines the given error's position in the line with a caret.
Formats the input line in which the error occurred and underlines the given error's position in the line with a caret.
Attributes
Formats the input line in which the error occurred and underlines the given error's position in the line with a caret.
Formats the input line in which the error occurred and underlines the given error's position in the line with a caret.
Attributes
Formats what is expected at the error location into a single line String including text padding.
Formats what is expected at the error location into a single line String including text padding.
Attributes
Formats what is expected at the error location into the given StringBuilder including text padding.
Formats what is expected at the error location into the given StringBuilder including text padding.
Attributes
Formats what is expected at the error location as a List of Strings.
Formats what is expected at the error location as a List of Strings.
Attributes
Formats what is expected at the error location into a single line String.
Formats what is expected at the error location into a single line String.
Attributes
Formats what is expected at the error location into the given StringBuilder.
Formats what is expected at the error location into the given StringBuilder.
Attributes
Formats a description of the error's cause into a single line String.
Formats a description of the error's cause into a single line String.
Attributes
Formats a description of the error's cause into the given StringBuilder.
Formats a description of the error's cause into the given StringBuilder.
Attributes
Determines the number of characters to be shown as "mismatched" for the given ParseError.
Determines the number of characters to be shown as "mismatched" for the given ParseError.