kopia lustrzana https://github.com/c9/core
remove unused files from ace
rodzic
b6e5926695
commit
dc535d7a61
|
@ -1,114 +0,0 @@
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Distributed under the BSD license:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010, Ajax.org B.V.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of Ajax.org B.V. nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
define(function(require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
var MAX_TOKEN_COUNT = 1000;
|
|
||||||
var useragent = require("../lib/useragent");
|
|
||||||
var TokenizerModule = require("../tokenizer");
|
|
||||||
|
|
||||||
function patch(obj, name, regexp, replacement) {
|
|
||||||
eval("obj['" + name + "']=" + obj[name].toString().replace(
|
|
||||||
regexp, replacement
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useragent.isIE && useragent.isIE < 10 && window.top.document.compatMode === "BackCompat")
|
|
||||||
useragent.isOldIE = true;
|
|
||||||
|
|
||||||
if (typeof document != "undefined" && !document.documentElement.querySelector) {
|
|
||||||
useragent.isOldIE = true;
|
|
||||||
var qs = function(el, selector) {
|
|
||||||
if (selector.charAt(0) == ".") {
|
|
||||||
var classNeme = selector.slice(1);
|
|
||||||
} else {
|
|
||||||
var m = selector.match(/(\w+)=(\w+)/);
|
|
||||||
var attr = m && m[1];
|
|
||||||
var attrVal = m && m[2];
|
|
||||||
}
|
|
||||||
for (var i = 0; i < el.all.length; i++) {
|
|
||||||
var ch = el.all[i];
|
|
||||||
if (classNeme) {
|
|
||||||
if (ch.className.indexOf(classNeme) != -1)
|
|
||||||
return ch;
|
|
||||||
} else if (attr) {
|
|
||||||
if (ch.getAttribute(attr) == attrVal)
|
|
||||||
return ch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var sb = require("./searchbox").SearchBox.prototype;
|
|
||||||
patch(
|
|
||||||
sb, "$initElements",
|
|
||||||
/([^\s=]*).querySelector\((".*?")\)/g,
|
|
||||||
"qs($1, $2)"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
var compliantExecNpcg = /()??/.exec("")[1] === undefined;
|
|
||||||
if (compliantExecNpcg)
|
|
||||||
return;
|
|
||||||
var proto = TokenizerModule.Tokenizer.prototype;
|
|
||||||
TokenizerModule.Tokenizer_orig = TokenizerModule.Tokenizer;
|
|
||||||
proto.getLineTokens_orig = proto.getLineTokens;
|
|
||||||
|
|
||||||
patch(
|
|
||||||
TokenizerModule, "Tokenizer",
|
|
||||||
"ruleRegExps.push(adjustedregex);\n",
|
|
||||||
function(m) {
|
|
||||||
return m + '\
|
|
||||||
if (state[i].next && RegExp(adjustedregex).test(""))\n\
|
|
||||||
rule._qre = RegExp(adjustedregex, "g");\n\
|
|
||||||
';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
TokenizerModule.Tokenizer.prototype = proto;
|
|
||||||
patch(
|
|
||||||
proto, "getLineTokens",
|
|
||||||
/if \(match\[i \+ 1\] === undefined\)\s*continue;/,
|
|
||||||
"if (!match[i + 1]) {\n\
|
|
||||||
if (value)continue;\n\
|
|
||||||
var qre = state[mapping[i]]._qre;\n\
|
|
||||||
if (!qre) continue;\n\
|
|
||||||
qre.lastIndex = lastIndex;\n\
|
|
||||||
if (!qre.exec(line) || qre.lastIndex != lastIndex)\n\
|
|
||||||
continue;\n\
|
|
||||||
}"
|
|
||||||
);
|
|
||||||
|
|
||||||
patch(
|
|
||||||
require("../mode/text").Mode.prototype, "getTokenizer",
|
|
||||||
/Tokenizer/,
|
|
||||||
"TokenizerModule.Tokenizer"
|
|
||||||
);
|
|
||||||
|
|
||||||
useragent.isOldIE = true;
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,77 +0,0 @@
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Distributed under the BSD license:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010, Ajax.org B.V.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of Ajax.org B.V. nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
if (typeof process !== "undefined") {
|
|
||||||
require("amd-loader");
|
|
||||||
}
|
|
||||||
|
|
||||||
define(function(require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var assert = require("../test/assertions");
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
"test: getTokenizer() (smoke test)" : function() {
|
|
||||||
var exec = RegExp.prototype.exec
|
|
||||||
var brokenExec = function(str) {
|
|
||||||
var result = exec.call(this, str);
|
|
||||||
if (result) {
|
|
||||||
for (var i = result.length; i--;)
|
|
||||||
if (!result[i])
|
|
||||||
result[i] = "";
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// break this to emulate old ie
|
|
||||||
RegExp.prototype.exec = brokenExec;
|
|
||||||
require("./old_ie");
|
|
||||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
|
||||||
var JavaScriptHighlightRules = require("../mode/javascript_highlight_rules").JavaScriptHighlightRules;
|
|
||||||
var tokenizer = new Tokenizer((new JavaScriptHighlightRules).getRules());
|
|
||||||
|
|
||||||
var tokens = tokenizer.getLineTokens("'juhu'", "start").tokens;
|
|
||||||
assert.equal("string", tokens[0].type);
|
|
||||||
} finally {
|
|
||||||
// restore modified functions
|
|
||||||
RegExp.prototype.exec = exec;
|
|
||||||
var module = require("../tokenizer");
|
|
||||||
module.Tokenizer = module.Tokenizer_orig;
|
|
||||||
module.Tokenizer.prototype.getLineTokens = module.Tokenizer.prototype.getLineTokens_orig;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
if (typeof module !== "undefined" && module === require.main) {
|
|
||||||
require("asyncjs").test.testcase(module.exports).exec()
|
|
||||||
}
|
|
|
@ -1,101 +0,0 @@
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Distributed under the BSD license:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010, Ajax.org B.V.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of Ajax.org B.V. nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
define(function(require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var oop = require("../lib/oop");
|
|
||||||
var TextMode = require("./text").Mode;
|
|
||||||
var leanHighlightRules = require("./lean_highlight_rules").leanHighlightRules;
|
|
||||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
|
||||||
var Range = require("../range").Range;
|
|
||||||
// TODO(soonhok): figure out behavior and foldmode
|
|
||||||
// var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
|
||||||
// var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
|
||||||
|
|
||||||
var Mode = function() {
|
|
||||||
this.HighlightRules = leanHighlightRules;
|
|
||||||
|
|
||||||
this.$outdent = new MatchingBraceOutdent();
|
|
||||||
// this.$behaviour = new CstyleBehaviour();
|
|
||||||
// this.foldingRules = new CStyleFoldMode();
|
|
||||||
};
|
|
||||||
oop.inherits(Mode, TextMode);
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
this.lineCommentStart = "--";
|
|
||||||
this.blockComment = {start: "/-", end: "-/"};
|
|
||||||
|
|
||||||
this.getNextLineIndent = function(state, line, tab) {
|
|
||||||
var indent = this.$getIndent(line);
|
|
||||||
|
|
||||||
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
|
||||||
var tokens = tokenizedLine.tokens;
|
|
||||||
var endState = tokenizedLine.state;
|
|
||||||
|
|
||||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
|
||||||
return indent;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state == "start") {
|
|
||||||
var match = line.match(/^.*[\{\(\[]\s*$/);
|
|
||||||
if (match) {
|
|
||||||
indent += tab;
|
|
||||||
}
|
|
||||||
} else if (state == "doc-start") {
|
|
||||||
if (endState == "start") {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
var match = line.match(/^\s*(\/?)\*/);
|
|
||||||
if (match) {
|
|
||||||
if (match[1]) {
|
|
||||||
indent += " ";
|
|
||||||
}
|
|
||||||
indent += "- ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return indent;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.checkOutdent = function(state, line, input) {
|
|
||||||
return this.$outdent.checkOutdent(line, input);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.autoOutdent = function(state, doc, row) {
|
|
||||||
this.$outdent.autoOutdent(doc, row);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$id = "ace/mode/lean";
|
|
||||||
}).call(Mode.prototype);
|
|
||||||
|
|
||||||
exports.Mode = Mode;
|
|
||||||
});
|
|
|
@ -1,156 +0,0 @@
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Distributed under the BSD license:
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010, Ajax.org B.V.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
* * Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of Ajax.org B.V. nor the
|
|
||||||
* names of its contributors may be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
define(function(require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var oop = require("../lib/oop");
|
|
||||||
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
|
||||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
||||||
|
|
||||||
var leanHighlightRules = function() {
|
|
||||||
|
|
||||||
var keywordControls = (
|
|
||||||
[ "add_rewrite", "alias", "as", "assume", "attribute",
|
|
||||||
"begin", "by", "calc", "calc_refl", "calc_subst", "calc_trans", "check",
|
|
||||||
"classes", "coercions", "conjecture", "constants", "context",
|
|
||||||
"corollary", "else", "end", "environment", "eval", "example",
|
|
||||||
"exists", "exit", "export", "exposing", "extends", "fields", "find_decl",
|
|
||||||
"forall", "from", "fun", "have", "help", "hiding", "if",
|
|
||||||
"import", "in", "infix", "infixl", "infixr", "instances",
|
|
||||||
"let", "local", "match", "namespace", "notation", "obtain", "obtains",
|
|
||||||
"omit", "opaque", "open", "options", "parameter", "parameters", "postfix",
|
|
||||||
"precedence", "prefix", "premise", "premises", "print", "private", "proof",
|
|
||||||
"protected", "qed", "raw", "renaming", "section", "set_option",
|
|
||||||
"show", "tactic_hint", "take", "then", "universe",
|
|
||||||
"universes", "using", "variable", "variables", "with"].join("|")
|
|
||||||
);
|
|
||||||
|
|
||||||
var nameProviders = (
|
|
||||||
["inductive", "structure", "record", "theorem", "axiom",
|
|
||||||
"axioms", "lemma", "hypothesis", "definition", "constant"].join("|")
|
|
||||||
);
|
|
||||||
|
|
||||||
var storageType = (
|
|
||||||
["Prop", "Type", "Type'", "Type₊", "Type₁", "Type₂", "Type₃"].join("|")
|
|
||||||
);
|
|
||||||
|
|
||||||
var storageModifiers = (
|
|
||||||
"\\[(" +
|
|
||||||
["abbreviations", "all-transparent", "begin-end-hints", "class", "classes", "coercion",
|
|
||||||
"coercions", "declarations", "decls", "instance", "irreducible",
|
|
||||||
"multiple-instances", "notation", "notations", "parsing-only", "persistent",
|
|
||||||
"reduce-hints", "reducible", "tactic-hints", "visible", "wf", "whnf"
|
|
||||||
].join("|") +
|
|
||||||
")\\]"
|
|
||||||
);
|
|
||||||
|
|
||||||
var keywordOperators = (
|
|
||||||
[].join("|")
|
|
||||||
);
|
|
||||||
|
|
||||||
var keywordMapper = this.$keywords = this.createKeywordMapper({
|
|
||||||
"keyword.control" : keywordControls,
|
|
||||||
"storage.type" : storageType,
|
|
||||||
"keyword.operator" : keywordOperators,
|
|
||||||
"variable.language": "sorry"
|
|
||||||
}, "identifier");
|
|
||||||
|
|
||||||
var identifierRe = "[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][A-Za-z0-9_'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f]*";
|
|
||||||
var operatorRe = new RegExp(["#", "@", "->", "∼", "↔", "/", "==", "=", ":=", "<->",
|
|
||||||
"/\\", "\\/", "∧", "∨", "≠", "<", ">", "≤", "≥", "¬",
|
|
||||||
"<=", ">=", "⁻¹", "⬝", "▸", "\\+", "\\*", "-", "/",
|
|
||||||
"λ", "→", "∃", "∀", ":="].join("|"));
|
|
||||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
|
||||||
// regexps are ordered -> the first match is used
|
|
||||||
|
|
||||||
this.$rules = {
|
|
||||||
"start" : [
|
|
||||||
{
|
|
||||||
token : "comment", // single line comment "--"
|
|
||||||
regex : "--.*$"
|
|
||||||
},
|
|
||||||
DocCommentHighlightRules.getStartRule("doc-start"),
|
|
||||||
{
|
|
||||||
token : "comment", // multi line comment "/-"
|
|
||||||
regex : "\\/-",
|
|
||||||
next : "comment"
|
|
||||||
}, {
|
|
||||||
stateName: "qqstring",
|
|
||||||
token : "string.start", regex : '"', next : [
|
|
||||||
{token : "string.end", regex : '"', next : "start"},
|
|
||||||
{token : "constant.language.escape", regex : /\\[n"\\]/},
|
|
||||||
{defaultToken: "string"}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
token : "keyword.control", regex : nameProviders, next : [
|
|
||||||
{token : "variable.language", regex : identifierRe, next : "start"} ]
|
|
||||||
}, {
|
|
||||||
token : "constant.numeric", // hex
|
|
||||||
regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
|
||||||
}, {
|
|
||||||
token : "constant.numeric", // float
|
|
||||||
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
|
||||||
}, {
|
|
||||||
token : "storage.modifier",
|
|
||||||
regex : storageModifiers
|
|
||||||
}, {
|
|
||||||
token : keywordMapper,
|
|
||||||
regex : identifierRe
|
|
||||||
}, {
|
|
||||||
token : "operator",
|
|
||||||
regex : operatorRe
|
|
||||||
}, {
|
|
||||||
token : "punctuation.operator",
|
|
||||||
regex : "\\?|\\:|\\,|\\;|\\."
|
|
||||||
}, {
|
|
||||||
token : "paren.lparen",
|
|
||||||
regex : "[[({]"
|
|
||||||
}, {
|
|
||||||
token : "paren.rparen",
|
|
||||||
regex : "[\\])}]"
|
|
||||||
}, {
|
|
||||||
token : "text",
|
|
||||||
regex : "\\s+"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"comment" : [ {token: "comment", regex: "-/", next: "start"},
|
|
||||||
{defaultToken: "comment"} ]
|
|
||||||
};
|
|
||||||
|
|
||||||
this.embedRules(DocCommentHighlightRules, "doc-",
|
|
||||||
[ DocCommentHighlightRules.getEndRule("start") ]);
|
|
||||||
this.normalizeRules();
|
|
||||||
};
|
|
||||||
|
|
||||||
oop.inherits(leanHighlightRules, TextHighlightRules);
|
|
||||||
|
|
||||||
exports.leanHighlightRules = leanHighlightRules;
|
|
||||||
});
|
|
|
@ -1,7 +0,0 @@
|
||||||
define(function(require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
exports.snippetText = require("../requirejs/text!./.snippets");
|
|
||||||
exports.scope = "";
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,7 +0,0 @@
|
||||||
define(function(require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
exports.snippetText = require("../requirejs/text!./fsharp.snippets");
|
|
||||||
exports.scope = "fsharp";
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,7 +0,0 @@
|
||||||
define(function(require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
exports.snippetText = require("../requirejs/text!./lean.snippets");
|
|
||||||
exports.scope = "lean";
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,7 +0,0 @@
|
||||||
define(function (require, exports, module) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
exports.snippetText = require("../requirejs/text!./swig.snippets");
|
|
||||||
exports.scope = "swig";
|
|
||||||
|
|
||||||
});
|
|
Ładowanie…
Reference in New Issue