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.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/tcl
File: tcl.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
//tcl mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara
[3] Fix | Delete
[4] Fix | Delete
(function(mod) {
[5] Fix | Delete
if (typeof exports == "object" && typeof module == "object") // CommonJS
[6] Fix | Delete
mod(require("../../lib/codemirror"));
[7] Fix | Delete
else if (typeof define == "function" && define.amd) // AMD
[8] Fix | Delete
define(["../../lib/codemirror"], mod);
[9] Fix | Delete
else // Plain browser env
[10] Fix | Delete
mod(CodeMirror);
[11] Fix | Delete
})(function(CodeMirror) {
[12] Fix | Delete
"use strict";
[13] Fix | Delete
[14] Fix | Delete
CodeMirror.defineMode("tcl", function() {
[15] Fix | Delete
function parseWords(str) {
[16] Fix | Delete
var obj = {}, words = str.split(" ");
[17] Fix | Delete
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
[18] Fix | Delete
return obj;
[19] Fix | Delete
}
[20] Fix | Delete
var keywords = parseWords("Tcl safe after append array auto_execok auto_import auto_load " +
[21] Fix | Delete
"auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror " +
[22] Fix | Delete
"binary break catch cd close concat continue dde eof encoding error " +
[23] Fix | Delete
"eval exec exit expr fblocked fconfigure fcopy file fileevent filename " +
[24] Fix | Delete
"filename flush for foreach format gets glob global history http if " +
[25] Fix | Delete
"incr info interp join lappend lindex linsert list llength load lrange " +
[26] Fix | Delete
"lreplace lsearch lset lsort memory msgcat namespace open package parray " +
[27] Fix | Delete
"pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp " +
[28] Fix | Delete
"registry regsub rename resource return scan seek set socket source split " +
[29] Fix | Delete
"string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord " +
[30] Fix | Delete
"tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest " +
[31] Fix | Delete
"tclvars tell time trace unknown unset update uplevel upvar variable " +
[32] Fix | Delete
"vwait");
[33] Fix | Delete
var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch");
[34] Fix | Delete
var isOperatorChar = /[+\-*&%=<>!?^\/\|]/;
[35] Fix | Delete
function chain(stream, state, f) {
[36] Fix | Delete
state.tokenize = f;
[37] Fix | Delete
return f(stream, state);
[38] Fix | Delete
}
[39] Fix | Delete
function tokenBase(stream, state) {
[40] Fix | Delete
var beforeParams = state.beforeParams;
[41] Fix | Delete
state.beforeParams = false;
[42] Fix | Delete
var ch = stream.next();
[43] Fix | Delete
if ((ch == '"' || ch == "'") && state.inParams) {
[44] Fix | Delete
return chain(stream, state, tokenString(ch));
[45] Fix | Delete
} else if (/[\[\]{}\(\),;\.]/.test(ch)) {
[46] Fix | Delete
if (ch == "(" && beforeParams) state.inParams = true;
[47] Fix | Delete
else if (ch == ")") state.inParams = false;
[48] Fix | Delete
return null;
[49] Fix | Delete
} else if (/\d/.test(ch)) {
[50] Fix | Delete
stream.eatWhile(/[\w\.]/);
[51] Fix | Delete
return "number";
[52] Fix | Delete
} else if (ch == "#") {
[53] Fix | Delete
if (stream.eat("*"))
[54] Fix | Delete
return chain(stream, state, tokenComment);
[55] Fix | Delete
if (ch == "#" && stream.match(/ *\[ *\[/))
[56] Fix | Delete
return chain(stream, state, tokenUnparsed);
[57] Fix | Delete
stream.skipToEnd();
[58] Fix | Delete
return "comment";
[59] Fix | Delete
} else if (ch == '"') {
[60] Fix | Delete
stream.skipTo(/"/);
[61] Fix | Delete
return "comment";
[62] Fix | Delete
} else if (ch == "$") {
[63] Fix | Delete
stream.eatWhile(/[$_a-z0-9A-Z\.{:]/);
[64] Fix | Delete
stream.eatWhile(/}/);
[65] Fix | Delete
state.beforeParams = true;
[66] Fix | Delete
return "builtin";
[67] Fix | Delete
} else if (isOperatorChar.test(ch)) {
[68] Fix | Delete
stream.eatWhile(isOperatorChar);
[69] Fix | Delete
return "comment";
[70] Fix | Delete
} else {
[71] Fix | Delete
stream.eatWhile(/[\w\$_{}\xa1-\uffff]/);
[72] Fix | Delete
var word = stream.current().toLowerCase();
[73] Fix | Delete
if (keywords && keywords.propertyIsEnumerable(word))
[74] Fix | Delete
return "keyword";
[75] Fix | Delete
if (functions && functions.propertyIsEnumerable(word)) {
[76] Fix | Delete
state.beforeParams = true;
[77] Fix | Delete
return "keyword";
[78] Fix | Delete
}
[79] Fix | Delete
return null;
[80] Fix | Delete
}
[81] Fix | Delete
}
[82] Fix | Delete
function tokenString(quote) {
[83] Fix | Delete
return function(stream, state) {
[84] Fix | Delete
var escaped = false, next, end = false;
[85] Fix | Delete
while ((next = stream.next()) != null) {
[86] Fix | Delete
if (next == quote && !escaped) {
[87] Fix | Delete
end = true;
[88] Fix | Delete
break;
[89] Fix | Delete
}
[90] Fix | Delete
escaped = !escaped && next == "\\";
[91] Fix | Delete
}
[92] Fix | Delete
if (end) state.tokenize = tokenBase;
[93] Fix | Delete
return "string";
[94] Fix | Delete
};
[95] Fix | Delete
}
[96] Fix | Delete
function tokenComment(stream, state) {
[97] Fix | Delete
var maybeEnd = false, ch;
[98] Fix | Delete
while (ch = stream.next()) {
[99] Fix | Delete
if (ch == "#" && maybeEnd) {
[100] Fix | Delete
state.tokenize = tokenBase;
[101] Fix | Delete
break;
[102] Fix | Delete
}
[103] Fix | Delete
maybeEnd = (ch == "*");
[104] Fix | Delete
}
[105] Fix | Delete
return "comment";
[106] Fix | Delete
}
[107] Fix | Delete
function tokenUnparsed(stream, state) {
[108] Fix | Delete
var maybeEnd = 0, ch;
[109] Fix | Delete
while (ch = stream.next()) {
[110] Fix | Delete
if (ch == "#" && maybeEnd == 2) {
[111] Fix | Delete
state.tokenize = tokenBase;
[112] Fix | Delete
break;
[113] Fix | Delete
}
[114] Fix | Delete
if (ch == "]")
[115] Fix | Delete
maybeEnd++;
[116] Fix | Delete
else if (ch != " ")
[117] Fix | Delete
maybeEnd = 0;
[118] Fix | Delete
}
[119] Fix | Delete
return "meta";
[120] Fix | Delete
}
[121] Fix | Delete
return {
[122] Fix | Delete
startState: function() {
[123] Fix | Delete
return {
[124] Fix | Delete
tokenize: tokenBase,
[125] Fix | Delete
beforeParams: false,
[126] Fix | Delete
inParams: false
[127] Fix | Delete
};
[128] Fix | Delete
},
[129] Fix | Delete
token: function(stream, state) {
[130] Fix | Delete
if (stream.eatSpace()) return null;
[131] Fix | Delete
return state.tokenize(stream, state);
[132] Fix | Delete
}
[133] Fix | Delete
};
[134] Fix | Delete
});
[135] Fix | Delete
CodeMirror.defineMIME("text/x-tcl", "tcl");
[136] Fix | Delete
[137] Fix | Delete
});
[138] Fix | Delete
[139] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function