Fixing for magic scoping issues. Small steps at a time.

This commit is contained in:
Timothy Jones
2010-10-20 02:51:52 +13:00
parent c8b9c5a54e
commit cb6be74851
12 changed files with 111 additions and 86 deletions

View File

@@ -26,7 +26,7 @@
return this.garbage.push([]);
};
Scope.prototype.endLevel = function() {
var _i, _len, _ref2, _result, name, vars;
var _i, _j, _len, _ref2, _result, name, vars;
vars = this.variables;
_result = [];
for (_i = 0, _len = (_ref2 = this.garbage.pop()).length; _i < _len; _i++) {
@@ -45,7 +45,7 @@
return false;
};
Scope.prototype.any = function(fn) {
var _ref2, k, v;
var _i, _ref2, k, v;
for (v in _ref2 = this.variables) {
if (!__hasProp.call(_ref2, v)) continue;
k = _ref2[v];
@@ -98,7 +98,7 @@
});
};
Scope.prototype.declaredVariables = function() {
var _ref2, _result, key, val;
var _i, _ref2, _result, key, val;
return (function() {
_result = [];
for (key in _ref2 = this.variables) {
@@ -112,7 +112,7 @@
}).call(this).sort();
};
Scope.prototype.assignedVariables = function() {
var _ref2, _result, key, val;
var _i, _ref2, _result, key, val;
_result = [];
for (key in _ref2 = this.variables) {
if (!__hasProp.call(_ref2, key)) continue;