Skip to content

Commit

Permalink
Merge pull request #3 from garfeng/master
Browse files Browse the repository at this point in the history
fix:parse cgo files
  • Loading branch information
wzshiming authored Jun 21, 2022
2 parents 2b98f20 + f139ee4 commit d4247d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ func (i *Importer) Import(path string, src string) (Type, error) {
m[v] = true
}

for _, v := range imp.CgoFiles {
m[v] = true
}

p, err := goparser.ParseDir(i.fset, dir, func(fi os.FileInfo) bool {
return m[fi.Name()]
}, i.mode)
Expand Down

0 comments on commit d4247d8

Please sign in to comment.