public override LuaObject Add(StackFrame stackFrame, LuaObject obj) { if (metatable == null) { return(vm.nil); } else if (metatable.status != Status.Dict) { return(vm.nil); } else if (metatable.Count == 0) { return(vm.nil); } else { var table = obj as LuaTable; if (table == null) { return(vm.nil); } else { var add = (LuaDictItem)metatable.GetProperty(vm.GetString("__add")); if (Equals(add.value, vm.nil)) { return(vm.nil); } else { var func = add.value as LuaFunction; if (func == null) { return(vm.nil); } else { func.Call(stackFrame, new LuaObject[] { this, table }); return(stackFrame.PopResult()); } } } } }
public LuaObject Call(Module module) { module.Call(stackFrame); return(stackFrame.PopResult()); }