lua-users home
lua-l archive

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


As a matter of fact, our attempt on that for LuaEclipse 2.0 is to use
a complete Lua parser to create an AST and represent each file, using
LuaDoc comments to clarify tight corners.

This way, we can know most of the time what is the content of a given
variable in a given context -- follow it to package.path and then know
where to find the native library from which to load the symbols for
completion directly from the register.

There will be mistakes, of course, but I believe it will work most of the time.

Besides, we plan to make the whole algorythim extendable by user. So
he can add any strange behaviour he might need.

The reason behind this strange endeavour is that big projects could
benefit a lot from code completion, refactoring tools and error
inference. So, we should do what we _can_ do.

Guessing is dangerous, of course, but -- like driving -- can be done
responsibly.

On Sun, Jan 17, 2010 at 3:53 PM, Rob Kendrick <rjek@rjek.com> wrote:
> On Sun, 17 Jan 2010 09:48:28 -0800
> Mark Hamburg <mark@grubmah.com> wrote:
>
>> On Jan 17, 2010, at 9:38 AM, Rob Kendrick wrote:
>>
>> > Sure, but it's not possible to be useful with method calls, for
>> > example.  (Because the editor can't know the type of the variable
>> > before the colon, as well as many other reasons.)
>>
>> You can't know the type of the receiver in Python either, so if
>> Python editors can do it, then Lua editors ought to be able to do so
>> as well.
>
> If you can't know before runtime, than this suggests that the editors
> you refer to run it to find out.  Or guess.
>
> Either option terrifies me.
>
> B.
>

-- 
Luís Eduardo Jason Santos