Examples using... token.NewFileSet()
Recent
ExampleMethodSet prints the method sets of various types.
ExampleInfo prints various facts recorded by the type checker in a
types.Info struct: definitions of and references to each named object,
and the type, value, and mode of every expression in the package.
Scan scans the next token and returns the token position, the token,
and its literal string if applicable. The source end is indicated by
token.EOF.
ParseFile parses the source code of a single Go source file and returns
the corresponding ast.File node. The source code may be provided via
the filename of the source file, or via the src parameter.
Node formats node in canonical gofmt style and writes the result to dst.
This example demonstrates how to inspect the AST of a Go program.