[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua code completion using the Lua compiler or parser
- From: Christian Tellefsen <christian.tellefsen@...>
- Date: Wed, 24 Feb 2010 15:18:26 +0100
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