parser

package
v0.0.0-...-f7b6625 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPackageOrFileNotLoaded = errors.New("could not load package of file")
	ErrBuildPackageFail       = errors.New("could not create build package")
	ErrGetFileABSFail         = errors.New("could not absolute the file path")
)

Functions

func ParseAndTypeCheckFile

func ParseAndTypeCheckFile(file string, flags ...string) (*ast.File, *token.FileSet, *types.Package, *types.Info, error)

ParseAndTypeCheckFile parses and type-checks the given file, and returns everything interesting about the file. If a fatal error is encountered the error return argument is not nil.

func ParseFile

func ParseFile(file string) (*ast.File, *token.FileSet, error)

ParseFile parses the content of the given file and returns the corresponding ast.File node and its file set for positional information. If a fatal error is encountered the error return argument is not nil.

func ParseSource

func ParseSource(data interface{}) (*ast.File, *token.FileSet, error)

ParseSource parses the given source and returns the corresponding ast.File node and its file set for positional information. If a fatal error is encountered the error return argument is not nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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