kopia lustrzana https://github.com/c9/core
Fix a few superfluous (and hence ignored) arguments.
rodzic
f721e110fe
commit
59f506844f
|
@ -451,7 +451,7 @@ define(function(require, exports, module) {
|
|||
|
||||
function getNumber(query) {
|
||||
var double = get(query);
|
||||
return parseFloat(double, 10);
|
||||
return parseFloat(double);
|
||||
}
|
||||
|
||||
function getNode(query) {
|
||||
|
|
|
@ -98,9 +98,7 @@ define(function(require, exports, module) {
|
|||
if (accessInfo.private && (!accessInfo.member || accessInfo.pending))
|
||||
return console.warn("Don't have read access - You can't use chat");
|
||||
var chatHistory = workspace.chatHistory || [];
|
||||
chatHistory.forEach(function(msg) {
|
||||
addMessage(msg, msg.increment);
|
||||
});
|
||||
chatHistory.forEach(addMessage);
|
||||
scrollDown();
|
||||
chatCounter.innerHTML = chatHistory.length;
|
||||
}
|
||||
|
@ -402,4 +400,4 @@ define(function(require, exports, module) {
|
|||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -826,9 +826,9 @@ function endTime(t, message, indent) {
|
|||
var posInPart = syntaxDetector.posToRegion(part.region, pos);
|
||||
this.parse(part, function(ast) {
|
||||
if (!ast)
|
||||
return callHandlers(ast, null, posInPart);
|
||||
return callHandlers(ast, null);
|
||||
_self.findNode(ast, pos, function(currentNode) {
|
||||
callHandlers(ast, currentNode, posInPart);
|
||||
callHandlers(ast, currentNode);
|
||||
});
|
||||
}, true, true);
|
||||
|
||||
|
@ -1932,4 +1932,4 @@ function endTime(t, message, indent) {
|
|||
|
||||
}).call(LanguageWorker.prototype);
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -89,7 +89,7 @@ define(function(require, exports, module) {
|
|||
if (newAST[j].cons !== "Var")
|
||||
return false;
|
||||
// Var(x) was just inserted
|
||||
copyAnnos(findScopeNode(oldAST), newAST[j], dryRun);
|
||||
copyAnnos(findScopeNode(oldAST), newAST[j]);
|
||||
if (!newAST[j].annos)
|
||||
return false;
|
||||
continue;
|
||||
|
@ -97,17 +97,17 @@ define(function(require, exports, module) {
|
|||
if (oldAST[i].cons !== newAST[j].cons) {
|
||||
// Var(x) became PropAccess(Var(x), y)
|
||||
if (oldAST[i].cons === "Var" && newAST[j].isMatch("PropAccess(Var(_),_)")) {
|
||||
copyAnnos(oldAST[i], newAST[j][0], dryRun);
|
||||
copyAnnos(oldAST[i], newAST[j][0]);
|
||||
continue;
|
||||
}
|
||||
// PropAccess(Var(x), y) became Var(x)
|
||||
if (newAST[j].cons === "Var" && oldAST[i].isMatch("PropAccess(Var(_),_)")) {
|
||||
copyAnnos(oldAST[i][0], newAST[j], dryRun);
|
||||
copyAnnos(oldAST[i][0], newAST[j]);
|
||||
continue;
|
||||
}
|
||||
// PropAccess became Call(PropAccess, _)
|
||||
if (oldAST[i].isMatch("PropAccess(Var(_),_)") && newAST[j].isMatch("Call(PropAccess(Var(_),_),_)")) {
|
||||
copyAnnos(oldAST[i][0], newAST[j][0][0], dryRun);
|
||||
copyAnnos(oldAST[i][0], newAST[j][0][0]);
|
||||
var oldTemplate = new tree.ListNode([oldAST[i][0]]);
|
||||
oldTemplate.parent = oldAST;
|
||||
copyAnnosTop(oldTemplate, newAST[j][1], dryRun);
|
||||
|
@ -115,12 +115,12 @@ define(function(require, exports, module) {
|
|||
}
|
||||
// Call(PropAccess, _) became PropAccess
|
||||
if (newAST[j].isMatch("PropAccess(Var(_),_)") && oldAST[i].isMatch("Call(PropAccess(Var(_),_),_)")) {
|
||||
copyAnnos(oldAST[i][0][0], newAST[j][0], dryRun);
|
||||
copyAnnos(oldAST[i][0][0], newAST[j][0]);
|
||||
continue;
|
||||
}
|
||||
// Var(x) was (possibly) inserted
|
||||
if (newAST[j].cons === "Var" && newAST[j + 1] && newAST[j + 1].cons === oldAST[i].cons) {
|
||||
copyAnnos(findScopeNode(oldAST), newAST[j], dryRun);
|
||||
copyAnnos(findScopeNode(oldAST), newAST[j]);
|
||||
if (!newAST[j].annos)
|
||||
return false;
|
||||
i--;
|
||||
|
@ -128,7 +128,7 @@ define(function(require, exports, module) {
|
|||
}
|
||||
// Var(x) was (possibly) added
|
||||
if (oldAST[i].cons === "None" && newAST[j].cons === "Var") {
|
||||
copyAnnos(findScopeNode(oldAST), newAST[j], dryRun);
|
||||
copyAnnos(findScopeNode(oldAST), newAST[j]);
|
||||
if (!newAST[j].annos)
|
||||
return false;
|
||||
i--;
|
||||
|
@ -143,7 +143,7 @@ define(function(require, exports, module) {
|
|||
if (["If", "Return", "Throw"].indexOf(newAST[j].cons) > -1 && (!newAST[j][1] || newAST[j][1].isMatch("Block([])"))) {
|
||||
var cond = newAST[j][0].toString();
|
||||
if (cond === oldAST[i].toString()) {
|
||||
copyAnnos(oldAST[i], newAST[j][0], dryRun);
|
||||
copyAnnos(oldAST[i], newAST[j][0]);
|
||||
continue;
|
||||
}
|
||||
else if (!oldAST[i + 1]) {
|
||||
|
@ -151,7 +151,7 @@ define(function(require, exports, module) {
|
|||
}
|
||||
else if (cond === oldAST[i + 1].toString()) {
|
||||
i++;
|
||||
copyAnnos(oldAST[i], newAST[j][0], dryRun);
|
||||
copyAnnos(oldAST[i], newAST[j][0]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -161,10 +161,10 @@ define(function(require, exports, module) {
|
|||
var newCond = newAST[0];
|
||||
var newBody = newAST[1];
|
||||
if (oldCond.toString() === newBody.toString()) {
|
||||
copyAnnos(findScopeNode(oldAST), newCond, dryRun);
|
||||
copyAnnos(findScopeNode(oldAST), newCond);
|
||||
if (!newCond.annos)
|
||||
return false;
|
||||
copyAnnos(oldCond, newBody, dryRun);
|
||||
copyAnnos(oldCond, newBody);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -234,4 +234,4 @@ define(function(require, exports, module) {
|
|||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -164,7 +164,7 @@ function extractProperty(item, results, isConstructor) {
|
|||
}
|
||||
|
||||
function extractSignature(item, signature, result) {
|
||||
var returns = extractType(signature.returns ? signature.returns[0].type : null, true);
|
||||
var returns = extractType(signature.returns ? signature.returns[0].type : null);
|
||||
|
||||
if (item.type === "class property") {
|
||||
result.properties.___proto__ = returns;
|
||||
|
@ -191,7 +191,7 @@ function extractSignatureArgs(signature, results) {
|
|||
var argFargs = arg.args && extractSignatureArgs(arg, []);
|
||||
results.push({
|
||||
id: arg.name,
|
||||
type: extractType(arg.type, true),
|
||||
type: extractType(arg.type),
|
||||
doc: arg.description,
|
||||
opt: arg.optional,
|
||||
fargs: argFargs
|
||||
|
|
|
@ -392,7 +392,7 @@ define(function(require, exports, module) {
|
|||
tries.push(Date.now());
|
||||
var trySeriesStart = tries[tries.length - 1 - maxTrySeriesLength];
|
||||
if (!trySeriesStart || trySeriesStart < Date.now() - maxTrySeriesTime)
|
||||
return setupCall(value);
|
||||
return setupCall();
|
||||
|
||||
var err = new Error("Too many disconnects. Server crashing?");
|
||||
err.code = "EFATAL";
|
||||
|
|
|
@ -94,7 +94,7 @@ define(function(require, exports, module) {
|
|||
menuPath = new Menu({
|
||||
items: menuItems,
|
||||
onitemclick: function(e) {
|
||||
var info = buildPath(lastLink, true);
|
||||
var info = buildPath(lastLink);
|
||||
|
||||
if (e.value == "open")
|
||||
open(lastLink);
|
||||
|
|
|
@ -638,7 +638,7 @@ define(function(require, exports, module) {
|
|||
*/
|
||||
CursorLeftCommand.tryCreate = function(inputText) {
|
||||
if (inputText === INPUT_LEFT)
|
||||
return new CursorLeftCommand(inputText);
|
||||
return new CursorLeftCommand();
|
||||
};
|
||||
function CursorLeftCommand() {
|
||||
var noChange = false;
|
||||
|
@ -680,7 +680,7 @@ define(function(require, exports, module) {
|
|||
if (INPUTS_HOME.indexOf(inputText) > -1
|
||||
// Only attempt home if we'd jump to the start of a prompt
|
||||
&& (peek(-predictIndex - 1) === "$" || peek(-predictIndex - 2) === "$"))
|
||||
return new HomeCommand(inputText);
|
||||
return new HomeCommand();
|
||||
};
|
||||
function HomeCommand() {
|
||||
var oldIndex;
|
||||
|
@ -762,4 +762,4 @@ define(function(require, exports, module) {
|
|||
|
||||
register(null, { "terminal.predict_echo": plugin });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -988,7 +988,7 @@ function findCssRule(name, stylesheet) {
|
|||
* @param {Object} [win] A reference to a window
|
||||
*/
|
||||
function setStyleRule(name, type, value, stylesheet, win) {
|
||||
var rule = findCssRule(name, stylesheet, win);
|
||||
var rule = findCssRule(name, stylesheet);
|
||||
if (rule) {
|
||||
if (value.indexOf("!important") > -1) {
|
||||
rule.style.cssText = type + ":" + value;
|
||||
|
@ -1027,4 +1027,4 @@ window.addEventListener("message", function(e) {
|
|||
if (parent != window)
|
||||
init(id);
|
||||
|
||||
})();
|
||||
})();
|
||||
|
|
Ładowanie…
Reference in New Issue