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/clike
File: clike.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
function Context(indented, column, type, info, align, prev) {
[13] Fix | Delete
this.indented = indented;
[14] Fix | Delete
this.column = column;
[15] Fix | Delete
this.type = type;
[16] Fix | Delete
this.info = info;
[17] Fix | Delete
this.align = align;
[18] Fix | Delete
this.prev = prev;
[19] Fix | Delete
}
[20] Fix | Delete
function pushContext(state, col, type, info) {
[21] Fix | Delete
var indent = state.indented;
[22] Fix | Delete
if (state.context && state.context.type != "statement" && type != "statement")
[23] Fix | Delete
indent = state.context.indented;
[24] Fix | Delete
return state.context = new Context(indent, col, type, info, null, state.context);
[25] Fix | Delete
}
[26] Fix | Delete
function popContext(state) {
[27] Fix | Delete
var t = state.context.type;
[28] Fix | Delete
if (t == ")" || t == "]" || t == "}")
[29] Fix | Delete
state.indented = state.context.indented;
[30] Fix | Delete
return state.context = state.context.prev;
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
function typeBefore(stream, state, pos) {
[34] Fix | Delete
if (state.prevToken == "variable" || state.prevToken == "variable-3") return true;
[35] Fix | Delete
if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true;
[36] Fix | Delete
if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
function isTopScope(context) {
[40] Fix | Delete
for (;;) {
[41] Fix | Delete
if (!context || context.type == "top") return true;
[42] Fix | Delete
if (context.type == "}" && context.prev.info != "namespace") return false;
[43] Fix | Delete
context = context.prev;
[44] Fix | Delete
}
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
CodeMirror.defineMode("clike", function(config, parserConfig) {
[48] Fix | Delete
var indentUnit = config.indentUnit,
[49] Fix | Delete
statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
[50] Fix | Delete
dontAlignCalls = parserConfig.dontAlignCalls,
[51] Fix | Delete
keywords = parserConfig.keywords || {},
[52] Fix | Delete
types = parserConfig.types || {},
[53] Fix | Delete
builtin = parserConfig.builtin || {},
[54] Fix | Delete
blockKeywords = parserConfig.blockKeywords || {},
[55] Fix | Delete
defKeywords = parserConfig.defKeywords || {},
[56] Fix | Delete
atoms = parserConfig.atoms || {},
[57] Fix | Delete
hooks = parserConfig.hooks || {},
[58] Fix | Delete
multiLineStrings = parserConfig.multiLineStrings,
[59] Fix | Delete
indentStatements = parserConfig.indentStatements !== false,
[60] Fix | Delete
indentSwitch = parserConfig.indentSwitch !== false,
[61] Fix | Delete
namespaceSeparator = parserConfig.namespaceSeparator,
[62] Fix | Delete
isPunctuationChar = parserConfig.isPunctuationChar || /[\[\]{}\(\),;\:\.]/,
[63] Fix | Delete
numberStart = parserConfig.numberStart || /[\d\.]/,
[64] Fix | Delete
number = parserConfig.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,
[65] Fix | Delete
isOperatorChar = parserConfig.isOperatorChar || /[+\-*&%=<>!?|\/]/,
[66] Fix | Delete
endStatement = parserConfig.endStatement || /^[;:,]$/;
[67] Fix | Delete
[68] Fix | Delete
var curPunc, isDefKeyword;
[69] Fix | Delete
[70] Fix | Delete
function tokenBase(stream, state) {
[71] Fix | Delete
var ch = stream.next();
[72] Fix | Delete
if (hooks[ch]) {
[73] Fix | Delete
var result = hooks[ch](stream, state);
[74] Fix | Delete
if (result !== false) return result;
[75] Fix | Delete
}
[76] Fix | Delete
if (ch == '"' || ch == "'") {
[77] Fix | Delete
state.tokenize = tokenString(ch);
[78] Fix | Delete
return state.tokenize(stream, state);
[79] Fix | Delete
}
[80] Fix | Delete
if (isPunctuationChar.test(ch)) {
[81] Fix | Delete
curPunc = ch;
[82] Fix | Delete
return null;
[83] Fix | Delete
}
[84] Fix | Delete
if (numberStart.test(ch)) {
[85] Fix | Delete
stream.backUp(1)
[86] Fix | Delete
if (stream.match(number)) return "number"
[87] Fix | Delete
stream.next()
[88] Fix | Delete
}
[89] Fix | Delete
if (ch == "/") {
[90] Fix | Delete
if (stream.eat("*")) {
[91] Fix | Delete
state.tokenize = tokenComment;
[92] Fix | Delete
return tokenComment(stream, state);
[93] Fix | Delete
}
[94] Fix | Delete
if (stream.eat("/")) {
[95] Fix | Delete
stream.skipToEnd();
[96] Fix | Delete
return "comment";
[97] Fix | Delete
}
[98] Fix | Delete
}
[99] Fix | Delete
if (isOperatorChar.test(ch)) {
[100] Fix | Delete
while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {}
[101] Fix | Delete
return "operator";
[102] Fix | Delete
}
[103] Fix | Delete
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
[104] Fix | Delete
if (namespaceSeparator) while (stream.match(namespaceSeparator))
[105] Fix | Delete
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
[106] Fix | Delete
[107] Fix | Delete
var cur = stream.current();
[108] Fix | Delete
if (contains(keywords, cur)) {
[109] Fix | Delete
if (contains(blockKeywords, cur)) curPunc = "newstatement";
[110] Fix | Delete
if (contains(defKeywords, cur)) isDefKeyword = true;
[111] Fix | Delete
return "keyword";
[112] Fix | Delete
}
[113] Fix | Delete
if (contains(types, cur)) return "variable-3";
[114] Fix | Delete
if (contains(builtin, cur)) {
[115] Fix | Delete
if (contains(blockKeywords, cur)) curPunc = "newstatement";
[116] Fix | Delete
return "builtin";
[117] Fix | Delete
}
[118] Fix | Delete
if (contains(atoms, cur)) return "atom";
[119] Fix | Delete
return "variable";
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
function tokenString(quote) {
[123] Fix | Delete
return function(stream, state) {
[124] Fix | Delete
var escaped = false, next, end = false;
[125] Fix | Delete
while ((next = stream.next()) != null) {
[126] Fix | Delete
if (next == quote && !escaped) {end = true; break;}
[127] Fix | Delete
escaped = !escaped && next == "\\";
[128] Fix | Delete
}
[129] Fix | Delete
if (end || !(escaped || multiLineStrings))
[130] Fix | Delete
state.tokenize = null;
[131] Fix | Delete
return "string";
[132] Fix | Delete
};
[133] Fix | Delete
}
[134] Fix | Delete
[135] Fix | Delete
function tokenComment(stream, state) {
[136] Fix | Delete
var maybeEnd = false, ch;
[137] Fix | Delete
while (ch = stream.next()) {
[138] Fix | Delete
if (ch == "/" && maybeEnd) {
[139] Fix | Delete
state.tokenize = null;
[140] Fix | Delete
break;
[141] Fix | Delete
}
[142] Fix | Delete
maybeEnd = (ch == "*");
[143] Fix | Delete
}
[144] Fix | Delete
return "comment";
[145] Fix | Delete
}
[146] Fix | Delete
[147] Fix | Delete
function maybeEOL(stream, state) {
[148] Fix | Delete
if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))
[149] Fix | Delete
state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)
[150] Fix | Delete
}
[151] Fix | Delete
[152] Fix | Delete
// Interface
[153] Fix | Delete
[154] Fix | Delete
return {
[155] Fix | Delete
startState: function(basecolumn) {
[156] Fix | Delete
return {
[157] Fix | Delete
tokenize: null,
[158] Fix | Delete
context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false),
[159] Fix | Delete
indented: 0,
[160] Fix | Delete
startOfLine: true,
[161] Fix | Delete
prevToken: null
[162] Fix | Delete
};
[163] Fix | Delete
},
[164] Fix | Delete
[165] Fix | Delete
token: function(stream, state) {
[166] Fix | Delete
var ctx = state.context;
[167] Fix | Delete
if (stream.sol()) {
[168] Fix | Delete
if (ctx.align == null) ctx.align = false;
[169] Fix | Delete
state.indented = stream.indentation();
[170] Fix | Delete
state.startOfLine = true;
[171] Fix | Delete
}
[172] Fix | Delete
if (stream.eatSpace()) { maybeEOL(stream, state); return null; }
[173] Fix | Delete
curPunc = isDefKeyword = null;
[174] Fix | Delete
var style = (state.tokenize || tokenBase)(stream, state);
[175] Fix | Delete
if (style == "comment" || style == "meta") return style;
[176] Fix | Delete
if (ctx.align == null) ctx.align = true;
[177] Fix | Delete
[178] Fix | Delete
if (endStatement.test(curPunc)) while (state.context.type == "statement") popContext(state);
[179] Fix | Delete
else if (curPunc == "{") pushContext(state, stream.column(), "}");
[180] Fix | Delete
else if (curPunc == "[") pushContext(state, stream.column(), "]");
[181] Fix | Delete
else if (curPunc == "(") pushContext(state, stream.column(), ")");
[182] Fix | Delete
else if (curPunc == "}") {
[183] Fix | Delete
while (ctx.type == "statement") ctx = popContext(state);
[184] Fix | Delete
if (ctx.type == "}") ctx = popContext(state);
[185] Fix | Delete
while (ctx.type == "statement") ctx = popContext(state);
[186] Fix | Delete
}
[187] Fix | Delete
else if (curPunc == ctx.type) popContext(state);
[188] Fix | Delete
else if (indentStatements &&
[189] Fix | Delete
(((ctx.type == "}" || ctx.type == "top") && curPunc != ";") ||
[190] Fix | Delete
(ctx.type == "statement" && curPunc == "newstatement"))) {
[191] Fix | Delete
pushContext(state, stream.column(), "statement", stream.current());
[192] Fix | Delete
}
[193] Fix | Delete
[194] Fix | Delete
if (style == "variable" &&
[195] Fix | Delete
((state.prevToken == "def" ||
[196] Fix | Delete
(parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&
[197] Fix | Delete
isTopScope(state.context) && stream.match(/^\s*\(/, false)))))
[198] Fix | Delete
style = "def";
[199] Fix | Delete
[200] Fix | Delete
if (hooks.token) {
[201] Fix | Delete
var result = hooks.token(stream, state, style);
[202] Fix | Delete
if (result !== undefined) style = result;
[203] Fix | Delete
}
[204] Fix | Delete
[205] Fix | Delete
if (style == "def" && parserConfig.styleDefs === false) style = "variable";
[206] Fix | Delete
[207] Fix | Delete
state.startOfLine = false;
[208] Fix | Delete
state.prevToken = isDefKeyword ? "def" : style || curPunc;
[209] Fix | Delete
maybeEOL(stream, state);
[210] Fix | Delete
return style;
[211] Fix | Delete
},
[212] Fix | Delete
[213] Fix | Delete
indent: function(state, textAfter) {
[214] Fix | Delete
if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;
[215] Fix | Delete
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
[216] Fix | Delete
if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
[217] Fix | Delete
if (parserConfig.dontIndentStatements)
[218] Fix | Delete
while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info))
[219] Fix | Delete
ctx = ctx.prev
[220] Fix | Delete
if (hooks.indent) {
[221] Fix | Delete
var hook = hooks.indent(state, ctx, textAfter);
[222] Fix | Delete
if (typeof hook == "number") return hook
[223] Fix | Delete
}
[224] Fix | Delete
var closing = firstChar == ctx.type;
[225] Fix | Delete
var switchBlock = ctx.prev && ctx.prev.info == "switch";
[226] Fix | Delete
if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {
[227] Fix | Delete
while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev
[228] Fix | Delete
return ctx.indented
[229] Fix | Delete
}
[230] Fix | Delete
if (ctx.type == "statement")
[231] Fix | Delete
return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
[232] Fix | Delete
if (ctx.align && (!dontAlignCalls || ctx.type != ")"))
[233] Fix | Delete
return ctx.column + (closing ? 0 : 1);
[234] Fix | Delete
if (ctx.type == ")" && !closing)
[235] Fix | Delete
return ctx.indented + statementIndentUnit;
[236] Fix | Delete
[237] Fix | Delete
return ctx.indented + (closing ? 0 : indentUnit) +
[238] Fix | Delete
(!closing && switchBlock && !/^(?:case|default)\b/.test(textAfter) ? indentUnit : 0);
[239] Fix | Delete
},
[240] Fix | Delete
[241] Fix | Delete
electricInput: indentSwitch ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
[242] Fix | Delete
blockCommentStart: "/*",
[243] Fix | Delete
blockCommentEnd: "*/",
[244] Fix | Delete
lineComment: "//",
[245] Fix | Delete
fold: "brace"
[246] Fix | Delete
};
[247] Fix | Delete
});
[248] Fix | Delete
[249] Fix | Delete
function words(str) {
[250] Fix | Delete
var obj = {}, words = str.split(" ");
[251] Fix | Delete
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
[252] Fix | Delete
return obj;
[253] Fix | Delete
}
[254] Fix | Delete
function contains(words, word) {
[255] Fix | Delete
if (typeof words === "function") {
[256] Fix | Delete
return words(word);
[257] Fix | Delete
} else {
[258] Fix | Delete
return words.propertyIsEnumerable(word);
[259] Fix | Delete
}
[260] Fix | Delete
}
[261] Fix | Delete
var cKeywords = "auto if break case register continue return default do sizeof " +
[262] Fix | Delete
"static else struct switch extern typedef union for goto while enum const volatile";
[263] Fix | Delete
var cTypes = "int long char short double float unsigned signed void size_t ptrdiff_t";
[264] Fix | Delete
[265] Fix | Delete
function cppHook(stream, state) {
[266] Fix | Delete
if (!state.startOfLine) return false
[267] Fix | Delete
for (var ch, next = null; ch = stream.peek();) {
[268] Fix | Delete
if (ch == "\\" && stream.match(/^.$/)) {
[269] Fix | Delete
next = cppHook
[270] Fix | Delete
break
[271] Fix | Delete
} else if (ch == "/" && stream.match(/^\/[\/\*]/, false)) {
[272] Fix | Delete
break
[273] Fix | Delete
}
[274] Fix | Delete
stream.next()
[275] Fix | Delete
}
[276] Fix | Delete
state.tokenize = next
[277] Fix | Delete
return "meta"
[278] Fix | Delete
}
[279] Fix | Delete
[280] Fix | Delete
function pointerHook(_stream, state) {
[281] Fix | Delete
if (state.prevToken == "variable-3") return "variable-3";
[282] Fix | Delete
return false;
[283] Fix | Delete
}
[284] Fix | Delete
[285] Fix | Delete
function cpp14Literal(stream) {
[286] Fix | Delete
stream.eatWhile(/[\w\.']/);
[287] Fix | Delete
return "number";
[288] Fix | Delete
}
[289] Fix | Delete
[290] Fix | Delete
function cpp11StringHook(stream, state) {
[291] Fix | Delete
stream.backUp(1);
[292] Fix | Delete
// Raw strings.
[293] Fix | Delete
if (stream.match(/(R|u8R|uR|UR|LR)/)) {
[294] Fix | Delete
var match = stream.match(/"([^\s\\()]{0,16})\(/);
[295] Fix | Delete
if (!match) {
[296] Fix | Delete
return false;
[297] Fix | Delete
}
[298] Fix | Delete
state.cpp11RawStringDelim = match[1];
[299] Fix | Delete
state.tokenize = tokenRawString;
[300] Fix | Delete
return tokenRawString(stream, state);
[301] Fix | Delete
}
[302] Fix | Delete
// Unicode strings/chars.
[303] Fix | Delete
if (stream.match(/(u8|u|U|L)/)) {
[304] Fix | Delete
if (stream.match(/["']/, /* eat */ false)) {
[305] Fix | Delete
return "string";
[306] Fix | Delete
}
[307] Fix | Delete
return false;
[308] Fix | Delete
}
[309] Fix | Delete
// Ignore this hook.
[310] Fix | Delete
stream.next();
[311] Fix | Delete
return false;
[312] Fix | Delete
}
[313] Fix | Delete
[314] Fix | Delete
function cppLooksLikeConstructor(word) {
[315] Fix | Delete
var lastTwo = /(\w+)::(\w+)$/.exec(word);
[316] Fix | Delete
return lastTwo && lastTwo[1] == lastTwo[2];
[317] Fix | Delete
}
[318] Fix | Delete
[319] Fix | Delete
// C#-style strings where "" escapes a quote.
[320] Fix | Delete
function tokenAtString(stream, state) {
[321] Fix | Delete
var next;
[322] Fix | Delete
while ((next = stream.next()) != null) {
[323] Fix | Delete
if (next == '"' && !stream.eat('"')) {
[324] Fix | Delete
state.tokenize = null;
[325] Fix | Delete
break;
[326] Fix | Delete
}
[327] Fix | Delete
}
[328] Fix | Delete
return "string";
[329] Fix | Delete
}
[330] Fix | Delete
[331] Fix | Delete
// C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where
[332] Fix | Delete
// <delim> can be a string up to 16 characters long.
[333] Fix | Delete
function tokenRawString(stream, state) {
[334] Fix | Delete
// Escape characters that have special regex meanings.
[335] Fix | Delete
var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
[336] Fix | Delete
var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
[337] Fix | Delete
if (match)
[338] Fix | Delete
state.tokenize = null;
[339] Fix | Delete
else
[340] Fix | Delete
stream.skipToEnd();
[341] Fix | Delete
return "string";
[342] Fix | Delete
}
[343] Fix | Delete
[344] Fix | Delete
function def(mimes, mode) {
[345] Fix | Delete
if (typeof mimes == "string") mimes = [mimes];
[346] Fix | Delete
var words = [];
[347] Fix | Delete
function add(obj) {
[348] Fix | Delete
if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
[349] Fix | Delete
words.push(prop);
[350] Fix | Delete
}
[351] Fix | Delete
add(mode.keywords);
[352] Fix | Delete
add(mode.types);
[353] Fix | Delete
add(mode.builtin);
[354] Fix | Delete
add(mode.atoms);
[355] Fix | Delete
if (words.length) {
[356] Fix | Delete
mode.helperType = mimes[0];
[357] Fix | Delete
CodeMirror.registerHelper("hintWords", mimes[0], words);
[358] Fix | Delete
}
[359] Fix | Delete
[360] Fix | Delete
for (var i = 0; i < mimes.length; ++i)
[361] Fix | Delete
CodeMirror.defineMIME(mimes[i], mode);
[362] Fix | Delete
}
[363] Fix | Delete
[364] Fix | Delete
def(["text/x-csrc", "text/x-c", "text/x-chdr"], {
[365] Fix | Delete
name: "clike",
[366] Fix | Delete
keywords: words(cKeywords),
[367] Fix | Delete
types: words(cTypes + " bool _Complex _Bool float_t double_t intptr_t intmax_t " +
[368] Fix | Delete
"int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t " +
[369] Fix | Delete
"uint32_t uint64_t"),
[370] Fix | Delete
blockKeywords: words("case do else for if switch while struct"),
[371] Fix | Delete
defKeywords: words("struct"),
[372] Fix | Delete
typeFirstDefinitions: true,
[373] Fix | Delete
atoms: words("null true false"),
[374] Fix | Delete
hooks: {"#": cppHook, "*": pointerHook},
[375] Fix | Delete
modeProps: {fold: ["brace", "include"]}
[376] Fix | Delete
});
[377] Fix | Delete
[378] Fix | Delete
def(["text/x-c++src", "text/x-c++hdr"], {
[379] Fix | Delete
name: "clike",
[380] Fix | Delete
keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try explicit new " +
[381] Fix | Delete
"static_cast typeid catch operator template typename class friend private " +
[382] Fix | Delete
"this using const_cast inline public throw virtual delete mutable protected " +
[383] Fix | Delete
"alignas alignof constexpr decltype nullptr noexcept thread_local final " +
[384] Fix | Delete
"static_assert override"),
[385] Fix | Delete
types: words(cTypes + " bool wchar_t"),
[386] Fix | Delete
blockKeywords: words("catch class do else finally for if struct switch try while"),
[387] Fix | Delete
defKeywords: words("class namespace struct enum union"),
[388] Fix | Delete
typeFirstDefinitions: true,
[389] Fix | Delete
atoms: words("true false null"),
[390] Fix | Delete
dontIndentStatements: /^template$/,
[391] Fix | Delete
hooks: {
[392] Fix | Delete
"#": cppHook,
[393] Fix | Delete
"*": pointerHook,
[394] Fix | Delete
"u": cpp11StringHook,
[395] Fix | Delete
"U": cpp11StringHook,
[396] Fix | Delete
"L": cpp11StringHook,
[397] Fix | Delete
"R": cpp11StringHook,
[398] Fix | Delete
"0": cpp14Literal,
[399] Fix | Delete
"1": cpp14Literal,
[400] Fix | Delete
"2": cpp14Literal,
[401] Fix | Delete
"3": cpp14Literal,
[402] Fix | Delete
"4": cpp14Literal,
[403] Fix | Delete
"5": cpp14Literal,
[404] Fix | Delete
"6": cpp14Literal,
[405] Fix | Delete
"7": cpp14Literal,
[406] Fix | Delete
"8": cpp14Literal,
[407] Fix | Delete
"9": cpp14Literal,
[408] Fix | Delete
token: function(stream, state, style) {
[409] Fix | Delete
if (style == "variable" && stream.peek() == "(" &&
[410] Fix | Delete
(state.prevToken == ";" || state.prevToken == null ||
[411] Fix | Delete
state.prevToken == "}") &&
[412] Fix | Delete
cppLooksLikeConstructor(stream.current()))
[413] Fix | Delete
return "def";
[414] Fix | Delete
}
[415] Fix | Delete
},
[416] Fix | Delete
namespaceSeparator: "::",
[417] Fix | Delete
modeProps: {fold: ["brace", "include"]}
[418] Fix | Delete
});
[419] Fix | Delete
[420] Fix | Delete
def("text/x-java", {
[421] Fix | Delete
name: "clike",
[422] Fix | Delete
keywords: words("abstract assert break case catch class const continue default " +
[423] Fix | Delete
"do else enum extends final finally float for goto if implements import " +
[424] Fix | Delete
"instanceof interface native new package private protected public " +
[425] Fix | Delete
"return static strictfp super switch synchronized this throw throws transient " +
[426] Fix | Delete
"try volatile while"),
[427] Fix | Delete
types: words("byte short int long float double boolean char void Boolean Byte Character Double Float " +
[428] Fix | Delete
"Integer Long Number Object Short String StringBuffer StringBuilder Void"),
[429] Fix | Delete
blockKeywords: words("catch class do else finally for if switch try while"),
[430] Fix | Delete
defKeywords: words("class interface package enum"),
[431] Fix | Delete
typeFirstDefinitions: true,
[432] Fix | Delete
atoms: words("true false null"),
[433] Fix | Delete
endStatement: /^[;:]$/,
[434] Fix | Delete
number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
[435] Fix | Delete
hooks: {
[436] Fix | Delete
"@": function(stream) {
[437] Fix | Delete
stream.eatWhile(/[\w\$_]/);
[438] Fix | Delete
return "meta";
[439] Fix | Delete
}
[440] Fix | Delete
},
[441] Fix | Delete
modeProps: {fold: ["brace", "import"]}
[442] Fix | Delete
});
[443] Fix | Delete
[444] Fix | Delete
def("text/x-csharp", {
[445] Fix | Delete
name: "clike",
[446] Fix | Delete
keywords: words("abstract as async await base break case catch checked class const continue" +
[447] Fix | Delete
" default delegate do else enum event explicit extern finally fixed for" +
[448] Fix | Delete
" foreach goto if implicit in interface internal is lock namespace new" +
[449] Fix | Delete
" operator out override params private protected public readonly ref return sealed" +
[450] Fix | Delete
" sizeof stackalloc static struct switch this throw try typeof unchecked" +
[451] Fix | Delete
" unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
[452] Fix | Delete
" global group into join let orderby partial remove select set value var yield"),
[453] Fix | Delete
types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" +
[454] Fix | Delete
" Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" +
[455] Fix | Delete
" UInt64 bool byte char decimal double short int long object" +
[456] Fix | Delete
" sbyte float string ushort uint ulong"),
[457] Fix | Delete
blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
[458] Fix | Delete
defKeywords: words("class interface namespace struct var"),
[459] Fix | Delete
typeFirstDefinitions: true,
[460] Fix | Delete
atoms: words("true false null"),
[461] Fix | Delete
hooks: {
[462] Fix | Delete
"@": function(stream, state) {
[463] Fix | Delete
if (stream.eat('"')) {
[464] Fix | Delete
state.tokenize = tokenAtString;
[465] Fix | Delete
return tokenAtString(stream, state);
[466] Fix | Delete
}
[467] Fix | Delete
stream.eatWhile(/[\w\$_]/);
[468] Fix | Delete
return "meta";
[469] Fix | Delete
}
[470] Fix | Delete
}
[471] Fix | Delete
});
[472] Fix | Delete
[473] Fix | Delete
function tokenTripleString(stream, state) {
[474] Fix | Delete
var escaped = false;
[475] Fix | Delete
while (!stream.eol()) {
[476] Fix | Delete
if (!escaped && stream.match('"""')) {
[477] Fix | Delete
state.tokenize = null;
[478] Fix | Delete
break;
[479] Fix | Delete
}
[480] Fix | Delete
escaped = stream.next() == "\\" && !escaped;
[481] Fix | Delete
}
[482] Fix | Delete
return "string";
[483] Fix | Delete
}
[484] Fix | Delete
[485] Fix | Delete
def("text/x-scala", {
[486] Fix | Delete
name: "clike",
[487] Fix | Delete
keywords: words(
[488] Fix | Delete
[489] Fix | Delete
/* scala */
[490] Fix | Delete
"abstract case catch class def do else extends final finally for forSome if " +
[491] Fix | Delete
"implicit import lazy match new null object override package private protected return " +
[492] Fix | Delete
"sealed super this throw trait try type val var while with yield _ : = => <- <: " +
[493] Fix | Delete
"<% >: # @ " +
[494] Fix | Delete
[495] Fix | Delete
/* package scala */
[496] Fix | Delete
"assert assume require print println printf readLine readBoolean readByte readShort " +
[497] Fix | Delete
"readChar readInt readLong readFloat readDouble " +
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function