This adds an improved "expr if" which only adds the active branch to the graph and removes the "secret" channel.
25 lines
496 B
Plaintext
25 lines
496 B
Plaintext
-- main.mcl --
|
|
import "second.mcl"
|
|
|
|
include second.xclass
|
|
-- second.mcl --
|
|
import "os"
|
|
import "fmt"
|
|
|
|
class xclass {
|
|
#import "os" # this should not be required, top-level should be enough
|
|
|
|
$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
|