ECMAScript scope analyzer