LuaObject.variable constructor
Constructs a lua object with id for its variable name
in scope with some initial value. Adopts the attribute attr.
Implementation
LuaObject.variable(this.id, Object? value, [this.attr]) : super() {
if (value is LuaFieldsMap) {
_fields = value;
} else if (value is LuaObject) {
this.value = value.deref();
} else {
this.value = value;
}
}