goast

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: BSD-3-Clause, MIT Imports: 7 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecoratorResolver added in v0.16.0

type DecoratorResolver struct {
	RestorerResolver resolver.RestorerResolver
	// contains filtered or unexported fields
}

DecoratorResolver is a simple ident resolver that parses the imports block of the file and resolves qualified identifiers using resolved package names. It is not possible to resolve identifiers in dot-imported packages without the full export data of the imported package, so this resolver will return an error if it encounters a dot-import. See gotypes.DecoratorResolver for a dot-imports capable ident resolver.

func New added in v0.16.0

func New() *DecoratorResolver

func WithResolver added in v0.16.0

func WithResolver(resolver resolver.RestorerResolver) *DecoratorResolver

func (*DecoratorResolver) ResolveIdent added in v0.16.0

func (r *DecoratorResolver) ResolveIdent(file *ast.File, parent ast.Node, parentField string, id *ast.Ident) (string, error)

Jump to

Keyboard shortcuts

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