79
80
// representing the fragments of erroneous source code). Multiple errors
80
81
// are returned via a scanner.ErrorList which is sorted by file position.
82
func ParseFile(fset *token.FileSet, filename string, src interface{}, mode Mode) (*ast.File, error) {
83
func ParseFile(fset *token.FileSet, filename string, src interface{}, mode Mode) (f *ast.File, err error) {
84
85
text, err := readSource(filename, src)
91
112
p.init(fset, filename, text, mode)
104
118
// ParseDir calls ParseFile for the files in the directory specified by path and