aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-10-01 00:42:45 +0000
committerbloodstalker <thabogre@gmail.com>2018-10-01 00:42:45 +0000
commitec0f1d881c9f0da07e57f1c4a307fbc4e96313c2 (patch)
treee249ac1de2941cd49cf5182b0d91803972980765
parentupdate (diff)
downloadluatablegen-ec0f1d881c9f0da07e57f1c4a307fbc4e96313c2.tar.gz
luatablegen-ec0f1d881c9f0da07e57f1c4a307fbc4e96313c2.zip
update
Diffstat (limited to '')
-rwxr-xr-xluatablegen.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/luatablegen.py b/luatablegen.py
index 387108c..868afc0 100755
--- a/luatablegen.py
+++ b/luatablegen.py
@@ -664,12 +664,13 @@ class TbgParser(object):
cond_node = get_def_node_tag(child.attrib["condition"][6:], parent)
lua_eq_type = get_eq_lua_type(kind.attrib["type"])
push = str()
- if lua_eq_type == "integer": push = child.attrib["name"]+"=luaL_optinteger(__ls,"+repr(rev_counter)+",0);\n"
- elif lua_eq_type == "number":push = child.attrib["name"]+"=lua_tonumber(__ls,"+repr(rev_counter)+");\n"
- elif lua_eq_type == "string":push = child.attrib["name"]+"=lua_tostring(__ls,"+repr(rev_counter)+");\n"
- elif lua_eq_type == "lightuserdata":push = child.attrib["name"]+"=lua_touserdata(__ls,"+repr(rev_counter)+");\n"
- elif lua_eq_type == None:push = child.attrib["name"]+"=lua_touserdata(__ls,"+repr(rev_counter)+");\n"
- else: print("this was not supposed to happen...")
+ #if lua_eq_type == "integer": push = child.attrib["name"]+"=luaL_optinteger(__ls,"+repr(rev_counter)+",0);\n"
+ #elif lua_eq_type == "number":push = child.attrib["name"]+"=lua_tonumber(__ls,"+repr(rev_counter)+");\n"
+ #elif lua_eq_type == "string":push = child.attrib["name"]+"=lua_tostring(__ls,"+repr(rev_counter)+");\n"
+ #elif lua_eq_type == "lightuserdata":push = child.attrib["name"]+"=lua_touserdata(__ls,"+repr(rev_counter)+");\n"
+ #elif lua_eq_type == None:push = child.attrib["name"]+"=lua_touserdata(__ls,"+repr(rev_counter)+");\n"
+ #else: print("this was not supposed to happen...")
+ push = child.attrib["name"]+"=lua_touserdata(__ls,"+repr(rev_counter)+");\n"
dummy += "if (" + cond_node.attrib["name"] + " ==" + kind.text+ ") {"+push+"}\n"
#dummy = "void* " + child.attrib["name"] + "=" + self.gen_luato_generic(struct_name, field_name, rev_counter)
else:
@@ -742,7 +743,7 @@ class TbgParser(object):
elif lua_eq_type == "lightuserdata": push = ""
elif lua_eq_type == None:
type_node = get_def_node_tag(kind.attrib["type"][6:], self.elems)
- print(kind.attrib["type"])
+ #print(kind.attrib["type"])
push = type_node.attrib["name"]+"_push_args(__ls, dummy->"+child.attrib["name"]+");\n"
push += "new_" + type_node.attrib["name"] + "(__ls);\n"
else: print("this was not supposed to happen...")