Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 10, 2009, 4:01:42 PM (15 years ago)
Author:
rgrieder
Message:

Tolua update to v1.0.93 is not working properly and I would not know how to fix it. I have created a patch however, just in case we need it after all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/tolua/lua/container.lua

    r3127 r3138  
    615615            b,e,decl,arg,const = strfind(s,"^%s*([_%w])%s*(%b())%s*(c?o?n?s?t?)%s*;%s*")
    616616        end
    617         if not b then
    618             -- try function pointer
    619             b,e,decl,arg,const = strfind(s,"^%s*([^%(;\n]+%b())%s*(%b())%s*;%s*")
    620             if b then
    621                 decl = string.gsub(decl, "%(%s*%*([^%)]*)%s*%)", " %1 ")
    622             end
    623         end
    624617        if b then
    625618            if virt and string.find(virt, "[=0]") then
     
    654647        base = '' body = ''
    655648        b,e,name = strfind(s,"^%s*class%s*([_%w][_%w@]*)%s*;")  -- dummy class
    656         local dummy = false
    657649        if not b then
    658650            b,e,name = strfind(s,"^%s*struct%s*([_%w][_%w@]*)%s*;")    -- dummy struct
    659651            if not b then
    660                 b,e,name,base,body = strfind(s,"^%s*class%s*([_%w][_%w@]*)%s*([^{]-)%s*(%b{})%s*")
     652                b,e,name,base,body = strfind(s,"^%s*class%s*([_%w][_%w@]*)%s*(.-)%s*(%b{})%s*;%s*")
    661653                if not b then
    662                     b,e,name,base,body = strfind(s,"^%s*struct%s+([_%w][_%w@]*)%s*([^{]-)%s*(%b{})%s*")
     654                    b,e,name,base,body = strfind(s,"^%s*struct%s*([_%w][_%w@]*)%s*(.-)%s*(%b{})%s*;%s*")
    663655                    if not b then
    664                         b,e,name,base,body = strfind(s,"^%s*union%s*([_%w][_%w@]*)%s*([^{]-)%s*(%b{})%s*")
     656                        b,e,name,base,body = strfind(s,"^%s*union%s*([_%w][_%w@]*)%s*(.-)%s*(%b{})%s*;%s*")
    665657                        if not b then
    666658                            base = ''
    667                             b,e,body,name = strfind(s,"^%s*typedef%s%s*struct%s%s*[_%w]*%s*(%b{})%s*([_%w][_%w@]*)%s*;")
     659                            b,e,body,name = strfind(s,"^%s*typedef%s%s*struct%s%s*[_%w]*%s*(%b{})%s*([_%w][_%w@]*)%s*;%s*")
    668660                        end
    669661                    end
    670662                end
    671             else dummy = 1 end
    672         else dummy = 1 end
     663            end
     664        end
    673665        if b then
    674666            if base ~= '' then
     
    683675            _curr_code = strsub(s,b,e)
    684676            Class(name,base,body)
    685             if not dummy then
    686                 varb,vare,varname = string.find(s, "^%s*([_%w]+)%s*;", e+1)
    687                 if varb then
    688                     Variable(name.." "..varname)
    689                     e = vare
    690                 end
    691             end
    692677            return strsub(s,e+1)
    693678        end
     
    738723    -- try array
    739724    do
    740     local b,e,decl = strfind(s,"^%s*([_%w][][_@%s%w%d%*&:<>]*[]_%w%d])%s*;%s*")
     725        local b,e,decl = strfind(s,"^%s*([_%w][][_@%s%w%d%*&:]*[]_%w%d])%s*;%s*")
    741726        if b then
    742727            _curr_code = strsub(s,b,e)
     
    758743function classContainer:parse (s)
    759744
    760     --self.curr_member_access = nil
     745    self.curr_member_access = nil
    761746
    762747    while s ~= '' do
Note: See TracChangeset for help on using the changeset viewer.