[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: finding undefined globals
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 16 May 2006 19:21:29 -0300
> To make it work for 5.0, change '%d+,%d+' to '[%d,]+'.
Yes, sorry, I forgot to mention that. Thanks.
With a sightly bigger (and uglier) change, it can be made to work in
both versions. Something like this (untested):
local F,P
if string.find(_VERSION,"Lua 5%.0") then
P="^[mf].-<(.-):%d+>"
else
P="^[mf].-<(.-):%d+,%d+>"
end
...
local ok,_,f=string.find(s,P)
Or perhaps just change the pattern to this (also untested):
local ok,_,f=string.find(s,"^[mf].-<(.-):%d+,?%d*>")
--lhf