testing

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddErr

func AddErr(errs *[]error, idx int, operation string, reason error) error

func CheckTokens

func CheckTokens(tokens []*slgr.Token, expecteds ...string) error

func LexerTest

func LexerTest(lexer *sllx.Lexer, idx int, arg LexerArg) error

func LinkTokens

func LinkTokens(tokens []*slgr.Token) []*slgr.Token

func NewErrTestFailed

func NewErrTestFailed(idx int, operation string, reason error) error

func ParserTest

func ParserTest(parser slpx.Parser, arg ParserArgs) error

Types

type ErrTestFailed

type ErrTestFailed struct {
	Idx       int
	Operation string
	Reason    error
}

func (ErrTestFailed) Error

func (e ErrTestFailed) Error() string

type LexerArg

type LexerArg struct {
	InputStr  string
	Expecteds []string
}

func NewLexerArg

func NewLexerArg(input_str string, expecteds ...string) LexerArg

type ParserArgs

type ParserArgs struct {
	Tokens    []*slgr.Token
	Expecteds []string
}

func NewParserArgs

func NewParserArgs(tokens []*slgr.Token, expecteds ...string) ParserArgs

Jump to

Keyboard shortcuts

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