lang: Plumb data and unification strategy through the lang struct

This adds some plumbing to pass values into the lang struct.
This commit is contained in:
James Shubin
2024-03-30 17:25:20 -04:00
parent cede7e5ac0
commit ddf1be653e
7 changed files with 73 additions and 16 deletions

View File

@@ -137,7 +137,10 @@ func runInterpret(t *testing.T, code string) (_ *pgraph.Graph, reterr error) {
lang := &Lang{
Fs: fs,
Input: "/" + interfaces.MetadataFilename, // start path in fs
Debug: testing.Verbose(), // set via the -test.v flag to `go test`
Data: &Data{
UnificationStrategy: make(map[string]string), // empty
},
Debug: testing.Verbose(), // set via the -test.v flag to `go test`
Logf: logf,
}
if err := lang.Init(ctx); err != nil {