Debian Codegraph @

lang/interpret_test/TestAstFunc2/structlookup2.txtar

raw
1 -- main.mcl --
2 $st0 struct{x str} = struct{x => "hello",}
3 $name0 = $st0->x
4 test "${name0}" {}
5
6 $st1 = struct{y => "world",}
7 $name1 = $st1->y
8 test "${name1}" {}
9
10 $st2 = struct{x => true, y => 42, z => "hello world",}
11 $name2 = $st2->z
12 test "${name2}" {}
13 test "foo" {
14 mixedstruct => struct{
15 somebool => true,
16 somestr => "hi",
17 someint => 42,
18 somefloat => 1.0,
19 },
20 }
21 -- OUTPUT --
22 Vertex: test[foo]
23 Vertex: test[hello world]
24 Vertex: test[hello]
25 Vertex: test[world]