summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/src/bin/lua/custom.lua
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-04 22:32:11 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-04 23:25:00 +0100
commit9a7dd0a0770178529c704c08bc446e3533b1f3e5 (patch)
tree2ef6b11f07074c22d44b7f2396e3a96562376974 /lib/tolua++/src/bin/lua/custom.lua
parentMerge pull request #2597 from cuberite/faviconChange (diff)
downloadcuberite-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/custom.lua')
m---------lib/tolua++0
-rw-r--r--lib/tolua++/src/bin/lua/custom.lua45
2 files changed, 0 insertions, 45 deletions
diff --git a/lib/tolua++ b/lib/tolua++
new file mode 160000
+Subproject 9181fc9ef73fa1c052f968d68dc60538f144a47
diff --git a/lib/tolua++/src/bin/lua/custom.lua b/lib/tolua++/src/bin/lua/custom.lua
deleted file mode 100644
index de5912fb3..000000000
--- a/lib/tolua++/src/bin/lua/custom.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-
-function extract_code(fn,s)
- local code = ""
- if fn then
- code = '\n$#include "'..fn..'"\n'
- end
- s= "\n" .. s .. "\n" -- add blank lines as sentinels
- local _,e,c,t = strfind(s, "\n([^\n]-)SCRIPT_([%w_]*)[^\n]*\n")
- while e do
- t = strlower(t)
- if t == "bind_begin" then
- _,e,c = strfind(s,"(.-)\n[^\n]*SCRIPT_BIND_END[^\n]*\n",e)
- if not e then
- tolua_error("Unbalanced 'SCRIPT_BIND_BEGIN' directive in header file")
- end
- end
- if t == "bind_class" or t == "bind_block" then
- local b
- _,e,c,b = string.find(s, "([^{]-)(%b{})", e)
- c = c..'{\n'..extract_code(nil, b)..'\n};\n'
- end
- code = code .. c .. "\n"
- _,e,c,t = strfind(s, "\n([^\n]-)SCRIPT_([%w_]*)[^\n]*\n",e)
- end
- return code
-end
-
-function preprocess_hook(p)
-end
-
-function preparse_hook(p)
-end
-
-function include_file_hook(p, filename)
- do return end
---print("FILENAME is "..filename)
- p.code = string.gsub(p.code, "\n%s*SigC::Signal", "\n\ttolua_readonly SigC::Signal")
- p.code = string.gsub(p.code, "#ifdef __cplusplus\nextern \"C\" {\n#endif", "")
- p.code = string.gsub(p.code, "#ifdef __cplusplus\n};?\n#endif", "")
- p.code = string.gsub(p.code, "DECLSPEC", "")
- p.code = string.gsub(p.code, "SDLCALL", "")
- p.code = string.gsub(p.code, "DLLINTERFACE", "")
- p.code = string.gsub(p.code, "#define[^\n]*_[hH]_?%s*\n", "\n")
---print("code is "..p.code)
-end