mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
rebuilt the narwhal interface
This commit is contained in:
@@ -20,17 +20,13 @@
|
||||
// Run a simple REPL, round-tripping to the CoffeeScript compiler for every
|
||||
// command.
|
||||
exports.run = function run(args) {
|
||||
var __a, __b, i, result;
|
||||
var __a, i, path, result;
|
||||
if (args.length) {
|
||||
__a = args;
|
||||
__b = function(path, i) {
|
||||
for (i=0; i<__a.length; i++) {
|
||||
path = __a[i];
|
||||
exports.evalCS(File.read(path));
|
||||
delete args[i];
|
||||
};
|
||||
if (__a instanceof Array) {
|
||||
for (i=0; i<__a.length; i++) __b(__a[i], i);
|
||||
} else {
|
||||
for (i in __a) { if (__a.hasOwnProperty(i)) __b(__a[i], i); }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user