Implemented const keyword

This commit is contained in:
2025-02-15 14:38:01 +01:00
parent be028a52d1
commit 0a1a8f741d
21 changed files with 164 additions and 26 deletions

View File

@ -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
}