Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/commonli...
File: commonlisp.js
// CodeMirror, copyright (c) by Marijn Haverbeke and others
[0] Fix | Delete
// Distributed under an MIT license: http://codemirror.net/LICENSE
[1] Fix | Delete
[2] Fix | Delete
(function(mod) {
[3] Fix | Delete
if (typeof exports == "object" && typeof module == "object") // CommonJS
[4] Fix | Delete
mod(require("../../lib/codemirror"));
[5] Fix | Delete
else if (typeof define == "function" && define.amd) // AMD
[6] Fix | Delete
define(["../../lib/codemirror"], mod);
[7] Fix | Delete
else // Plain browser env
[8] Fix | Delete
mod(CodeMirror);
[9] Fix | Delete
})(function(CodeMirror) {
[10] Fix | Delete
"use strict";
[11] Fix | Delete
[12] Fix | Delete
CodeMirror.defineMode("commonlisp", function (config) {
[13] Fix | Delete
var specialForm = /^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/;
[14] Fix | Delete
var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;
[15] Fix | Delete
var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/;
[16] Fix | Delete
var symbol = /[^\s'`,@()\[\]";]/;
[17] Fix | Delete
var type;
[18] Fix | Delete
[19] Fix | Delete
function readSym(stream) {
[20] Fix | Delete
var ch;
[21] Fix | Delete
while (ch = stream.next()) {
[22] Fix | Delete
if (ch == "\\") stream.next();
[23] Fix | Delete
else if (!symbol.test(ch)) { stream.backUp(1); break; }
[24] Fix | Delete
}
[25] Fix | Delete
return stream.current();
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
function base(stream, state) {
[29] Fix | Delete
if (stream.eatSpace()) {type = "ws"; return null;}
[30] Fix | Delete
if (stream.match(numLiteral)) return "number";
[31] Fix | Delete
var ch = stream.next();
[32] Fix | Delete
if (ch == "\\") ch = stream.next();
[33] Fix | Delete
[34] Fix | Delete
if (ch == '"') return (state.tokenize = inString)(stream, state);
[35] Fix | Delete
else if (ch == "(") { type = "open"; return "bracket"; }
[36] Fix | Delete
else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; }
[37] Fix | Delete
else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; }
[38] Fix | Delete
else if (/['`,@]/.test(ch)) return null;
[39] Fix | Delete
else if (ch == "|") {
[40] Fix | Delete
if (stream.skipTo("|")) { stream.next(); return "symbol"; }
[41] Fix | Delete
else { stream.skipToEnd(); return "error"; }
[42] Fix | Delete
} else if (ch == "#") {
[43] Fix | Delete
var ch = stream.next();
[44] Fix | Delete
if (ch == "[") { type = "open"; return "bracket"; }
[45] Fix | Delete
else if (/[+\-=\.']/.test(ch)) return null;
[46] Fix | Delete
else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null;
[47] Fix | Delete
else if (ch == "|") return (state.tokenize = inComment)(stream, state);
[48] Fix | Delete
else if (ch == ":") { readSym(stream); return "meta"; }
[49] Fix | Delete
else return "error";
[50] Fix | Delete
} else {
[51] Fix | Delete
var name = readSym(stream);
[52] Fix | Delete
if (name == ".") return null;
[53] Fix | Delete
type = "symbol";
[54] Fix | Delete
if (name == "nil" || name == "t" || name.charAt(0) == ":") return "atom";
[55] Fix | Delete
if (state.lastType == "open" && (specialForm.test(name) || assumeBody.test(name))) return "keyword";
[56] Fix | Delete
if (name.charAt(0) == "&") return "variable-2";
[57] Fix | Delete
return "variable";
[58] Fix | Delete
}
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
function inString(stream, state) {
[62] Fix | Delete
var escaped = false, next;
[63] Fix | Delete
while (next = stream.next()) {
[64] Fix | Delete
if (next == '"' && !escaped) { state.tokenize = base; break; }
[65] Fix | Delete
escaped = !escaped && next == "\\";
[66] Fix | Delete
}
[67] Fix | Delete
return "string";
[68] Fix | Delete
}
[69] Fix | Delete
[70] Fix | Delete
function inComment(stream, state) {
[71] Fix | Delete
var next, last;
[72] Fix | Delete
while (next = stream.next()) {
[73] Fix | Delete
if (next == "#" && last == "|") { state.tokenize = base; break; }
[74] Fix | Delete
last = next;
[75] Fix | Delete
}
[76] Fix | Delete
type = "ws";
[77] Fix | Delete
return "comment";
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
return {
[81] Fix | Delete
startState: function () {
[82] Fix | Delete
return {ctx: {prev: null, start: 0, indentTo: 0}, lastType: null, tokenize: base};
[83] Fix | Delete
},
[84] Fix | Delete
[85] Fix | Delete
token: function (stream, state) {
[86] Fix | Delete
if (stream.sol() && typeof state.ctx.indentTo != "number")
[87] Fix | Delete
state.ctx.indentTo = state.ctx.start + 1;
[88] Fix | Delete
[89] Fix | Delete
type = null;
[90] Fix | Delete
var style = state.tokenize(stream, state);
[91] Fix | Delete
if (type != "ws") {
[92] Fix | Delete
if (state.ctx.indentTo == null) {
[93] Fix | Delete
if (type == "symbol" && assumeBody.test(stream.current()))
[94] Fix | Delete
state.ctx.indentTo = state.ctx.start + config.indentUnit;
[95] Fix | Delete
else
[96] Fix | Delete
state.ctx.indentTo = "next";
[97] Fix | Delete
} else if (state.ctx.indentTo == "next") {
[98] Fix | Delete
state.ctx.indentTo = stream.column();
[99] Fix | Delete
}
[100] Fix | Delete
state.lastType = type;
[101] Fix | Delete
}
[102] Fix | Delete
if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null};
[103] Fix | Delete
else if (type == "close") state.ctx = state.ctx.prev || state.ctx;
[104] Fix | Delete
return style;
[105] Fix | Delete
},
[106] Fix | Delete
[107] Fix | Delete
indent: function (state, _textAfter) {
[108] Fix | Delete
var i = state.ctx.indentTo;
[109] Fix | Delete
return typeof i == "number" ? i : state.ctx.start + 1;
[110] Fix | Delete
},
[111] Fix | Delete
[112] Fix | Delete
closeBrackets: {pairs: "()[]{}\"\""},
[113] Fix | Delete
lineComment: ";;",
[114] Fix | Delete
blockCommentStart: "#|",
[115] Fix | Delete
blockCommentEnd: "|#"
[116] Fix | Delete
};
[117] Fix | Delete
});
[118] Fix | Delete
[119] Fix | Delete
CodeMirror.defineMIME("text/x-common-lisp", "commonlisp");
[120] Fix | Delete
[121] Fix | Delete
});
[122] Fix | Delete
[123] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function