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

Reply via email to