trying to commit built files again; here goes nothing

This commit is contained in:
Michael Ficarra 2012-05-16 15:50:34 -04:00
parent df54c63b1b
commit f938a213fe
2 changed files with 44 additions and 18 deletions

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript 1.3.3
(function() {
var extend, flatten;
var extend, flatten, _ref;
exports.starts = function(string, literal, start) {
return literal === string.substr(start, literal.length);
@ -74,4 +74,15 @@
return array[array.length - (back || 0) - 1];
};
exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
var e, _i, _len;
for (_i = 0, _len = this.length; _i < _len; _i++) {
e = this[_i];
if (fn(e)) {
return true;
}
}
return false;
};
}).call(this);

View File

@ -1,6 +1,7 @@
// Generated by CoffeeScript 1.3.3
(function() {
var ACCESSOR, CoffeeScript, Module, REPL_PROMPT, REPL_PROMPT_CONTINUATION, REPL_PROMPT_MULTILINE, SIMPLEVAR, Script, autocomplete, backlog, completeAttribute, completeVariable, enableColours, error, getCompletions, inspect, multilineMode, pipedInput, readline, repl, run, stdin, stdout;
var ACCESSOR, CoffeeScript, Module, REPL_PROMPT, REPL_PROMPT_CONTINUATION, REPL_PROMPT_MULTILINE, SIMPLEVAR, Script, autocomplete, backlog, completeAttribute, completeVariable, enableColours, error, getCompletions, inspect, multilineMode, pipedInput, readline, repl, run, stdin, stdout,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
stdin = process.openStdin();
@ -41,28 +42,35 @@
};
completeAttribute = function(text) {
var all, completions, key, match, obj, possibilities, prefix, val;
var all, candidates, completions, key, match, obj, prefix, _i, _len, _ref;
if (match = text.match(ACCESSOR)) {
all = match[0], obj = match[1], prefix = match[2];
try {
val = Script.runInThisContext(obj);
} catch (error) {
obj = Script.runInThisContext(obj);
} catch (e) {
return;
}
val = Object(val);
possibilities = Object.getOwnPropertyNames(val);
for (key in val) {
if (~possibilities.indexOf(val)) {
possibilities.push(key);
if (obj == null) {
return;
}
obj = Object(obj);
candidates = Object.getOwnPropertyNames(obj);
while (obj = Object.getPrototypeOf(obj)) {
_ref = Object.getOwnPropertyNames(obj);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
key = _ref[_i];
if (__indexOf.call(candidates, key) < 0) {
candidates.push(key);
}
}
}
completions = getCompletions(prefix, possibilities);
completions = getCompletions(prefix, candidates);
return [completions, prefix];
}
};
completeVariable = function(text) {
var completions, free, keywords, possibilities, r, vars, _ref;
var candidates, completions, free, key, keywords, r, vars, _i, _len, _ref;
free = (_ref = text.match(SIMPLEVAR)) != null ? _ref[1] : void 0;
if (text === "") {
free = "";
@ -81,8 +89,14 @@
}
return _results;
})();
possibilities = vars.concat(keywords);
completions = getCompletions(free, possibilities);
candidates = vars;
for (_i = 0, _len = keywords.length; _i < _len; _i++) {
key = keywords[_i];
if (__indexOf.call(candidates, key) < 0) {
candidates.push(key);
}
}
completions = getCompletions(free, candidates);
return [completions, free];
}
};
@ -92,7 +106,7 @@
_results = [];
for (_i = 0, _len = candidates.length; _i < _len; _i++) {
el = candidates[_i];
if (el.indexOf(prefix) === 0) {
if (0 === el.indexOf(prefix)) {
_results.push(el);
}
}
@ -237,11 +251,12 @@
repl._onLine(repl.line);
return;
}
if (backlog) {
if (backlog || repl.line) {
backlog = '';
repl.output.write('\n');
repl.historyIndex = -1;
repl.setPrompt(REPL_PROMPT);
return repl.prompt();
repl.output.write('\n(^C again to quit)');
return repl._line((repl.line = ''));
} else {
return repl.close();
}