Basic import syntax.

This commit is contained in:
Bob Nystrom
2015-02-14 16:46:00 -08:00
parent bc5a793c41
commit a44d479643
16 changed files with 74 additions and 27 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
// nontest
IO.print("a")
var Shared = "shared".import_("Shared")
import "shared" for Shared
var A = "a " + Shared
IO.print("a done")
+1 -1
View File
@@ -1,5 +1,5 @@
// nontest
IO.print("b")
var Shared = "shared".import_("Shared")
import "shared" for Shared
var B = "b " + Shared
IO.print("b done")
+2 -2
View File
@@ -1,5 +1,5 @@
var A = "a".import_("A")
var B = "b".import_("B")
import "a" for A
import "b" for B
// Shared module should only run once:
// expect: a