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/cmake
File: cmake.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")
[4] Fix | Delete
mod(require("../../lib/codemirror"));
[5] Fix | Delete
else if (typeof define == "function" && define.amd)
[6] Fix | Delete
define(["../../lib/codemirror"], mod);
[7] Fix | Delete
else
[8] Fix | Delete
mod(CodeMirror);
[9] Fix | Delete
})(function(CodeMirror) {
[10] Fix | Delete
"use strict";
[11] Fix | Delete
[12] Fix | Delete
CodeMirror.defineMode("cmake", function () {
[13] Fix | Delete
var variable_regex = /({)?[a-zA-Z0-9_]+(})?/;
[14] Fix | Delete
[15] Fix | Delete
function tokenString(stream, state) {
[16] Fix | Delete
var current, prev, found_var = false;
[17] Fix | Delete
while (!stream.eol() && (current = stream.next()) != state.pending) {
[18] Fix | Delete
if (current === '$' && prev != '\\' && state.pending == '"') {
[19] Fix | Delete
found_var = true;
[20] Fix | Delete
break;
[21] Fix | Delete
}
[22] Fix | Delete
prev = current;
[23] Fix | Delete
}
[24] Fix | Delete
if (found_var) {
[25] Fix | Delete
stream.backUp(1);
[26] Fix | Delete
}
[27] Fix | Delete
if (current == state.pending) {
[28] Fix | Delete
state.continueString = false;
[29] Fix | Delete
} else {
[30] Fix | Delete
state.continueString = true;
[31] Fix | Delete
}
[32] Fix | Delete
return "string";
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
function tokenize(stream, state) {
[36] Fix | Delete
var ch = stream.next();
[37] Fix | Delete
[38] Fix | Delete
// Have we found a variable?
[39] Fix | Delete
if (ch === '$') {
[40] Fix | Delete
if (stream.match(variable_regex)) {
[41] Fix | Delete
return 'variable-2';
[42] Fix | Delete
}
[43] Fix | Delete
return 'variable';
[44] Fix | Delete
}
[45] Fix | Delete
// Should we still be looking for the end of a string?
[46] Fix | Delete
if (state.continueString) {
[47] Fix | Delete
// If so, go through the loop again
[48] Fix | Delete
stream.backUp(1);
[49] Fix | Delete
return tokenString(stream, state);
[50] Fix | Delete
}
[51] Fix | Delete
// Do we just have a function on our hands?
[52] Fix | Delete
// In 'cmake_minimum_required (VERSION 2.8.8)', 'cmake_minimum_required' is matched
[53] Fix | Delete
if (stream.match(/(\s+)?\w+\(/) || stream.match(/(\s+)?\w+\ \(/)) {
[54] Fix | Delete
stream.backUp(1);
[55] Fix | Delete
return 'def';
[56] Fix | Delete
}
[57] Fix | Delete
if (ch == "#") {
[58] Fix | Delete
stream.skipToEnd();
[59] Fix | Delete
return "comment";
[60] Fix | Delete
}
[61] Fix | Delete
// Have we found a string?
[62] Fix | Delete
if (ch == "'" || ch == '"') {
[63] Fix | Delete
// Store the type (single or double)
[64] Fix | Delete
state.pending = ch;
[65] Fix | Delete
// Perform the looping function to find the end
[66] Fix | Delete
return tokenString(stream, state);
[67] Fix | Delete
}
[68] Fix | Delete
if (ch == '(' || ch == ')') {
[69] Fix | Delete
return 'bracket';
[70] Fix | Delete
}
[71] Fix | Delete
if (ch.match(/[0-9]/)) {
[72] Fix | Delete
return 'number';
[73] Fix | Delete
}
[74] Fix | Delete
stream.eatWhile(/[\w-]/);
[75] Fix | Delete
return null;
[76] Fix | Delete
}
[77] Fix | Delete
return {
[78] Fix | Delete
startState: function () {
[79] Fix | Delete
var state = {};
[80] Fix | Delete
state.inDefinition = false;
[81] Fix | Delete
state.inInclude = false;
[82] Fix | Delete
state.continueString = false;
[83] Fix | Delete
state.pending = false;
[84] Fix | Delete
return state;
[85] Fix | Delete
},
[86] Fix | Delete
token: function (stream, state) {
[87] Fix | Delete
if (stream.eatSpace()) return null;
[88] Fix | Delete
return tokenize(stream, state);
[89] Fix | Delete
}
[90] Fix | Delete
};
[91] Fix | Delete
});
[92] Fix | Delete
[93] Fix | Delete
CodeMirror.defineMIME("text/x-cmake", "cmake");
[94] Fix | Delete
[95] Fix | Delete
});
[96] Fix | Delete
[97] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function