lua-users home
lua-l archive

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


> So I started thinking about how to coax Lua into doing this _and_ allow 
> a Lua debugger to still work.

> It would be nice to feed this to Lua (or equivalent):
> 
> #line 1 "fileA.lua"
> local MY_DEFINE = 5
> #line 2 "fileA.lua"
> local YOUR_DEFINE = 10
> #line 1 "fileB.lua"
> print(MY_DEFINE)
> #line 2 "fileB.lua"

> Are there any fancy techniques to pull this off?  Noticing the layout of 
> the Proto structure, I don't think there are.  It seems to have only one 
> filename per Proto.

That's the real problem. Line numbers are not hard. See 
	http://lua-users.org/lists/lua-l/2005-06/msg00111.html