28 lines
512 B
Plaintext
28 lines
512 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: str("bbb") -> if # a
|
|
Edge: const: str("ccc") -> if # b
|
|
Vertex: FuncValue
|
|
Vertex: call
|
|
Vertex: const: str("bbb")
|
|
Vertex: const: str("ccc")
|
|
Vertex: const: str("hello")
|
|
Vertex: if
|