+1 person waiting for an answer. I have some thoughts about such AST form:
https://github.com/Constellation/escodegen/pull/155#discussion_r8718325
But this behaviour has changed in ES6 and Chrome/Firefox implementations now
differ.
On Tuesday, January 7, 2014 11:09:21 PM UTC+4, Yusuke SUZUKI wrote:
> Hello SpiderMonkey hackers :)
>
>
>
> In escodegen development, we're planning to support moz-specific
>
> LetStatement AST[1].
>
> But I think the AST of `for (let i = 0; i < 10; ++i);` is not reasonable
>
> representation, it lacks consistency with `let (i = 0) { }` and `for (let i
>
> in []);`.
>
>
>
> Is there any reason to prevent implementing it simply as the `kind: 'let'`
>
> version of `for (var i = 0; i < 10; ++i);`? Actually, `for (let i in [])`
>
> is implemented in this way.
>
> I know that let in `init` part of `ForStatement` has special scope
>
> semantics. But I don't think the tree form of AST is needed to be
>
> specialized.
>
>
>
> Regards,
>
> Yusuke Suzuki
>
>
>
> [1]: https://github.com/Constellation/escodegen/pull/155
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals