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

Bug 437539

Summary: [esprima] Recover from missing tokens in with declaration
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 6.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Rennie CLA 2014-06-16 10:44:17 EDT
Much like the support we have for recovering from missing tokens in if/for/while/do-while statements we should also be able to recover with statements.

Consider the following snippet:

var foo = 1;
with(foo {
    foo = 3;
}

the AST is far more empty than it should be. To confirm, turn on mark occurrences and notice 'foo' is not marked in the broken with decl nor its body decl.