parser

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedDir

type ParsedDir struct {
	// FileSet is the token.FileSet that was used to parse the directory. This
	// is used to get filenames from an AST node.
	FileSet *token.FileSet
	// ModulePath is the name of the module that is defined in a go.mod file.
	// This is used to resolve imports within the same module.
	ModulePath string
	ModuleRoot string
	// Packages is the return value of parser.ParseDir, where the map key is the
	// package name and the map value is the AST of the whole package (which is
	// a directory in Go).
	Packages map[string]*ast.Package
}

type Parser

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

func New

func New(root string) *Parser

func (*Parser) Parse

func (p *Parser) Parse(dir string) (*ParsedDir, error)

Jump to

Keyboard shortcuts

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