func (p *Package) Parse() error {
	if len(p.Files) != 0 {
		return nil
	}

	// Load the AST.
	// TODO: do this in parallel.
	if p.ImportPath == "unsafe" {
		// Special case for the unsafe package. Don't even bother loading
		// the files.
		p.Pkg = types.Unsafe
		return nil
	}

	files, err := p.parseFiles()
	if err != nil {
		return err
	}
	p.Files = files

	return nil
}
// Parse parses and typechecks this package.
//
// Idempotent.
Parse parses and typechecks this package.

Idempotent.
// Parse parses and typechecks this package . // // Idempotent .
func (p *Package) Parse() error {
	if len(p.Files) != 0 {
		return nil
	}
	if p.ImportPath == "unsafe" {
		p.Pkg = types.Unsafe
		return nil
	}
	files, err := p.parseFiles()
	if err != nil {
		return err
	}
	p.Files = files
	return nil
}
func ( p * Package ) Parse ( ) error { if len ( p . Files ) != 0 { return nil } if p . ImportPath == " " { p . Pkg = types . Unsafe return nil } files , err := p . parseFiles ( ) if err != nil { return err } p . Files = files return nil }
Parse parses and typechecks this package.
Parse parses and typechecks this package .
// Load the AST. // TODO: do this in parallel. // Special case for the unsafe package. Don't even bother loading // the files.