Examples using... parser.ParseFile()

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.
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.
This example demonstrates how to inspect the AST of a Go program.