// Parse parse from filename, and returns ast.File
Parse parse from filename, and returns ast.File
// Parse parse from filename and returns ast . File
func ParseFile(filename string, mode Mode) (*ast.File, error) {
	file, err := ioutil.ReadFile(filename)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to read file: %s", filename)
	}
	f, err := ParseBytes(file, mode)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to parse")
	}
	f.Name = filename
	return f, nil
}
func ParseFile ( filename string , mode Mode ) ( * ast . File , error ) { file , err := ioutil . ReadFile ( filename ) if err != nil { return nil , errors . Wrapf ( err , " " , filename ) } f , err := ParseBytes ( file , mode ) if err != nil { return nil , errors . Wrapf ( err , " " ) } f . Name = filename return f , nil }
Parse parse from filename, and returns ast.File
Parse parse from filename and returns ast . File