Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » feature request: highlight globals
feature request: highlight globals [message #835000] Mon, 02 April 2012 17:05 Go to next message
Jay Carlson is currently offline Jay CarlsonFriend
Messages: 4
Registered: April 2012
Junior Member
One of the most common errors in Lua is to misspell an identifier. If you have
local tests
print(test)
test will refer to a global. The AST contains this information. Many code styles, especially for modules, do not use globals much outside of local foo=foo imports. A visual highlight on test in
print(test)
would help people coding this way.

I don't know much about the DLTK, but Smalltalk has a cheap non-typed typo checker for method selectors. Translated to Lua, an occurrence of foo.testt is likely to be a typo unless somewhere else in the program any
bar.testt=...
exists. That seems harder though.
Re: feature request: highlight globals [message #837425 is a reply to message #835000] Thu, 05 April 2012 16:46 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

Jay,

Semantic highlighting would be a great addition indeed, especially to spot typos more easily as you suggest.
Could you please file a feature request in the bug tracker of the project?

Thanks for the suggestion!


Re: feature request: highlight globals [message #839425 is a reply to message #837425] Sun, 08 April 2012 17:52 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

Benjamin Cabe wrote on Thu, 05 April 2012 18:46

Could you please file a feature request in the bug tracker of the project?


I have just opened bug 376301, and the fix is on its way Smile.
It will be committed in the github fork, since this is where the AST is in a good enough shape.


Re: feature request: highlight globals [message #840041 is a reply to message #839425] Mon, 09 April 2012 15:40 Go to previous message
Jay Carlson is currently offline Jay CarlsonFriend
Messages: 4
Registered: April 2012
Junior Member
Cool! I'm sorry I didn't get to the tracker--work got crazy.

There are probably a lot of interesting things that can be done once the AST is exposed to the highlight engine. I had no idea how to start. Thanks.
Previous Topic:debugging lua 5.2
Next Topic:"realtime" console update?
Goto Forum:
  


Current Time: Thu Apr 25 15:35:11 GMT 2024

Powered by FUDForum. Page generated in 0.03438 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top