Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 470625

Summary: Need a way to check if a problem returned from js validation has a token saying "return".
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Michael_Rennie
Version: 9.0   
Target Milestone: 9.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2015-06-19 15:03:25 EDT
We need a way/key/token to see if a validation error represent "illegal return statement", when integrating stand alone editor to Node Red Open source project, etc.
Comment 1 Michael Rennie CLA 2015-06-19 15:10:10 EDT
Fixed in:
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=301dcec3af8a30a5f0f7d9a677c6c49656249f58

The underlying reasoning for this change is that in node-red they allow code edits for what would be part of function bodies, but without the code being parsed actually in one - this results in a parse error on the invalid return statement.

This fix tags bad token parser problems with the offending token so consumers of the embedded editor can handle it as needed.