-
Notifications
You must be signed in to change notification settings - Fork 63
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
varDeclare逻辑是不是有问题? #3
Comments
注意这一句 |
我试了一下好像不是耶?
就用这个例子测试。y=2成功赋值到父作用域是
这行的作用,不是issue中的递归实现的,所以 |
另外还有个疑问:BlockStatement中是不是在声明提前的过程中,不小心把变量赋值也提前了? |
已经在最新的commit里面修复了。确实是 至于你的第二个问题没有很懂,有具体代码体现吗? |
这里应该是打印出undefined,不是1 |
所以在声明的时候会直接求值,并且赋值
|
varDeclare中,在递归查找父作用域之后,不是应该定义到最终查找到的父作用域上吗,怎么还是赋给了this.declaration?
The text was updated successfully, but these errors were encountered: