parser

package
v0.0.0-...-4415e05 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MPL-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(pos ast.Pos, format string, args ...interface{}) error

func ExpectationError

func ExpectationError(wanted string, got *scanner.Token) error

func Parse

func Parse(ch <-chan *scanner.Token) (ast.Node, error)

func TokenErrorf

func TokenErrorf(token *scanner.Token, format string, args ...interface{}) error

TokenErrorf is a convenient wrapper around Errorf that uses the position of the given token.

Types

type ParseError

type ParseError struct {
	Message string
	Pos     ast.Pos
}

func (*ParseError) Error

func (e *ParseError) Error() string

func (*ParseError) String

func (e *ParseError) String() string

Jump to

Keyboard shortcuts

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