23 lines
408 B
Plaintext
23 lines
408 B
Plaintext
-- main.mcl --
|
|
$st0 struct{x str} = struct{x => "hello",}
|
|
test $st0->x {}
|
|
|
|
$st1 = struct{y => "world",}
|
|
test $st1->y {}
|
|
|
|
$st2 = struct{x => true, y => 42, z => "hello world",}
|
|
test $st2->z {}
|
|
test "foo" {
|
|
mixedstruct => struct{
|
|
somebool => true,
|
|
somestr => "hi",
|
|
someint => 42,
|
|
somefloat => 1.0,
|
|
},
|
|
}
|
|
-- OUTPUT --
|
|
Vertex: test[foo]
|
|
Vertex: test[hello world]
|
|
Vertex: test[hello]
|
|
Vertex: test[world]
|