Documentation
¶
Overview ¶
Package listener adds semantic error handling to a standard antlr.DiagnosticListener and conforms to the go error handling infrastructure
Index ¶
- type Diagnostic
- type Listener
- func (el *Listener) Error() string
- func (el *Listener) ErrorCount() int
- func (el *Listener) SemErr(offendingToken antlr.Token, msg string)
- func (el *Listener) SemanticError(line, column int, msg string)
- func (el *Listener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diagnostic ¶
Diagnostic represents a locatable error in an FSE spec
func (Diagnostic) String ¶
func (d Diagnostic) String() string
type Listener ¶
type Listener struct { Path string *antlr.DiagnosticErrorListener Diagnostics []Diagnostic }
Listener records and logs syntax errors produced by the antlr4 parser
func (*Listener) ErrorCount ¶
ErrorCount counts the number of Diagnostic messages
func (*Listener) SemanticError ¶
SemanticError logs a semantic error
func (*Listener) SyntaxError ¶
func (el *Listener) SyntaxError( recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException, )
SyntaxError implements an interface method of antlr.DiagnosticListener
Click to show internal directories.
Click to hide internal directories.