engine: resources: Add new value resource
This is a strange resource which is probably most useful for passing values between scopes. It supports a variant resource field, and should only be used as a last resort and if you know exactly what you're doing.
This commit is contained in:
15
examples/lang/value-resource.mcl
Normal file
15
examples/lang/value-resource.mcl
Normal file
@@ -0,0 +1,15 @@
|
||||
value "hello1" {
|
||||
#value => 42, # can be any type
|
||||
value => "wow", # can be any type
|
||||
}
|
||||
value "hello2" {
|
||||
value => "whatever", # TODO: remove the temporary placeholder here
|
||||
#value => "", # XXX: remove any placeholder to see the bug when absent
|
||||
}
|
||||
|
||||
test "test" {
|
||||
#anotherstr => "", # get it from send/recv
|
||||
}
|
||||
|
||||
Value["hello1"].value -> Value["hello2"].value
|
||||
Value["hello2"].value -> Test["test"].anotherstr
|
||||
Reference in New Issue
Block a user