-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ES6 block scoping #18
Comments
It's not so hard. You would need to expand the Scope class to track both the block scope, and the function scope. This gets a little tricky when things like declaring a let inside a for loop deceleration is considered. It's on my TODO list for sure. |
I added some support for this in 268909e, but it needs some testing. Let me know what you think. |
Thanks for working on this feature! I've tried the code at #16 again, but it still doesn't work as expected. To make it work as expected, I still need to change this line:
to:
|
Hi, is PR #20 "Closure fixes" for fixing this issue? |
It improves the situation but does not fix it entirely. |
(Related to #15 and #16)
Is it easy to add support for ES6 block scoping for
let
andconst
?It's somewhat meaningless (and even confusing) to have
let
andconst
but no block scoping for them, because it's the main difference between them andvar
.The text was updated successfully, but these errors were encountered: