Skip to content

Create an easily read/written form for scriptdata #4

@kythyria

Description

@kythyria

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions