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/fcl
File: fcl.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("fcl", function(config) {
[13] Fix | Delete
var indentUnit = config.indentUnit;
[14] Fix | Delete
[15] Fix | Delete
var keywords = {
[16] Fix | Delete
"term": true,
[17] Fix | Delete
"method": true, "accu": true,
[18] Fix | Delete
"rule": true, "then": true, "is": true, "and": true, "or": true,
[19] Fix | Delete
"if": true, "default": true
[20] Fix | Delete
};
[21] Fix | Delete
[22] Fix | Delete
var start_blocks = {
[23] Fix | Delete
"var_input": true,
[24] Fix | Delete
"var_output": true,
[25] Fix | Delete
"fuzzify": true,
[26] Fix | Delete
"defuzzify": true,
[27] Fix | Delete
"function_block": true,
[28] Fix | Delete
"ruleblock": true
[29] Fix | Delete
};
[30] Fix | Delete
[31] Fix | Delete
var end_blocks = {
[32] Fix | Delete
"end_ruleblock": true,
[33] Fix | Delete
"end_defuzzify": true,
[34] Fix | Delete
"end_function_block": true,
[35] Fix | Delete
"end_fuzzify": true,
[36] Fix | Delete
"end_var": true
[37] Fix | Delete
};
[38] Fix | Delete
[39] Fix | Delete
var atoms = {
[40] Fix | Delete
"true": true, "false": true, "nan": true,
[41] Fix | Delete
"real": true, "min": true, "max": true, "cog": true, "cogs": true
[42] Fix | Delete
};
[43] Fix | Delete
[44] Fix | Delete
var isOperatorChar = /[+\-*&^%:=<>!|\/]/;
[45] Fix | Delete
[46] Fix | Delete
function tokenBase(stream, state) {
[47] Fix | Delete
var ch = stream.next();
[48] Fix | Delete
[49] Fix | Delete
if (/[\d\.]/.test(ch)) {
[50] Fix | Delete
if (ch == ".") {
[51] Fix | Delete
stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
[52] Fix | Delete
} else if (ch == "0") {
[53] Fix | Delete
stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
[54] Fix | Delete
} else {
[55] Fix | Delete
stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
[56] Fix | Delete
}
[57] Fix | Delete
return "number";
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
if (ch == "/" || ch == "(") {
[61] Fix | Delete
if (stream.eat("*")) {
[62] Fix | Delete
state.tokenize = tokenComment;
[63] Fix | Delete
return tokenComment(stream, state);
[64] Fix | Delete
}
[65] Fix | Delete
if (stream.eat("/")) {
[66] Fix | Delete
stream.skipToEnd();
[67] Fix | Delete
return "comment";
[68] Fix | Delete
}
[69] Fix | Delete
}
[70] Fix | Delete
if (isOperatorChar.test(ch)) {
[71] Fix | Delete
stream.eatWhile(isOperatorChar);
[72] Fix | Delete
return "operator";
[73] Fix | Delete
}
[74] Fix | Delete
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
[75] Fix | Delete
[76] Fix | Delete
var cur = stream.current().toLowerCase();
[77] Fix | Delete
if (keywords.propertyIsEnumerable(cur) ||
[78] Fix | Delete
start_blocks.propertyIsEnumerable(cur) ||
[79] Fix | Delete
end_blocks.propertyIsEnumerable(cur)) {
[80] Fix | Delete
return "keyword";
[81] Fix | Delete
}
[82] Fix | Delete
if (atoms.propertyIsEnumerable(cur)) return "atom";
[83] Fix | Delete
return "variable";
[84] Fix | Delete
}
[85] Fix | Delete
[86] Fix | Delete
[87] Fix | Delete
function tokenComment(stream, state) {
[88] Fix | Delete
var maybeEnd = false, ch;
[89] Fix | Delete
while (ch = stream.next()) {
[90] Fix | Delete
if ((ch == "/" || ch == ")") && maybeEnd) {
[91] Fix | Delete
state.tokenize = tokenBase;
[92] Fix | Delete
break;
[93] Fix | Delete
}
[94] Fix | Delete
maybeEnd = (ch == "*");
[95] Fix | Delete
}
[96] Fix | Delete
return "comment";
[97] Fix | Delete
}
[98] Fix | Delete
[99] Fix | Delete
function Context(indented, column, type, align, prev) {
[100] Fix | Delete
this.indented = indented;
[101] Fix | Delete
this.column = column;
[102] Fix | Delete
this.type = type;
[103] Fix | Delete
this.align = align;
[104] Fix | Delete
this.prev = prev;
[105] Fix | Delete
}
[106] Fix | Delete
[107] Fix | Delete
function pushContext(state, col, type) {
[108] Fix | Delete
return state.context = new Context(state.indented, col, type, null, state.context);
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
function popContext(state) {
[112] Fix | Delete
if (!state.context.prev) return;
[113] Fix | Delete
var t = state.context.type;
[114] Fix | Delete
if (t == "end_block")
[115] Fix | Delete
state.indented = state.context.indented;
[116] Fix | Delete
return state.context = state.context.prev;
[117] Fix | Delete
}
[118] Fix | Delete
[119] Fix | Delete
// Interface
[120] Fix | Delete
[121] Fix | Delete
return {
[122] Fix | Delete
startState: function(basecolumn) {
[123] Fix | Delete
return {
[124] Fix | Delete
tokenize: null,
[125] Fix | Delete
context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
[126] Fix | Delete
indented: 0,
[127] Fix | Delete
startOfLine: true
[128] Fix | Delete
};
[129] Fix | Delete
},
[130] Fix | Delete
[131] Fix | Delete
token: function(stream, state) {
[132] Fix | Delete
var ctx = state.context;
[133] Fix | Delete
if (stream.sol()) {
[134] Fix | Delete
if (ctx.align == null) ctx.align = false;
[135] Fix | Delete
state.indented = stream.indentation();
[136] Fix | Delete
state.startOfLine = true;
[137] Fix | Delete
}
[138] Fix | Delete
if (stream.eatSpace()) return null;
[139] Fix | Delete
[140] Fix | Delete
var style = (state.tokenize || tokenBase)(stream, state);
[141] Fix | Delete
if (style == "comment") return style;
[142] Fix | Delete
if (ctx.align == null) ctx.align = true;
[143] Fix | Delete
[144] Fix | Delete
var cur = stream.current().toLowerCase();
[145] Fix | Delete
[146] Fix | Delete
if (start_blocks.propertyIsEnumerable(cur)) pushContext(state, stream.column(), "end_block");
[147] Fix | Delete
else if (end_blocks.propertyIsEnumerable(cur)) popContext(state);
[148] Fix | Delete
[149] Fix | Delete
state.startOfLine = false;
[150] Fix | Delete
return style;
[151] Fix | Delete
},
[152] Fix | Delete
[153] Fix | Delete
indent: function(state, textAfter) {
[154] Fix | Delete
if (state.tokenize != tokenBase && state.tokenize != null) return 0;
[155] Fix | Delete
var ctx = state.context;
[156] Fix | Delete
[157] Fix | Delete
var closing = end_blocks.propertyIsEnumerable(textAfter);
[158] Fix | Delete
if (ctx.align) return ctx.column + (closing ? 0 : 1);
[159] Fix | Delete
else return ctx.indented + (closing ? 0 : indentUnit);
[160] Fix | Delete
},
[161] Fix | Delete
[162] Fix | Delete
electricChars: "ryk",
[163] Fix | Delete
fold: "brace",
[164] Fix | Delete
blockCommentStart: "(*",
[165] Fix | Delete
blockCommentEnd: "*)",
[166] Fix | Delete
lineComment: "//"
[167] Fix | Delete
};
[168] Fix | Delete
});
[169] Fix | Delete
[170] Fix | Delete
CodeMirror.defineMIME("text/x-fcl", "fcl");
[171] Fix | Delete
});
[172] Fix | Delete
[173] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function