module support
Some checks failed
Build / build (push) Successful in 10m22s
Test / build (push) Failing after 15m54s

This commit is contained in:
Chuck Smith
2024-03-26 16:49:38 -04:00
parent 6d234099d1
commit 110152a139
21 changed files with 541 additions and 100 deletions

View File

@@ -1031,6 +1031,18 @@ func TestIteration(t *testing.T) {
runCompilerTests(t, tests)
}
func TestImportExpressions(t *testing.T) {
tests := []compilerTestCase2{
{
input: `import("foo")`,
constants: []interface{}{"foo"},
instructions: "0000 OpConstant 0\n0003 OpLoadModule\n0004 OpPop\n",
},
}
runCompilerTests2(t, tests)
}
func runCompilerTests(t *testing.T, tests []compilerTestCase) {
t.Helper()