lua-users home
lua-l archive

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

On Wed, May 6, 2015 at 12:19 PM, Gaspard Bucher <> wrote:
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))

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 ?


Gaspard Bucher

Ouuups... Sorry for the list noise. Simply use "table.pack" and "table.unpack".