errors

package
v0.0.0-...-378ff37 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LALexerError

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

LA Lexer Error Struct, agregates the line number and the original error message of type RecognitionException where utilities are defined.

func NewLALexerError

func NewLALexerError() *LALexerError

Creates a new LALexerError

func NewLASyntaxError

func NewLASyntaxError() *LALexerError

Creates a new LALexerError

func (LALexerError) Error

func (l LALexerError) Error() string

Raises all three possible errors: 1. comment not closed 2. string not closed 3. Symbol not identified

type LALexerErrorListener

type LALexerErrorListener struct {
	*antlr.DefaultErrorListener
	Errors []error
}

A wrapper for lexer errors in the LA language

func NewLALexerErrorListener

func NewLALexerErrorListener() *LALexerErrorListener

Creates a new LALexerErrorListener

func (*LALexerErrorListener) SyntaxError

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

Raises a lexer error to the error listener. The parsing stops if an error is raised.

type LASyntaxError

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

LA Syntax Error Struct, agregates the line number and an object of type RecognitionException where utilities are defined.

func (LASyntaxError) Error

func (c LASyntaxError) Error() string

type LASyntaxErrorListener

type LASyntaxErrorListener struct {
	*antlr.DefaultErrorListener
	Errors []error
}

A wrapper for syntax errors in the LA language

func NewLASyntaxErrorListener

func NewLASyntaxErrorListener() *LASyntaxErrorListener

Creates a new LASyntaxErrorListener

func (*LASyntaxErrorListener) SyntaxError

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

Raises a lexer error to the error listener. The parsing stops if an error is raised.

Jump to

Keyboard shortcuts

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