Debian Codegraph @

lang/interpret_test/TestAstFunc2/definition-site-scope.txtar

raw
1 -- main.mcl --
2 $x = "top-level"
3 func f1() {
4 $x + "1"
5 }
6 $f2 = func() {
7 $x + "2"
8 }
9 $call_f1 = func($x) {
10 f1() + $x
11 }
12 $call_f2 = func($x) {
13 $f2() + $x
14 }
15 $name1 = $call_f1("!")
16 $name2 = $call_f2("?")
17 test "${name1}" {}
18 test "${name2}" {}
19 -- OUTPUT --
20 Vertex: test[top-level1!]
21 Vertex: test[top-level2?]