-
Notifications
You must be signed in to change notification settings - Fork 2
Description
There's a few options. A good one is YAML-oid or indeed YAML itself, conditional on finding a parser that shows us references instead of billion-laughs-ing.
Another option is Lua, which requires considerably more effort to make it actually Lua instead of, as it were, LSON. For instance:
return SequenceManager {
variables = id(0, {
{ name="foo", value="0" }
}),
ref(0)
}Unfortunately parsing this by using loadstring with a custom environment sometimes requires a second pass over the result: any time a ref precedes the corresponding id in the evaluation order.
Another option is to extend QML with a ripoff of YAML reference syntax. Can't loadstring it, but:
SequenceManager {
variables: &0 Variables {
{ name: "foo", value: "0" }
}
*0
}Either way this shares with the XML forms a use for an intermediate representation in which label and ref are concepts, so that the code to lower to and raise from those can be shared.