LuaObject constructor
Default constructor for some lua object. The variable name
in scope will become id and can have either fields or
value but not both.
Implementation
LuaObject(this.id, {LuaTable? fields, Object? value})
: _value = value,
_fields = fields,
assert(
(value == null || fields == null),
'''A lua object's storage can either be a value or
a set of fields if it should become a table, but it
cannot have both!
''',
);