light refactors + tweaks

This commit is contained in:
Jeremy Ashkenas
2010-11-04 22:53:07 -04:00
parent 8d30feaf88
commit bb05e07e4e
4 changed files with 13 additions and 12 deletions

View File

@@ -25,6 +25,7 @@
if (options.fileName) {
err.message = "In " + options.fileName + ", " + err.message;
}
console.error(err.toString());
throw err;
}
};
@@ -44,13 +45,13 @@
if (root.moduleCache) {
root.moduleCache = {};
}
return path.extname(root.filename) !== '.coffee' || require.extensions ? root._compile(exports.compile(code, options), root.filename) : root._compile(code, root.filename);
return path.extname(root.filename) !== '.coffee' || require.extensions ? root._compile(compile(code, options), root.filename) : root._compile(code, root.filename);
};
exports.eval = function(code, options) {
var __dirname, __filename;
__filename = options.fileName;
__dirname = path.dirname(__filename);
return eval(exports.compile(code, options));
return eval(compile(code, options));
};
lexer = new Lexer;
parser.lexer = {