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
175 | 175 | for item in self.items:iter() do |
176 | 176 | local tags = item.tags |
177 | 177 | if tags.name == name then |
178 | tags.export = true | |
178 | 179 | if tags['local'] then |
179 | 180 | tags['local'] = nil |
180 | 181 | end |
646 | 647 | elseif #fargs > 0 then -- consistency check! |
647 | 648 | local varargs = fargs[#fargs] == '...' |
648 | 649 | 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 | |
649 | 657 | local k = 0 |
650 | 658 | for _,pname in ipairs(param_names) do |
651 | 659 | local _,field = split_iden(pname) |