From: John L. <jr...@us...> - 2008-10-25 05:19:00
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25051/wxLua/bindings Modified Files: genwxbind.lua Log Message: Add op_func for () and op_index for [] as %operators Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** genwxbind.lua 24 Oct 2008 04:40:12 -0000 1.171 --- genwxbind.lua 25 Oct 2008 05:18:56 -0000 1.172 *************** *** 1120,1124 **** bindingOperatorTable["="] = "op_set" ! bindingOperatorTable["()"] = "op_cast" bindingOperatorTable["++"] = "op_inc" --- 1120,1125 ---- bindingOperatorTable["="] = "op_set" ! bindingOperatorTable["()"] = "op_func" ! bindingOperatorTable["[]"] = "op_index" bindingOperatorTable["++"] = "op_inc" *************** *** 2393,2399 **** elseif lineState["%operator"] and string.find(tag, "operator", 1, 1) then -- eat the rest of the "operator+=(...)" symbols which may be split before ( ! if (string.sub(tag, -1) == "r") and (lineTags[t+1] == "(") and (lineTags[t+2] == ")") then tag = tag..lineTags[t+1]..lineTags[t+2] - print(tag) t = t + 2 else --- 2394,2399 ---- elseif lineState["%operator"] and string.find(tag, "operator", 1, 1) then -- eat the rest of the "operator+=(...)" symbols which may be split before ( ! if (string.sub(tag, -1) == "r") and (lineTags[t+1] == "(") and (lineTags[t+2] == ")") then -- op_func tag = tag..lineTags[t+1]..lineTags[t+2] t = t + 2 else *************** *** 3756,3763 **** if member["%operator"] then memberPtr = false ! if paramCount == 2 then ! functor = "(*self)"..member["%operator"] ! elseif (paramCount > 2) then functor = "(*self)" else functor = member["%operator"].."(*self)" --- 3756,3765 ---- if member["%operator"] then memberPtr = false ! if member["%operator"] == "[]" then -- op_index ! functor = "(*self)[" ! elseif member["%operator"] == "()" then -- op_func functor = "(*self)" + elseif paramCount > 1 then + functor = "(*self)"..member["%operator"] else functor = member["%operator"].."(*self)" *************** *** 3783,3786 **** --- 3785,3792 ---- end + if member["%operator"] == "[]" then -- op_index + functor = functor.."]" + end + CommentBindingTable(codeList, " // call "..member.Name.."\n") |