1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00
ferret/pkg/compiler/listener.go
2018-09-18 16:42:38 -04:00

15 lines
373 B
Go

package compiler
import (
"github.com/antlr/antlr4/runtime/Go/antlr"
"github.com/pkg/errors"
)
type errorListener struct {
*antlr.DefaultErrorListener
}
func (d *errorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException) {
panic(errors.Errorf("%s at %d:%d", msg, line, column))
}