Implemented expression parsing

This commit is contained in:
Eduard Urbach 2024-06-16 16:57:33 +02:00
parent 864c9c7b43
commit ef16bdb4c7
No known key found for this signature in database
GPG key ID: C874F672B1AF20C0
18 changed files with 618 additions and 99 deletions

View file

@ -17,7 +17,7 @@ func Scan(files []string) (<-chan *Function, <-chan error) {
errors := make(chan error)
go func() {
scan(files, functions, errors)
scanFiles(files, functions, errors)
close(functions)
close(errors)
}()
@ -25,8 +25,8 @@ func Scan(files []string) (<-chan *Function, <-chan error) {
return functions, errors
}
// scan scans the directory without channel allocations.
func scan(files []string, functions chan<- *Function, errors chan<- error) {
// scanFiles scans the list of files without channel allocations.
func scanFiles(files []string, functions chan<- *Function, errors chan<- error) {
wg := sync.WaitGroup{}
for _, file := range files {