| 83 | } |
| 84 | |
| 85 | func (p *Parser) parseFiles(fset *token.FileSet, f *ast.File, files []models.Path) ([]*ast.File, error) { |
| 86 | pkg := f.Name.String() |
| 87 | var fs []*ast.File |
| 88 | for _, file := range files { |
| 89 | ff, err := parser.ParseFile(fset, string(file), nil, 0) |
| 90 | if err != nil { |
| 91 | return nil, fmt.Errorf("other file parser.ParseFile: %v", err) |
| 92 | } |
| 93 | if name := ff.Name.String(); name != pkg { |
| 94 | continue |
| 95 | } |
| 96 | fs = append(fs, ff) |
| 97 | } |
| 98 | return fs, nil |
| 99 | } |
| 100 | |
| 101 | func (p *Parser) parseFunctions(fset *token.FileSet, f *ast.File, fs []*ast.File, src []byte) []*models.Function { |
| 102 | ul, el := p.parseTypes(fset, fs) |