Compare commits
2 Commits
c777bd25b0
...
ecff1d33bb
Author | SHA1 | Date |
---|---|---|
b1ek | ecff1d33bb | |
b1ek | dba8899100 |
12
finder.go
12
finder.go
|
@ -34,6 +34,18 @@ func find(code string) ([]string, error) {
|
|||
}
|
||||
|
||||
ignored, deps := get_ignored_and_deps(code)
|
||||
|
||||
// 1. find function declarations
|
||||
syntax.Walk(f, func(node syntax.Node) bool {
|
||||
switch x := node.(type) {
|
||||
case *syntax.FuncDecl:
|
||||
ignored = append(ignored, x.Name.Value)
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
// 2. collect all commands
|
||||
syntax.Walk(f, func(node syntax.Node) bool {
|
||||
switch x := node.(type) {
|
||||
case *syntax.CallExpr:
|
||||
|
|
Loading…
Reference in New Issue