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/q
File: q.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("q",function(config){
[13] Fix | Delete
var indentUnit=config.indentUnit,
[14] Fix | Delete
curPunc,
[15] Fix | Delete
keywords=buildRE(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]),
[16] Fix | Delete
E=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;
[17] Fix | Delete
function buildRE(w){return new RegExp("^("+w.join("|")+")$");}
[18] Fix | Delete
function tokenBase(stream,state){
[19] Fix | Delete
var sol=stream.sol(),c=stream.next();
[20] Fix | Delete
curPunc=null;
[21] Fix | Delete
if(sol)
[22] Fix | Delete
if(c=="/")
[23] Fix | Delete
return(state.tokenize=tokenLineComment)(stream,state);
[24] Fix | Delete
else if(c=="\\"){
[25] Fix | Delete
if(stream.eol()||/\s/.test(stream.peek()))
[26] Fix | Delete
return stream.skipToEnd(),/^\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream, state):state.tokenize=tokenBase,"comment";
[27] Fix | Delete
else
[28] Fix | Delete
return state.tokenize=tokenBase,"builtin";
[29] Fix | Delete
}
[30] Fix | Delete
if(/\s/.test(c))
[31] Fix | Delete
return stream.peek()=="/"?(stream.skipToEnd(),"comment"):"whitespace";
[32] Fix | Delete
if(c=='"')
[33] Fix | Delete
return(state.tokenize=tokenString)(stream,state);
[34] Fix | Delete
if(c=='`')
[35] Fix | Delete
return stream.eatWhile(/[A-Z|a-z|\d|_|:|\/|\.]/),"symbol";
[36] Fix | Delete
if(("."==c&&/\d/.test(stream.peek()))||/\d/.test(c)){
[37] Fix | Delete
var t=null;
[38] Fix | Delete
stream.backUp(1);
[39] Fix | Delete
if(stream.match(/^\d{4}\.\d{2}(m|\.\d{2}([D|T](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)
[40] Fix | Delete
|| stream.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)
[41] Fix | Delete
|| stream.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)
[42] Fix | Delete
|| stream.match(/^\d+[ptuv]{1}/))
[43] Fix | Delete
t="temporal";
[44] Fix | Delete
else if(stream.match(/^0[NwW]{1}/)
[45] Fix | Delete
|| stream.match(/^0x[\d|a-f|A-F]*/)
[46] Fix | Delete
|| stream.match(/^[0|1]+[b]{1}/)
[47] Fix | Delete
|| stream.match(/^\d+[chijn]{1}/)
[48] Fix | Delete
|| stream.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))
[49] Fix | Delete
t="number";
[50] Fix | Delete
return(t&&(!(c=stream.peek())||E.test(c)))?t:(stream.next(),"error");
[51] Fix | Delete
}
[52] Fix | Delete
if(/[A-Z|a-z]|\./.test(c))
[53] Fix | Delete
return stream.eatWhile(/[A-Z|a-z|\.|_|\d]/),keywords.test(stream.current())?"keyword":"variable";
[54] Fix | Delete
if(/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(c))
[55] Fix | Delete
return null;
[56] Fix | Delete
if(/[{}\(\[\]\)]/.test(c))
[57] Fix | Delete
return null;
[58] Fix | Delete
return"error";
[59] Fix | Delete
}
[60] Fix | Delete
function tokenLineComment(stream,state){
[61] Fix | Delete
return stream.skipToEnd(),/\/\s*$/.test(stream.current())?(state.tokenize=tokenBlockComment)(stream,state):(state.tokenize=tokenBase),"comment";
[62] Fix | Delete
}
[63] Fix | Delete
function tokenBlockComment(stream,state){
[64] Fix | Delete
var f=stream.sol()&&stream.peek()=="\\";
[65] Fix | Delete
stream.skipToEnd();
[66] Fix | Delete
if(f&&/^\\\s*$/.test(stream.current()))
[67] Fix | Delete
state.tokenize=tokenBase;
[68] Fix | Delete
return"comment";
[69] Fix | Delete
}
[70] Fix | Delete
function tokenCommentToEOF(stream){return stream.skipToEnd(),"comment";}
[71] Fix | Delete
function tokenString(stream,state){
[72] Fix | Delete
var escaped=false,next,end=false;
[73] Fix | Delete
while((next=stream.next())){
[74] Fix | Delete
if(next=="\""&&!escaped){end=true;break;}
[75] Fix | Delete
escaped=!escaped&&next=="\\";
[76] Fix | Delete
}
[77] Fix | Delete
if(end)state.tokenize=tokenBase;
[78] Fix | Delete
return"string";
[79] Fix | Delete
}
[80] Fix | Delete
function pushContext(state,type,col){state.context={prev:state.context,indent:state.indent,col:col,type:type};}
[81] Fix | Delete
function popContext(state){state.indent=state.context.indent;state.context=state.context.prev;}
[82] Fix | Delete
return{
[83] Fix | Delete
startState:function(){
[84] Fix | Delete
return{tokenize:tokenBase,
[85] Fix | Delete
context:null,
[86] Fix | Delete
indent:0,
[87] Fix | Delete
col:0};
[88] Fix | Delete
},
[89] Fix | Delete
token:function(stream,state){
[90] Fix | Delete
if(stream.sol()){
[91] Fix | Delete
if(state.context&&state.context.align==null)
[92] Fix | Delete
state.context.align=false;
[93] Fix | Delete
state.indent=stream.indentation();
[94] Fix | Delete
}
[95] Fix | Delete
//if (stream.eatSpace()) return null;
[96] Fix | Delete
var style=state.tokenize(stream,state);
[97] Fix | Delete
if(style!="comment"&&state.context&&state.context.align==null&&state.context.type!="pattern"){
[98] Fix | Delete
state.context.align=true;
[99] Fix | Delete
}
[100] Fix | Delete
if(curPunc=="(")pushContext(state,")",stream.column());
[101] Fix | Delete
else if(curPunc=="[")pushContext(state,"]",stream.column());
[102] Fix | Delete
else if(curPunc=="{")pushContext(state,"}",stream.column());
[103] Fix | Delete
else if(/[\]\}\)]/.test(curPunc)){
[104] Fix | Delete
while(state.context&&state.context.type=="pattern")popContext(state);
[105] Fix | Delete
if(state.context&&curPunc==state.context.type)popContext(state);
[106] Fix | Delete
}
[107] Fix | Delete
else if(curPunc=="."&&state.context&&state.context.type=="pattern")popContext(state);
[108] Fix | Delete
else if(/atom|string|variable/.test(style)&&state.context){
[109] Fix | Delete
if(/[\}\]]/.test(state.context.type))
[110] Fix | Delete
pushContext(state,"pattern",stream.column());
[111] Fix | Delete
else if(state.context.type=="pattern"&&!state.context.align){
[112] Fix | Delete
state.context.align=true;
[113] Fix | Delete
state.context.col=stream.column();
[114] Fix | Delete
}
[115] Fix | Delete
}
[116] Fix | Delete
return style;
[117] Fix | Delete
},
[118] Fix | Delete
indent:function(state,textAfter){
[119] Fix | Delete
var firstChar=textAfter&&textAfter.charAt(0);
[120] Fix | Delete
var context=state.context;
[121] Fix | Delete
if(/[\]\}]/.test(firstChar))
[122] Fix | Delete
while (context&&context.type=="pattern")context=context.prev;
[123] Fix | Delete
var closing=context&&firstChar==context.type;
[124] Fix | Delete
if(!context)
[125] Fix | Delete
return 0;
[126] Fix | Delete
else if(context.type=="pattern")
[127] Fix | Delete
return context.col;
[128] Fix | Delete
else if(context.align)
[129] Fix | Delete
return context.col+(closing?0:1);
[130] Fix | Delete
else
[131] Fix | Delete
return context.indent+(closing?0:indentUnit);
[132] Fix | Delete
}
[133] Fix | Delete
};
[134] Fix | Delete
});
[135] Fix | Delete
CodeMirror.defineMIME("text/x-q","q");
[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