[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] lglob 0.8 Extended Globals Checker for Lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 29 Apr 2013 20:55:14 -0300
> But the best parser is, well, Lua itself!! Deep inside Lua is a block of code that knows when it has a global variable and converts "x" to "_ENV.x" .. that's fundamental to the way the language works now. It seems to me that the best approach would be to modify luac and add a switch to get it to emit a line of output each time it prefixes "_ENV" onto a global/free variable. Something like the line number, column number, and variable name. With this as input, it should be easy to create analysis tools that then provided information on globals usage (that mis-spelled global would easily be found).
See this thread and the ones it links to for a roadmap:
http://lua-users.org/lists/lua-l/2011-09/msg00684.html
- References:
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Luiz Henrique de Figueiredo
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, steve donovan
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, steve donovan
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Luiz Henrique de Figueiredo
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Luiz Henrique de Figueiredo
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Tim Hill