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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/perl
File: perl.js
return state.tokenize(stream,state);}
[500] Fix | Delete
[501] Fix | Delete
function tokenSOMETHING(stream,state,string){
[502] Fix | Delete
state.tokenize=function(stream,state){
[503] Fix | Delete
if(stream.string==string)
[504] Fix | Delete
state.tokenize=tokenPerl;
[505] Fix | Delete
stream.skipToEnd();
[506] Fix | Delete
return "string";};
[507] Fix | Delete
return state.tokenize(stream,state);}
[508] Fix | Delete
[509] Fix | Delete
function tokenPerl(stream,state){
[510] Fix | Delete
if(stream.eatSpace())
[511] Fix | Delete
return null;
[512] Fix | Delete
if(state.chain)
[513] Fix | Delete
return tokenChain(stream,state,state.chain,state.style,state.tail);
[514] Fix | Delete
if(stream.match(/^\-?[\d\.]/,false))
[515] Fix | Delete
if(stream.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))
[516] Fix | Delete
return 'number';
[517] Fix | Delete
if(stream.match(/^<<(?=\w)/)){ // NOTE: <<SOMETHING\n...\nSOMETHING\n
[518] Fix | Delete
stream.eatWhile(/\w/);
[519] Fix | Delete
return tokenSOMETHING(stream,state,stream.current().substr(2));}
[520] Fix | Delete
if(stream.sol()&&stream.match(/^\=item(?!\w)/)){// NOTE: \n=item...\n=cut\n
[521] Fix | Delete
return tokenSOMETHING(stream,state,'=cut');}
[522] Fix | Delete
var ch=stream.next();
[523] Fix | Delete
if(ch=='"'||ch=="'"){ // NOTE: ' or " or <<'SOMETHING'\n...\nSOMETHING\n or <<"SOMETHING"\n...\nSOMETHING\n
[524] Fix | Delete
if(prefix(stream, 3)=="<<"+ch){
[525] Fix | Delete
var p=stream.pos;
[526] Fix | Delete
stream.eatWhile(/\w/);
[527] Fix | Delete
var n=stream.current().substr(1);
[528] Fix | Delete
if(n&&stream.eat(ch))
[529] Fix | Delete
return tokenSOMETHING(stream,state,n);
[530] Fix | Delete
stream.pos=p;}
[531] Fix | Delete
return tokenChain(stream,state,[ch],"string");}
[532] Fix | Delete
if(ch=="q"){
[533] Fix | Delete
var c=look(stream, -2);
[534] Fix | Delete
if(!(c&&/\w/.test(c))){
[535] Fix | Delete
c=look(stream, 0);
[536] Fix | Delete
if(c=="x"){
[537] Fix | Delete
c=look(stream, 1);
[538] Fix | Delete
if(c=="("){
[539] Fix | Delete
eatSuffix(stream, 2);
[540] Fix | Delete
return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
[541] Fix | Delete
if(c=="["){
[542] Fix | Delete
eatSuffix(stream, 2);
[543] Fix | Delete
return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
[544] Fix | Delete
if(c=="{"){
[545] Fix | Delete
eatSuffix(stream, 2);
[546] Fix | Delete
return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
[547] Fix | Delete
if(c=="<"){
[548] Fix | Delete
eatSuffix(stream, 2);
[549] Fix | Delete
return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
[550] Fix | Delete
if(/[\^'"!~\/]/.test(c)){
[551] Fix | Delete
eatSuffix(stream, 1);
[552] Fix | Delete
return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
[553] Fix | Delete
else if(c=="q"){
[554] Fix | Delete
c=look(stream, 1);
[555] Fix | Delete
if(c=="("){
[556] Fix | Delete
eatSuffix(stream, 2);
[557] Fix | Delete
return tokenChain(stream,state,[")"],"string");}
[558] Fix | Delete
if(c=="["){
[559] Fix | Delete
eatSuffix(stream, 2);
[560] Fix | Delete
return tokenChain(stream,state,["]"],"string");}
[561] Fix | Delete
if(c=="{"){
[562] Fix | Delete
eatSuffix(stream, 2);
[563] Fix | Delete
return tokenChain(stream,state,["}"],"string");}
[564] Fix | Delete
if(c=="<"){
[565] Fix | Delete
eatSuffix(stream, 2);
[566] Fix | Delete
return tokenChain(stream,state,[">"],"string");}
[567] Fix | Delete
if(/[\^'"!~\/]/.test(c)){
[568] Fix | Delete
eatSuffix(stream, 1);
[569] Fix | Delete
return tokenChain(stream,state,[stream.eat(c)],"string");}}
[570] Fix | Delete
else if(c=="w"){
[571] Fix | Delete
c=look(stream, 1);
[572] Fix | Delete
if(c=="("){
[573] Fix | Delete
eatSuffix(stream, 2);
[574] Fix | Delete
return tokenChain(stream,state,[")"],"bracket");}
[575] Fix | Delete
if(c=="["){
[576] Fix | Delete
eatSuffix(stream, 2);
[577] Fix | Delete
return tokenChain(stream,state,["]"],"bracket");}
[578] Fix | Delete
if(c=="{"){
[579] Fix | Delete
eatSuffix(stream, 2);
[580] Fix | Delete
return tokenChain(stream,state,["}"],"bracket");}
[581] Fix | Delete
if(c=="<"){
[582] Fix | Delete
eatSuffix(stream, 2);
[583] Fix | Delete
return tokenChain(stream,state,[">"],"bracket");}
[584] Fix | Delete
if(/[\^'"!~\/]/.test(c)){
[585] Fix | Delete
eatSuffix(stream, 1);
[586] Fix | Delete
return tokenChain(stream,state,[stream.eat(c)],"bracket");}}
[587] Fix | Delete
else if(c=="r"){
[588] Fix | Delete
c=look(stream, 1);
[589] Fix | Delete
if(c=="("){
[590] Fix | Delete
eatSuffix(stream, 2);
[591] Fix | Delete
return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
[592] Fix | Delete
if(c=="["){
[593] Fix | Delete
eatSuffix(stream, 2);
[594] Fix | Delete
return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
[595] Fix | Delete
if(c=="{"){
[596] Fix | Delete
eatSuffix(stream, 2);
[597] Fix | Delete
return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
[598] Fix | Delete
if(c=="<"){
[599] Fix | Delete
eatSuffix(stream, 2);
[600] Fix | Delete
return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
[601] Fix | Delete
if(/[\^'"!~\/]/.test(c)){
[602] Fix | Delete
eatSuffix(stream, 1);
[603] Fix | Delete
return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
[604] Fix | Delete
else if(/[\^'"!~\/(\[{<]/.test(c)){
[605] Fix | Delete
if(c=="("){
[606] Fix | Delete
eatSuffix(stream, 1);
[607] Fix | Delete
return tokenChain(stream,state,[")"],"string");}
[608] Fix | Delete
if(c=="["){
[609] Fix | Delete
eatSuffix(stream, 1);
[610] Fix | Delete
return tokenChain(stream,state,["]"],"string");}
[611] Fix | Delete
if(c=="{"){
[612] Fix | Delete
eatSuffix(stream, 1);
[613] Fix | Delete
return tokenChain(stream,state,["}"],"string");}
[614] Fix | Delete
if(c=="<"){
[615] Fix | Delete
eatSuffix(stream, 1);
[616] Fix | Delete
return tokenChain(stream,state,[">"],"string");}
[617] Fix | Delete
if(/[\^'"!~\/]/.test(c)){
[618] Fix | Delete
return tokenChain(stream,state,[stream.eat(c)],"string");}}}}
[619] Fix | Delete
if(ch=="m"){
[620] Fix | Delete
var c=look(stream, -2);
[621] Fix | Delete
if(!(c&&/\w/.test(c))){
[622] Fix | Delete
c=stream.eat(/[(\[{<\^'"!~\/]/);
[623] Fix | Delete
if(c){
[624] Fix | Delete
if(/[\^'"!~\/]/.test(c)){
[625] Fix | Delete
return tokenChain(stream,state,[c],RXstyle,RXmodifiers);}
[626] Fix | Delete
if(c=="("){
[627] Fix | Delete
return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
[628] Fix | Delete
if(c=="["){
[629] Fix | Delete
return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
[630] Fix | Delete
if(c=="{"){
[631] Fix | Delete
return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
[632] Fix | Delete
if(c=="<"){
[633] Fix | Delete
return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}}
[634] Fix | Delete
if(ch=="s"){
[635] Fix | Delete
var c=/[\/>\]})\w]/.test(look(stream, -2));
[636] Fix | Delete
if(!c){
[637] Fix | Delete
c=stream.eat(/[(\[{<\^'"!~\/]/);
[638] Fix | Delete
if(c){
[639] Fix | Delete
if(c=="[")
[640] Fix | Delete
return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
[641] Fix | Delete
if(c=="{")
[642] Fix | Delete
return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
[643] Fix | Delete
if(c=="<")
[644] Fix | Delete
return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
[645] Fix | Delete
if(c=="(")
[646] Fix | Delete
return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
[647] Fix | Delete
return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
[648] Fix | Delete
if(ch=="y"){
[649] Fix | Delete
var c=/[\/>\]})\w]/.test(look(stream, -2));
[650] Fix | Delete
if(!c){
[651] Fix | Delete
c=stream.eat(/[(\[{<\^'"!~\/]/);
[652] Fix | Delete
if(c){
[653] Fix | Delete
if(c=="[")
[654] Fix | Delete
return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
[655] Fix | Delete
if(c=="{")
[656] Fix | Delete
return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
[657] Fix | Delete
if(c=="<")
[658] Fix | Delete
return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
[659] Fix | Delete
if(c=="(")
[660] Fix | Delete
return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
[661] Fix | Delete
return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
[662] Fix | Delete
if(ch=="t"){
[663] Fix | Delete
var c=/[\/>\]})\w]/.test(look(stream, -2));
[664] Fix | Delete
if(!c){
[665] Fix | Delete
c=stream.eat("r");if(c){
[666] Fix | Delete
c=stream.eat(/[(\[{<\^'"!~\/]/);
[667] Fix | Delete
if(c){
[668] Fix | Delete
if(c=="[")
[669] Fix | Delete
return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
[670] Fix | Delete
if(c=="{")
[671] Fix | Delete
return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
[672] Fix | Delete
if(c=="<")
[673] Fix | Delete
return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
[674] Fix | Delete
if(c=="(")
[675] Fix | Delete
return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
[676] Fix | Delete
return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}}
[677] Fix | Delete
if(ch=="`"){
[678] Fix | Delete
return tokenChain(stream,state,[ch],"variable-2");}
[679] Fix | Delete
if(ch=="/"){
[680] Fix | Delete
if(!/~\s*$/.test(prefix(stream)))
[681] Fix | Delete
return "operator";
[682] Fix | Delete
else
[683] Fix | Delete
return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);}
[684] Fix | Delete
if(ch=="$"){
[685] Fix | Delete
var p=stream.pos;
[686] Fix | Delete
if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}"))
[687] Fix | Delete
return "variable-2";
[688] Fix | Delete
else
[689] Fix | Delete
stream.pos=p;}
[690] Fix | Delete
if(/[$@%]/.test(ch)){
[691] Fix | Delete
var p=stream.pos;
[692] Fix | Delete
if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(look(stream, -2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){
[693] Fix | Delete
var c=stream.current();
[694] Fix | Delete
if(PERL[c])
[695] Fix | Delete
return "variable-2";}
[696] Fix | Delete
stream.pos=p;}
[697] Fix | Delete
if(/[$@%&]/.test(ch)){
[698] Fix | Delete
if(stream.eatWhile(/[\w$\[\]]/)||stream.eat("{")&&stream.eatWhile(/[\w$\[\]]/)&&stream.eat("}")){
[699] Fix | Delete
var c=stream.current();
[700] Fix | Delete
if(PERL[c])
[701] Fix | Delete
return "variable-2";
[702] Fix | Delete
else
[703] Fix | Delete
return "variable";}}
[704] Fix | Delete
if(ch=="#"){
[705] Fix | Delete
if(look(stream, -2)!="$"){
[706] Fix | Delete
stream.skipToEnd();
[707] Fix | Delete
return "comment";}}
[708] Fix | Delete
if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){
[709] Fix | Delete
var p=stream.pos;
[710] Fix | Delete
stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);
[711] Fix | Delete
if(PERL[stream.current()])
[712] Fix | Delete
return "operator";
[713] Fix | Delete
else
[714] Fix | Delete
stream.pos=p;}
[715] Fix | Delete
if(ch=="_"){
[716] Fix | Delete
if(stream.pos==1){
[717] Fix | Delete
if(suffix(stream, 6)=="_END__"){
[718] Fix | Delete
return tokenChain(stream,state,['\0'],"comment");}
[719] Fix | Delete
else if(suffix(stream, 7)=="_DATA__"){
[720] Fix | Delete
return tokenChain(stream,state,['\0'],"variable-2");}
[721] Fix | Delete
else if(suffix(stream, 7)=="_C__"){
[722] Fix | Delete
return tokenChain(stream,state,['\0'],"string");}}}
[723] Fix | Delete
if(/\w/.test(ch)){
[724] Fix | Delete
var p=stream.pos;
[725] Fix | Delete
if(look(stream, -2)=="{"&&(look(stream, 0)=="}"||stream.eatWhile(/\w/)&&look(stream, 0)=="}"))
[726] Fix | Delete
return "string";
[727] Fix | Delete
else
[728] Fix | Delete
stream.pos=p;}
[729] Fix | Delete
if(/[A-Z]/.test(ch)){
[730] Fix | Delete
var l=look(stream, -2);
[731] Fix | Delete
var p=stream.pos;
[732] Fix | Delete
stream.eatWhile(/[A-Z_]/);
[733] Fix | Delete
if(/[\da-z]/.test(look(stream, 0))){
[734] Fix | Delete
stream.pos=p;}
[735] Fix | Delete
else{
[736] Fix | Delete
var c=PERL[stream.current()];
[737] Fix | Delete
if(!c)
[738] Fix | Delete
return "meta";
[739] Fix | Delete
if(c[1])
[740] Fix | Delete
c=c[0];
[741] Fix | Delete
if(l!=":"){
[742] Fix | Delete
if(c==1)
[743] Fix | Delete
return "keyword";
[744] Fix | Delete
else if(c==2)
[745] Fix | Delete
return "def";
[746] Fix | Delete
else if(c==3)
[747] Fix | Delete
return "atom";
[748] Fix | Delete
else if(c==4)
[749] Fix | Delete
return "operator";
[750] Fix | Delete
else if(c==5)
[751] Fix | Delete
return "variable-2";
[752] Fix | Delete
else
[753] Fix | Delete
return "meta";}
[754] Fix | Delete
else
[755] Fix | Delete
return "meta";}}
[756] Fix | Delete
if(/[a-zA-Z_]/.test(ch)){
[757] Fix | Delete
var l=look(stream, -2);
[758] Fix | Delete
stream.eatWhile(/\w/);
[759] Fix | Delete
var c=PERL[stream.current()];
[760] Fix | Delete
if(!c)
[761] Fix | Delete
return "meta";
[762] Fix | Delete
if(c[1])
[763] Fix | Delete
c=c[0];
[764] Fix | Delete
if(l!=":"){
[765] Fix | Delete
if(c==1)
[766] Fix | Delete
return "keyword";
[767] Fix | Delete
else if(c==2)
[768] Fix | Delete
return "def";
[769] Fix | Delete
else if(c==3)
[770] Fix | Delete
return "atom";
[771] Fix | Delete
else if(c==4)
[772] Fix | Delete
return "operator";
[773] Fix | Delete
else if(c==5)
[774] Fix | Delete
return "variable-2";
[775] Fix | Delete
else
[776] Fix | Delete
return "meta";}
[777] Fix | Delete
else
[778] Fix | Delete
return "meta";}
[779] Fix | Delete
return null;}
[780] Fix | Delete
[781] Fix | Delete
return {
[782] Fix | Delete
startState: function() {
[783] Fix | Delete
return {
[784] Fix | Delete
tokenize: tokenPerl,
[785] Fix | Delete
chain: null,
[786] Fix | Delete
style: null,
[787] Fix | Delete
tail: null
[788] Fix | Delete
};
[789] Fix | Delete
},
[790] Fix | Delete
token: function(stream, state) {
[791] Fix | Delete
return (state.tokenize || tokenPerl)(stream, state);
[792] Fix | Delete
},
[793] Fix | Delete
lineComment: '#'
[794] Fix | Delete
};
[795] Fix | Delete
});
[796] Fix | Delete
[797] Fix | Delete
CodeMirror.registerHelper("wordChars", "perl", /[\w$]/);
[798] Fix | Delete
[799] Fix | Delete
CodeMirror.defineMIME("text/x-perl", "perl");
[800] Fix | Delete
[801] Fix | Delete
// it's like "peek", but need for look-ahead or look-behind if index < 0
[802] Fix | Delete
function look(stream, c){
[803] Fix | Delete
return stream.string.charAt(stream.pos+(c||0));
[804] Fix | Delete
}
[805] Fix | Delete
[806] Fix | Delete
// return a part of prefix of current stream from current position
[807] Fix | Delete
function prefix(stream, c){
[808] Fix | Delete
if(c){
[809] Fix | Delete
var x=stream.pos-c;
[810] Fix | Delete
return stream.string.substr((x>=0?x:0),c);}
[811] Fix | Delete
else{
[812] Fix | Delete
return stream.string.substr(0,stream.pos-1);
[813] Fix | Delete
}
[814] Fix | Delete
}
[815] Fix | Delete
[816] Fix | Delete
// return a part of suffix of current stream from current position
[817] Fix | Delete
function suffix(stream, c){
[818] Fix | Delete
var y=stream.string.length;
[819] Fix | Delete
var x=y-stream.pos+1;
[820] Fix | Delete
return stream.string.substr(stream.pos,(c&&c<y?c:x));
[821] Fix | Delete
}
[822] Fix | Delete
[823] Fix | Delete
// eating and vomiting a part of stream from current position
[824] Fix | Delete
function eatSuffix(stream, c){
[825] Fix | Delete
var x=stream.pos+c;
[826] Fix | Delete
var y;
[827] Fix | Delete
if(x<=0)
[828] Fix | Delete
stream.pos=0;
[829] Fix | Delete
else if(x>=(y=stream.string.length-1))
[830] Fix | Delete
stream.pos=y;
[831] Fix | Delete
else
[832] Fix | Delete
stream.pos=x;
[833] Fix | Delete
}
[834] Fix | Delete
[835] Fix | Delete
});
[836] Fix | Delete
[837] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function