implementing grayrest's suggested cleanup for object comprehensions

This commit is contained in:
Jeremy Ashkenas
2010-02-14 17:35:14 -05:00
parent e110042275
commit 7667e16732
6 changed files with 44 additions and 74 deletions

View File

@@ -297,12 +297,10 @@
})(this));
unclosed = (function() {
__i = []; __j = levels;
for (key in __j) {
for (key in __j) if (__hasProp.call(__j, key)) {
value = __j[key];
if (__hasProp.call(__j, key)) {
if (value > 0) {
__i.push(key);
}
if (value > 0) {
__i.push(key);
}
}
return __i;
@@ -329,11 +327,9 @@
stack = [];
debt = {};
__i = INVERSES;
for (key in __i) {
for (key in __i) if (__hasProp.call(__i, key)) {
val = __i[key];
if (__hasProp.call(__i, key)) {
((debt[key] = 0));
}
((debt[key] = 0));
}
return this.scan_tokens((function(__this) {
var __func = function(prev, token, post, i) {