1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-01-20 03:29:51 +02:00
ferret/pkg/compiler/listener.go

15 lines
350 B
Go
Raw Normal View History

2018-09-18 16:42:38 -04:00
package compiler
import (
"github.com/antlr/antlr4/runtime/Go/antlr"
"github.com/pkg/errors"
)
type errorListener struct {
*antlr.DefaultErrorListener
}
2018-10-05 17:20:48 -04:00
func (d *errorListener) SyntaxError(_ antlr.Recognizer, _ interface{}, line, column int, msg string, _ antlr.RecognitionException) {
2018-09-18 16:42:38 -04:00
panic(errors.Errorf("%s at %d:%d", msg, line, column))
}