Documentation ¶
Overview ¶
Package errors contains data structures to report and present errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LexerListener ¶
type LexerListener struct { *antlr.DefaultErrorListener Code string }
LexerListener listens for and formats SyntaxErrors in a way suitable for the antlr Lexer.
func (*LexerListener) SyntaxError ¶
func (l *LexerListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)
SyntaxError is called when the parser encounters a syntax error.
type ParserListener ¶
type ParserListener struct { *antlr.DefaultErrorListener Code string }
ParserListener listens for and formats SyntaxErrors in a way suitable for the antlr Parser.
func (*ParserListener) SyntaxError ¶
func (p *ParserListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)
SyntaxError is called when the parser encounters a syntax error.
type TranspilationError ¶
type TranspilationError struct {
// contains filtered or unexported fields
}
TranspilationError contains information about a transpiler specific error.
func NewTranspilationError ¶
func NewTranspilationError(line, col int, err error) TranspilationError
NewTranspilationError creates a new transpilation error with the given information about the source of the error.
func (TranspilationError) Col ¶
func (w TranspilationError) Col() int
Col returns the column number, in the line of the original Whistle code where the error occurred. 1-based.
func (TranspilationError) Error ¶
func (w TranspilationError) Error() string
func (TranspilationError) Line ¶
func (w TranspilationError) Line() int
Line returns the specific line number in the original Whistle code where the error occurred. 1-based.