Debian Codegraph @

lang/interpret_test/TestAstFunc2/class-include-as-func1.txtar

raw
1 -- main.mcl --
2 class c1($b) {
3 test "t1" {}
4 if $b {
5 test "t2" {}
6 } else {
7 test "t3" {}
8 }
9 func f1() {
10 if $b {
11 "hello"
12 } else {
13 "goodbye"
14 }
15 }
16 }
17 include c1(true) as i1
18 include c1(false) as i2
19
20 test [i1.f1(),] {}
21 test [i2.f1(),] {}
22 -- OUTPUT --
23 Vertex: test[hello]
24 Vertex: test[goodbye]
25 Vertex: test[t1]
26 Vertex: test[t2]
27 Vertex: test[t3]