util

package
v3.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TransformPanicToError

func TransformPanicToError(err *error, input, ctxStr string, errorListener VisitErrorListener)

Types

type SimpleErrorListener

type SimpleErrorListener struct {
	// contains filtered or unexported fields
}

func NewSimpleErrorListener

func NewSimpleErrorListener() *SimpleErrorListener

func (*SimpleErrorListener) ErrorCount

func (l *SimpleErrorListener) ErrorCount() int

func (*SimpleErrorListener) GetErrors

func (l *SimpleErrorListener) GetErrors() []string

func (*SimpleErrorListener) ReportAmbiguity

func (l *SimpleErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs *antlr.ATNConfigSet)

func (*SimpleErrorListener) ReportAttemptingFullContext

func (l *SimpleErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs *antlr.ATNConfigSet)

func (*SimpleErrorListener) ReportContextSensitivity

func (l *SimpleErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs *antlr.ATNConfigSet)

func (*SimpleErrorListener) ReportPanicError added in v3.6.0

func (l *SimpleErrorListener) ReportPanicError(err error)

func (*SimpleErrorListener) ReportVisitError

func (l *SimpleErrorListener) ReportVisitError(ctx antlr.ParserRuleContext, err error)

func (*SimpleErrorListener) SyntaxError

func (l *SimpleErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)

type VisitErrorListener

type VisitErrorListener interface {
	ReportVisitError(ctx antlr.ParserRuleContext, err error)
	ReportPanicError(err error)
	ErrorCount() int
	GetErrors() []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL