lua-users home
lua-l archive

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


Hi,

I'm doing code completion within a running Lua state - so I have access to all tables, metatables and misc extra information from our bindings interface.

Currently, I just use some choice regular expression to guess at what global / function call / parameter etc. that the user is currently at. It's a simple solution, and it works in most cases, but not in all.

Is there any way, given a string of Lua code, I can use the Lua compiler/parser to figure out things like (for example):

* What the next legal symbols are.
* Which number parameter I'm at in a function call.
* Whether the code encountered so far is legal.

Any pointers would be greatly appreciated!

Thanks,
Christian Tellefsen
Funcom