Implemented const keyword
This commit is contained in:
@ -10,8 +10,9 @@ import (
|
||||
)
|
||||
|
||||
// Scan scans the list of files.
|
||||
func Scan(files []string) (<-chan *fs.File, <-chan *core.Function, <-chan *types.Struct, <-chan error) {
|
||||
func Scan(files []string) (chan *core.Constant, <-chan *fs.File, <-chan *core.Function, <-chan *types.Struct, <-chan error) {
|
||||
scanner := Scanner{
|
||||
constants: make(chan *core.Constant),
|
||||
files: make(chan *fs.File),
|
||||
functions: make(chan *core.Function),
|
||||
structs: make(chan *types.Struct),
|
||||
@ -22,11 +23,12 @@ func Scan(files []string) (<-chan *fs.File, <-chan *core.Function, <-chan *types
|
||||
scanner.queueDirectory(filepath.Join(config.Library, "mem"), "mem")
|
||||
scanner.queue(files...)
|
||||
scanner.group.Wait()
|
||||
close(scanner.constants)
|
||||
close(scanner.files)
|
||||
close(scanner.functions)
|
||||
close(scanner.structs)
|
||||
close(scanner.errors)
|
||||
}()
|
||||
|
||||
return scanner.files, scanner.functions, scanner.structs, scanner.errors
|
||||
return scanner.constants, scanner.files, scanner.functions, scanner.structs, scanner.errors
|
||||
}
|
||||
|
Reference in New Issue
Block a user