antlrhandler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReturnErrorListener

type ReturnErrorListener struct {
	*antlr.DefaultErrorListener
	Errs []error
}

ReturnErrorListener allows for the errors to be collected and returned after parsing.

func NewReturnErrorListener

func NewReturnErrorListener() *ReturnErrorListener

NewReturnErrorListener returns a new ReturnErrorListener.

func (*ReturnErrorListener) SyntaxError

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

SyntaxError implements ErrorListener SyntaxError.

type ReturnErrorStrategy

type ReturnErrorStrategy struct {
	*antlr.DefaultErrorStrategy
	Err        error
	ErrContext antlr.ParserRuleContext
	RE         antlr.RecognitionException
}

ReturnErrorStrategy allows for the error to be returned after parsing.

func NewReturnErrorStrategy

func NewReturnErrorStrategy() *ReturnErrorStrategy

NewReturnErrorStrategy returns a new instance of ReturnErrorStrategy.

func (*ReturnErrorStrategy) Recover

func (res *ReturnErrorStrategy) Recover(recognizer antlr.Parser, e antlr.RecognitionException)

Recover implements ErrorStrategy Recover.

func (*ReturnErrorStrategy) RecoverInline

func (res *ReturnErrorStrategy) RecoverInline(recognizer antlr.Parser) antlr.Token

RecoverInline implements ErrorStrategy RecoverInline.

func (*ReturnErrorStrategy) Sync

func (res *ReturnErrorStrategy) Sync(recognizer antlr.Parser)

Sync implements ErrorStrategy Sync.

Jump to

Keyboard shortcuts

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