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/brainfuc...
File: brainfuck.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
// Brainfuck mode created by Michael Kaminsky https://github.com/mkaminsky11
[3] Fix | Delete
[4] Fix | Delete
(function(mod) {
[5] Fix | Delete
if (typeof exports == "object" && typeof module == "object")
[6] Fix | Delete
mod(require("../../lib/codemirror"))
[7] Fix | Delete
else if (typeof define == "function" && define.amd)
[8] Fix | Delete
define(["../../lib/codemirror"], mod)
[9] Fix | Delete
else
[10] Fix | Delete
mod(CodeMirror)
[11] Fix | Delete
})(function(CodeMirror) {
[12] Fix | Delete
"use strict"
[13] Fix | Delete
var reserve = "><+-.,[]".split("");
[14] Fix | Delete
/*
[15] Fix | Delete
comments can be either:
[16] Fix | Delete
placed behind lines
[17] Fix | Delete
[18] Fix | Delete
+++ this is a comment
[19] Fix | Delete
[20] Fix | Delete
where reserved characters cannot be used
[21] Fix | Delete
or in a loop
[22] Fix | Delete
[
[23] Fix | Delete
this is ok to use [ ] and stuff
[24] Fix | Delete
]
[25] Fix | Delete
or preceded by #
[26] Fix | Delete
*/
[27] Fix | Delete
CodeMirror.defineMode("brainfuck", function() {
[28] Fix | Delete
return {
[29] Fix | Delete
startState: function() {
[30] Fix | Delete
return {
[31] Fix | Delete
commentLine: false,
[32] Fix | Delete
left: 0,
[33] Fix | Delete
right: 0,
[34] Fix | Delete
commentLoop: false
[35] Fix | Delete
}
[36] Fix | Delete
},
[37] Fix | Delete
token: function(stream, state) {
[38] Fix | Delete
if (stream.eatSpace()) return null
[39] Fix | Delete
if(stream.sol()){
[40] Fix | Delete
state.commentLine = false;
[41] Fix | Delete
}
[42] Fix | Delete
var ch = stream.next().toString();
[43] Fix | Delete
if(reserve.indexOf(ch) !== -1){
[44] Fix | Delete
if(state.commentLine === true){
[45] Fix | Delete
if(stream.eol()){
[46] Fix | Delete
state.commentLine = false;
[47] Fix | Delete
}
[48] Fix | Delete
return "comment";
[49] Fix | Delete
}
[50] Fix | Delete
if(ch === "]" || ch === "["){
[51] Fix | Delete
if(ch === "["){
[52] Fix | Delete
state.left++;
[53] Fix | Delete
}
[54] Fix | Delete
else{
[55] Fix | Delete
state.right++;
[56] Fix | Delete
}
[57] Fix | Delete
return "bracket";
[58] Fix | Delete
}
[59] Fix | Delete
else if(ch === "+" || ch === "-"){
[60] Fix | Delete
return "keyword";
[61] Fix | Delete
}
[62] Fix | Delete
else if(ch === "<" || ch === ">"){
[63] Fix | Delete
return "atom";
[64] Fix | Delete
}
[65] Fix | Delete
else if(ch === "." || ch === ","){
[66] Fix | Delete
return "def";
[67] Fix | Delete
}
[68] Fix | Delete
}
[69] Fix | Delete
else{
[70] Fix | Delete
state.commentLine = true;
[71] Fix | Delete
if(stream.eol()){
[72] Fix | Delete
state.commentLine = false;
[73] Fix | Delete
}
[74] Fix | Delete
return "comment";
[75] Fix | Delete
}
[76] Fix | Delete
if(stream.eol()){
[77] Fix | Delete
state.commentLine = false;
[78] Fix | Delete
}
[79] Fix | Delete
}
[80] Fix | Delete
};
[81] Fix | Delete
});
[82] Fix | Delete
CodeMirror.defineMIME("text/x-brainfuck","brainfuck")
[83] Fix | Delete
});
[84] Fix | Delete
[85] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function