refactor: move ConstructPatterns into compiler package

ConstructPatterns was never used except during compilation, so it
makes sense to have it closer where it is used. We could consider
making it even private function, as the pattern table construction
is quite specific to how compiler compiles and probably not that
reusable elsewhere.
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2023-10-19 12:38:18 +03:00
parent e010b2da9d
commit e28891abd5
3 changed files with 7 additions and 7 deletions

View File

@ -91,7 +91,7 @@ func (com *Compiler) Song(song *sointu.Song) (map[string]string, error) {
if err != nil {
return nil, fmt.Errorf(`could not encode patch: %v`, err)
}
patterns, sequences, err := vm.ConstructPatterns(song)
patterns, sequences, err := ConstructPatterns(song)
if err != nil {
return nil, fmt.Errorf(`could not encode song: %v`, err)
}