Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369980 - Add support for continue statement
Summary: Add support for continue statement
Status: NEW
Alias: None
Product: LDT
Classification: Tools
Component: LuaDevelopmentTools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P5 enhancement
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 12:45 EST by Marc-André Laperle CLA
Modified: 2012-07-13 10:28 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2012-01-27 12:45:34 EST
Adding continue to Lua is a common modification to Lua. See http://lua-users.org/wiki/LuaPowerPatches
Unfortunately, LDT doesn't parse it correctly and the Outline view becomes empty as soon as a continue is used in a file. This is a big problem for us since most of the bigger scripts we have contain such continue statements and those are the scripts that need an Outline view the most.

I see 2 options:
1. Add support in LDT itself (with a preference?)
2. Add an extension point that can be used to allow LDT to parse modified Lua correctly.

Silly sample code:

function foo()
  for i=0, 10 do
    continue
  end
end

Outline disappears, continue has no coloring.
Comment 1 Benjamin Cabé CLA 2012-02-01 09:45:40 EST
I have discussed this matter with Fabien (the main developer of Metalua), he is suggesting that the following changes in metalua should "fix" the support for continue :

mlp.lexer :add 'continue'
mlp.stat :add{ "continue", builder=function() return { } end }