ScriptSyntaxTree uses Esprima, which only handles ES5 and cannot parse Web Inspector code itself (var..of). It looks like Espree is getting close to having sufficient ES6, and is compatible with Esprima AST: https://github.com/eslint/espree
<rdar://problem/19707119>
It looks like Esprima's harmony branch has more ES6 features than espree right now, so lets merge it in instead. We can reevaluate switching to espree later. https://github.com/jquery/esprima/tree/harmony
Created attachment 246068 [details] patch almost there.
what is left: 1. Run tests 2. Write more tests.
Created attachment 246365 [details] patch
To note, this upstream esprima does not yet parse the following statement correctly: "for ({x,y} of foo) bar();" It only supports: "for (var {x,y} of foo) bar();" Since we're switching to a non-release build of esprima, it's probably worth merging in uptream esprima's more often. Maybe once every 3-4 weeks until they have an official ES6 release.
Comment on attachment 246365 [details] patch Looks good. Nice use of Symbol. We should consider it for all our enums.
landed in: http://trac.webkit.org/changeset/180388