lua-users home
lua-l archive

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


On Sun, 17 Jan 2010 10:02:29 -0800
Wesley Smith <wesley.hoke@gmail.com> wrote:

> If you're simply talking about parsing some Lua code to see what
> functions are globals, I would say this is almost trivial in Lua.  You
> can use Leg to get this info quite easily.

No, you can't.  You can only find instances of "function foo()".  You
don't know what globals are available that are also functions.  Trivial
example:

do
	local flange = function() end
	...
	plinth = flange
end

Sure, there's an extra layer of fudge you could allow to make this case
work, but the whole scheme will be so delicate the tiniest extra bit
of complexity will break it again.

B.