diff --git a/lib/command.js b/lib/command.js index f81925e0..676aa389 100644 --- a/lib/command.js +++ b/lib/command.js @@ -69,10 +69,10 @@ return fs.stat(source, function(err, stats) { if (stats.isDirectory()) { return fs.readdir(source, function(err, files) { - var _i2, _len2, _ref3, _result2, file; + var _j, _len2, _ref3, _result2, file; _result2 = []; _ref3 = files; - for (_i2 = 0, _len2 = _ref3.length; _i2 < _len2; _i2++) { - file = _ref3[_i2]; + for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { + file = _ref3[_j]; _result2.push(compile(path.join(source, file))); } return _result2; diff --git a/lib/grammar.js b/lib/grammar.js index 01f367c6..c350f41d 100644 --- a/lib/grammar.js +++ b/lib/grammar.js @@ -1,5 +1,5 @@ (function() { - var Parser, _i, _i2, _len, _len2, _ref, _ref2, _ref3, _result, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; + var Parser, _i, _j, _len, _len2, _ref, _ref2, _ref3, _result, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; var __hasProp = Object.prototype.hasOwnProperty; Parser = require('jison').Parser; unwrap = /function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/; @@ -622,8 +622,8 @@ alt = _ref2[_i]; _result.push((function() { _ref3 = alt[0].split(' '); - for (_i2 = 0, _len2 = _ref3.length; _i2 < _len2; _i2++) { - token = _ref3[_i2]; + for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { + token = _ref3[_j]; if (!(grammar[token])) { tokens.push(token); } diff --git a/lib/nodes.js b/lib/nodes.js index 896ade10..a6501024 100644 --- a/lib/nodes.js +++ b/lib/nodes.js @@ -122,7 +122,7 @@ return '\n' + idt + (override || this["class"]) + children; }; BaseNode.prototype.eachChild = function(func) { - var _i, _i2, _len, _len2, _ref2, _ref3, _result, attr, child; + var _i, _j, _len, _len2, _ref2, _ref3, _result, attr, child; if (!(this.children)) { return null; } @@ -131,8 +131,8 @@ attr = _ref2[_i]; if (this[attr]) { _ref3 = flatten([this[attr]]); - for (_i2 = 0, _len2 = _ref3.length; _i2 < _len2; _i2++) { - child = _ref3[_i2]; + for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { + child = _ref3[_j]; if (func(child) === false) { return null; } @@ -1774,7 +1774,7 @@ return this; }; SwitchNode.prototype.compileNode = function(o) { - var _i, _i2, _len, _len2, _ref2, _ref3, block, code, condition, conditions, exprs, idt, pair; + var _i, _j, _len, _len2, _ref2, _ref3, block, code, condition, conditions, exprs, idt, pair; idt = (o.indent = this.idt(1)); o.top = true; code = ("" + (this.tab) + "switch (" + (this.subject.compile(o)) + ") {"); @@ -1786,8 +1786,8 @@ block = _ref3[1]; exprs = block.expressions; _ref3 = flatten([conditions]); - for (_i2 = 0, _len2 = _ref3.length; _i2 < _len2; _i2++) { - condition = _ref3[_i2]; + for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { + condition = _ref3[_j]; if (this.tags.subjectless) { condition = new OpNode('!!', new ParentheticalNode(condition)); } diff --git a/lib/optparse.js b/lib/optparse.js index 5b63a8ad..3ffd4ebc 100755 --- a/lib/optparse.js +++ b/lib/optparse.js @@ -94,7 +94,7 @@ }; }; normalizeArguments = function(args) { - var _i, _i2, _len, _len2, _ref, _ref2, arg, l, match, result; + var _i, _j, _len, _len2, _ref, _ref2, arg, l, match, result; args = args.slice(0); result = []; _ref = args; @@ -102,8 +102,8 @@ arg = _ref[_i]; if (match = arg.match(MULTI_FLAG)) { _ref2 = match[1].split(''); - for (_i2 = 0, _len2 = _ref2.length; _i2 < _len2; _i2++) { - l = _ref2[_i2]; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + l = _ref2[_j]; result.push('-' + l); } } else { diff --git a/lib/scope.js b/lib/scope.js index 6719df37..15fbd2de 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -70,7 +70,7 @@ return !!(this.parent && this.parent.check(name)); }; Scope.prototype.temporary = function(type, index) { - return '_' + type + (index > 1 ? index : ''); + return type.length > 1 ? '_' + type + (index > 1 ? index : '') : '_' + (index + parseInt(type, 36)).toString(36).replace(/\d/g, 'a'); }; Scope.prototype.freeVariable = function(type) { var index, temp;