diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-11-04 22:32:11 +0100 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-11-04 23:25:00 +0100 |
commit | 9a7dd0a0770178529c704c08bc446e3533b1f3e5 (patch) | |
tree | 2ef6b11f07074c22d44b7f2396e3a96562376974 /lib/tolua++/src/bin/lua/module.lua | |
parent | Merge pull request #2597 from cuberite/faviconChange (diff) | |
download | cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.gz cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.bz2 cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.lz cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.xz cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.zst cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.zip |
Diffstat (limited to 'lib/tolua++/src/bin/lua/module.lua')
m--------- | lib/tolua++ | 0 | ||||
-rw-r--r-- | lib/tolua++/src/bin/lua/module.lua | 68 |
2 files changed, 0 insertions, 68 deletions
diff --git a/lib/tolua++ b/lib/tolua++ new file mode 160000 +Subproject 9181fc9ef73fa1c052f968d68dc60538f144a47 diff --git a/lib/tolua++/src/bin/lua/module.lua b/lib/tolua++/src/bin/lua/module.lua deleted file mode 100644 index 57dceb7d5..000000000 --- a/lib/tolua++/src/bin/lua/module.lua +++ /dev/null @@ -1,68 +0,0 @@ --- tolua: module class --- Written by Waldemar Celes --- TeCGraf/PUC-Rio --- Jul 1998 --- $Id: $ - --- This code is free software; you can redistribute it and/or modify it. --- The software provided hereunder is on an "as is" basis, and --- the author has no obligation to provide maintenance, support, updates, --- enhancements, or modifications. - - - --- Module class --- Represents module. --- The following fields are stored: --- {i} = list of objects in the module. -classModule = { - classtype = 'module' -} -classModule.__index = classModule -setmetatable(classModule,classContainer) - --- register module -function classModule:register (pre) - pre = pre or '' - push(self) - output(pre..'tolua_module(tolua_S,"'..self.name..'",',self:hasvar(),');') - output(pre..'tolua_beginmodule(tolua_S,"'..self.name..'");') - local i=1 - while self[i] do - self[i]:register(pre..' ') - i = i+1 - end - output(pre..'tolua_endmodule(tolua_S);') - pop() -end - --- Print method -function classModule:print (ident,close) - print(ident.."Module{") - print(ident.." name = '"..self.name.."';") - local i=1 - while self[i] do - self[i]:print(ident.." ",",") - i = i+1 - end - print(ident.."}"..close) -end - --- Internal constructor -function _Module (t) - setmetatable(t,classModule) - append(t) - return t -end - --- Constructor --- Expects two string representing the module name and body. -function Module (n,b) - local t = _Module(_Container{name=n}) - push(t) - t:parse(strsub(b,2,strlen(b)-1)) -- eliminate braces - pop() - return t -end - - |