cli: add -noDump flug
This commit is contained in:
parent
22fe72467f
commit
876c5845d9
4
main.go
4
main.go
@ -17,9 +17,11 @@ import (
|
||||
|
||||
var wg sync.WaitGroup
|
||||
var usePhp5 *bool
|
||||
var noDump *bool
|
||||
|
||||
func main() {
|
||||
usePhp5 = flag.Bool("php5", false, "use PHP5 parserWorker")
|
||||
noDump = flag.Bool("noDump", false, "disable dumping to stdout")
|
||||
flag.Parse()
|
||||
|
||||
pathCh := make(chan string)
|
||||
@ -85,6 +87,7 @@ func printer(result <-chan parser.Parser) {
|
||||
fmt.Println(e)
|
||||
}
|
||||
|
||||
if !*noDump {
|
||||
nsResolver := visitor.NewNamespaceResolver()
|
||||
parserWorker.GetRootNode().Walk(nsResolver)
|
||||
|
||||
@ -96,6 +99,7 @@ func printer(result <-chan parser.Parser) {
|
||||
NsResolver: nsResolver,
|
||||
}
|
||||
parserWorker.GetRootNode().Walk(dumper)
|
||||
}
|
||||
wg.Done()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user