Files
mgmt/lang/interpret_test/TestAstFunc3/value-resource0.txtar
James Shubin d022d7f09e engine: resources: Rename the value field in value resource
Having a different name makes it more obvious, and also leaves us open
to add a string or bool field for more explicit typing.
2023-11-18 15:15:33 -05:00

26 lines
718 B
Plaintext

-- main.mcl --
value "hello1" {
#any => 42, # can be any type
any => "wow", # can be any type
}
value "hello2" {
any => "whatever", # TODO: remove the temporary placeholder here
#any => "", # XXX: remove any placeholder to see the bug when absent
}
test "test" {
#anotherstr => "", # get it from send/recv
}
Value["hello1"].any -> Value["hello2"].any
Value["hello2"].any -> Test["test"].anotherstr
-- OUTPUT --
Edge: value[hello1] -> value[hello2] # value[hello1] -> value[hello2]
Edge: value[hello2] -> test[test] # value[hello2] -> test[test]
Field: test[test].AnotherStr = "wow"
Field: value[hello1].Any = "wow"
Field: value[hello2].Any = "wow"
Vertex: test[test]
Vertex: value[hello1]
Vertex: value[hello2]