Analytic output of number of local variables, global variables, etc.?

Does Corona (or Lua) have a convenient way to determine an overall count of various application variables and their scope? For example, number of local variables, number of global variables (if any), number of overall functions, etc.?

At “lua-users.org”, they mention a “luac” (Lua compiler) command line tool which can output such info… but I can’t determine how to utilize this, where to run it from, etc.

Any suggestions?

Thanks!
[import]uid: 9747 topic_id: 4328 reply_id: 304328[/import]

luac is part of the standard Lua distribution. If you want it, you can download/build it yourself and try running it against your Lua scripts.

I have a prebuilt luac bundled inside an open source side project I work on called LuaCocoa.

http://playcontrol.net/opensource/LuaCocoa/

Download the binary DMG and the executable is in
LuaCocoa.framework/Versions/A/Tools/luac

I’m not sure which switch to use. Maybe -l

luac -l main.lua

[import]uid: 7563 topic_id: 4328 reply_id: 13597[/import]