1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

start with 1, then 2 for reused vars.

This commit is contained in:
Jeremy Ashkenas 2012-02-29 23:46:03 -05:00
parent b9cfb5a7d8
commit 7c1f4b38f4
10 changed files with 312 additions and 312 deletions

View file

@ -77,7 +77,7 @@
};
exports["eval"] = function(code, options) {
var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref2, _ref3, _require;
var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref1, _ref2, _require;
if (options == null) options = {};
if (!(code = code.trim())) return;
Script = vm.Script;
@ -87,10 +87,10 @@
sandbox = options.sandbox;
} else {
sandbox = Script.createContext();
_ref2 = options.sandbox;
for (k in _ref2) {
if (!__hasProp.call(_ref2, k)) continue;
v = _ref2[k];
_ref1 = options.sandbox;
for (k in _ref1) {
if (!__hasProp.call(_ref1, k)) continue;
v = _ref1[k];
sandbox[k] = v;
}
}
@ -107,9 +107,9 @@
return Module._load(path, _module, true);
};
_module.filename = sandbox.__filename;
_ref3 = Object.getOwnPropertyNames(require);
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
r = _ref3[_i];
_ref2 = Object.getOwnPropertyNames(require);
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
r = _ref2[_i];
if (r !== 'paths') _require[r] = require[r];
}
_require.paths = _module.paths = Module._nodeModulePaths(process.cwd());
@ -137,8 +137,8 @@
parser.lexer = {
lex: function() {
var tag, _ref2;
_ref2 = this.tokens[this.pos++] || [''], tag = _ref2[0], this.yytext = _ref2[1], this.yylineno = _ref2[2];
var tag, _ref1;
_ref1 = this.tokens[this.pos++] || [''], tag = _ref1[0], this.yytext = _ref1[1], this.yylineno = _ref1[2];
return tag;
},
setInput: function(tokens) {