Files
mgmt/lang/interpret_test/TestAstFunc1/importscope2.txtar
James Shubin d24149518c util: distro: Refactor family and distro code
I hate writing abstraction code like this, but I'm hoping it will be
useful.
2024-10-15 20:36:50 -04:00

28 lines
450 B
Plaintext

-- main.mcl --
import "second.mcl"
include second.xclass
-- second.mcl --
import "fmt"
class xclass {
import "os" # we can also use a scoped local import
$aaa = if os.is_family_debian() { "bbb" } else { "ccc" }
print "${aaa}" {
msg => "hello",
}
}
-- OUTPUT --
Edge: FuncValue -> call # fn
Edge: call -> if # c
Edge: const -> if # a
Edge: const -> if # b
Vertex: FuncValue
Vertex: call
Vertex: const
Vertex: const
Vertex: const
Vertex: if