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

Bug 444853

Summary: [esprima] Tolerate missing commas in arrays while parsing
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 CC: simon_kaegi
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2014-09-23 10:50:43 EDT
I just got stung by this while editing some define items and didn't even notice the parser error. Regardless, we should tolerate a missing comma in array decls.
Comment 1 Simon Kaegi CLA 2014-09-23 12:49:06 EDT
Is this in the context of recovery? This sounds pretty unusual otherwise.
Comment 2 Michael Rennie CLA 2014-09-24 11:36:08 EDT
(In reply to Simon Kaegi from comment #1)
> Is this in the context of recovery? This sounds pretty unusual otherwise.

Yes this is recovery, and this is not unusual at all. We should be able to tolerate missing punctuation (in certain cases) and still generate an AST. We already have support like this for object properties.
Comment 3 Michael Rennie CLA 2016-04-21 11:55:36 EDT
This is working now that we use Acorn as our base parser.

Closing worksforme.