lua-users home
lua-l archive

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


On 11/10/2012 15:11, Roberto Ierusalimschy wrote:
Unfortunately, this method is not robust enough.
If some part of the line in question matches the same pattern
":(%d+):", it will be captured instead.

You can provide your own name for the chunk (easier in Lua 5.2
but doable in 5.1). Just choose a name that does not contain that
pattern.

Yes, this is an option (and I thought about that).
It'd be however much better if those functions returned the line number as their 3-rd return value. Then all the trickery wouldn't be necessary.

--
Shmuel