Implemented structs

This commit is contained in:
2025-02-04 18:16:31 +01:00
parent 4609a814df
commit 03a3bd8f02
32 changed files with 267 additions and 63 deletions

View File

@ -1,20 +1,25 @@
package scanner
import (
"path/filepath"
"git.akyoto.dev/cli/q/src/config"
"git.akyoto.dev/cli/q/src/core"
"git.akyoto.dev/cli/q/src/fs"
"git.akyoto.dev/cli/q/src/types"
)
// Scan scans the list of files.
func Scan(files []string) (<-chan *fs.File, <-chan *core.Function, <-chan *types.Type, <-chan error) {
func Scan(files []string) (<-chan *fs.File, <-chan *core.Function, <-chan types.Type, <-chan error) {
scanner := Scanner{
files: make(chan *fs.File),
functions: make(chan *core.Function),
types: make(chan *types.Type),
types: make(chan types.Type),
errors: make(chan error),
}
scanner.queueDirectory(filepath.Join(config.Library, "mem"), "mem")
go func() {
scanner.queue(files...)
scanner.group.Wait()