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

Bug 435819

Summary: if / for / while recovery does not work correctly
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 6.0   
Target Milestone: 6.0 M2   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2014-05-26 13:54:19 EDT
Currently we have some support for recovering from incomplete control statements like:

var foo = 0;
if(foo

but if we try to start the block like:

var foo = 0;;
if(foo {

the parser breaks. It silently throws a type error because the recovery is nulling out the lookahead rather than reset it.