This adds an improved "expr if" which only adds the active branch to the graph and removes the "secret" channel.
24 lines
465 B
Plaintext
24 lines
465 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: exprif -> exprIfSubgraphOutput # dummy
|
|
Edge: os.is_family_debian -> exprif # condition
|
|
Vertex: const: str("hello")
|
|
Vertex: exprIfSubgraphOutput
|
|
Vertex: exprif
|
|
Vertex: os.is_family_debian
|