checker

package
v1.17.7 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(tree *parser.Tree, config *conf.Config) (reflect.Type, error)

Check calls Check on a disposable Checker.

func FieldIndex added in v1.15.8

func FieldIndex(c *Cache, env Nature, node ast.Node) (bool, []int, string)

func IsFastFunc added in v1.15.8

func IsFastFunc(fn reflect.Type, method bool) bool

func MethodIndex added in v1.15.8

func MethodIndex(c *Cache, env Nature, node ast.Node) (bool, int, string)

func ParseCheck added in v1.16.8

func ParseCheck(input string, config *conf.Config) (*parser.Tree, error)

ParseCheck parses input expression and checks its types. Also, it applies all provided patchers. In case of error, it returns error with a tree.

func TypedFuncIndex added in v1.15.8

func TypedFuncIndex(fn reflect.Type, method bool) (int, bool)

Types

type Checker added in v1.17.7

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

func (*Checker) Check added in v1.17.7

func (v *Checker) Check(tree *parser.Tree, config *conf.Config) (reflect.Type, error)

Check checks types of the expression tree. It returns type of the expression and error if any. If config is nil, then default configuration will be used.

func (*Checker) PatchAndCheck added in v1.17.7

func (v *Checker) PatchAndCheck(tree *parser.Tree, config *conf.Config) (reflect.Type, error)

PatchAndCheck applies all patchers and checks the tree.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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