Codebase list lua-ldoc / feabf5c
when using export tag, decide whether function is meant to be a class method from 'self' formal arg, otherwise it becomes static. Steve Donovan 10 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
175175 for item in self.items:iter() do
176176 local tags = item.tags
177177 if tags.name == name then
178 tags.export = true
178179 if tags['local'] then
179180 tags['local'] = nil
180181 end
646647 elseif #fargs > 0 then -- consistency check!
647648 local varargs = fargs[#fargs] == '...'
648649 if varargs then table.remove(fargs) end
650 if tags.export then
651 if fargs[1] == 'self' then
652 table.remove(fargs,1)
653 else
654 tags.static = true
655 end
656 end
649657 local k = 0
650658 for _,pname in ipairs(param_names) do
651659 local _,field = split_iden(pname)