lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi list,

In a parser, I have code like so:
==============
local m = {string.match(line, matcher.pattern)}
if m[1] then
  matcher.func(self, line_i, unpack(m))
end
==============

The "matcher.func" function can take different argument count depending on the captures in the pattern.

Any thought on how to fix this with style ?

Cheers,

Gaspard Bucher