-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Hoisting variables #376
Comments
This seems to be related to the fact that we execute nodes in order, instead of having a special category for this. These functions should be evaluated first, and then start evaluating the rest of statements. |
I don't think v0.9.0 is realistic for this, for hoisting to work would require a big refactor of how execution works, including having some pre-parsing step. We're no where near that point yet. |
Actually, this seems to be already working in #392. The Idea was to re-order function declarations to show before all the rest of the nodes in the node list. Not sure what else should be done. |
oh ok interesting. |
Definitelly, but I think it's a reasonable workaround in the meantime.
It should be, it's slower, as we will be doing a sort, but it's always maintaining ordering, so it's sound as far as I can tell. |
now not founding Identifier will always be undefined, for
function
orvar
this is wrong.moreinfo
example:
The text was updated successfully, but these errors were encountered: