Review the use of escope
ariya opened this issue · 7 comments
Since I'm not too familiar with escope API, the way esrefactor is using it might be not optimal.
@Constellation If you would like to help/review, it will be appreciated! Thank you.
Thanks. OK, I'll review this.
Reference has resolved
property, by using this, we can access to variable definition easily.
But sometimes, resolved
property may become null, this is because escope
is very presice and pessimistic analyzer.
For example,
(function () {
var i = 20;
eval(str);
function test() {
i; // this
}
}());
This i
reference doesn't have resolved
property because direct call to eval taints upper scope.
I'll add more user friendly API to escope and documentation, so If you have requests, please file issue :)
@Constellation Is your clean-up ready? Should I merge it or should I wait for more commits?
Closed, thanks to @Constellation!
Sorry for my very late reply. This is because I'm now working on my research hardly...
Later I'll update escope with more friendly API and create issue again.
Thanks @ariya :)