Files
mgmt/lang/interpret_test/TestAstFunc1/importscope0.txtar
James Shubin 2b820da311 lang: ast: structs, funcs: structs: Exprif without a channel
This adds an improved "expr if" which only adds the active branch to the
graph and removes the "secret" channel.
2025-08-04 17:45:06 -04:00

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