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

Bug 444885

Summary: Syntax error at EOL not shown
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: 6.0   
Target Milestone: 7.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-09-23 18:05:26 EDT
1. Paste this code into a JS file and save:

function f() {
	var x;/
}

2. I expected to see a parse error complaining about the unclosed regex literal, but nothing shows up in the editor.

A similar problem happens for this bogus code, which makes me think it has something to do with a syntax error at the end of a line:

function f() {`

}
Comment 3 Michael Rennie CLA 2014-09-30 14:35:16 EDT
Fix + tests:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c844052dd46baf2f1ed3f2464f27399e0f741870

The fix for the invalid '`' char does not add new recovery support for bad punctuator tokens, that work would be covered in bug 437058. Instead it augments the thrown error so we can locate the problem in the editor. The fix also adds support for showing an error on the file in the event the parser completely fails to parse and barfs.