123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715 |
- define("ace/mode/doc_comment_highlight_rules",["ace_require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("../lib/oop");
- var TextHighlightRules = ace_require("./text_highlight_rules").TextHighlightRules;
- var DocCommentHighlightRules = function() {
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- },
- DocCommentHighlightRules.getTagRule(),
- {
- defaultToken : "comment.doc",
- caseInsensitive: true
- }]
- };
- };
- oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- DocCommentHighlightRules.getTagRule = function(start) {
- return {
- token : "comment.doc.tag.storage.type",
- regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
- };
- };
- DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
- };
- DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
- };
- exports.DocCommentHighlightRules = DocCommentHighlightRules;
- });
- define("ace/mode/c_cpp_highlight_rules",["ace_require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("../lib/oop");
- var DocCommentHighlightRules = ace_require("./doc_comment_highlight_rules").DocCommentHighlightRules;
- var TextHighlightRules = ace_require("./text_highlight_rules").TextHighlightRules;
- var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b";
- var c_cppHighlightRules = function() {
- var keywordControls = (
- "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
- "return|switch|while|catch|operator|try|throw|using"
- );
-
- var storageType = (
- "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
- "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
- "class|wchar_t|template|char16_t|char32_t"
- );
- var storageModifiers = (
- "const|extern|register|restrict|static|volatile|inline|private|" +
- "protected|public|friend|explicit|virtual|export|mutable|typename|" +
- "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
- );
- var keywordOperators = (
- "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" +
- "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
- );
- var builtinConstants = (
- "NULL|true|false|TRUE|FALSE|nullptr"
- );
- var keywordMapper = this.$keywords = this.createKeywordMapper({
- "keyword.control" : keywordControls,
- "storage.type" : storageType,
- "storage.modifier" : storageModifiers,
- "keyword.operator" : keywordOperators,
- "variable.language": "this",
- "constant.language": builtinConstants
- }, "identifier");
- var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
- var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
- var formatRe = "%"
- + /(\d+\$)?/.source // field (argument #)
- + /[#0\- +']*/.source // flags
- + /[,;:_]?/.source // separator character (AltiVec)
- + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width
- + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision
- + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier
- + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "//$",
- next : "start"
- }, {
- token : "comment",
- regex : "//",
- next : "singleLineComment"
- },
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // character
- regex : "'(?:" + escapeRe + "|.)?'"
- }, {
- token : "string.start",
- regex : '"',
- stateName: "qqstring",
- next: [
- { token: "string", regex: /\\\s*$/, next: "qqstring" },
- { token: "constant.language.escape", regex: escapeRe },
- { token: "constant.language.escape", regex: formatRe },
- { token: "string.end", regex: '"|$', next: "start" },
- { defaultToken: "string"}
- ]
- }, {
- token : "string.start",
- regex : 'R"\\(',
- stateName: "rawString",
- next: [
- { token: "string.end", regex: '\\)"', next: "start" },
- { defaultToken: "string"}
- ]
- }, {
- 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 : "keyword", // pre-compiler directives
- regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
- next : "directive"
- }, {
- token : "keyword", // special case pre-compiler directive
- regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
- }, {
- token : "support.function.C99.c",
- regex : cFunctions
- }, {
- token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
- }, {
- token : "keyword.operator",
- regex : /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : "\\*\\/",
- next : "start"
- }, {
- defaultToken : "comment"
- }
- ],
- "singleLineComment" : [
- {
- token : "comment",
- regex : /\\$/,
- next : "singleLineComment"
- }, {
- token : "comment",
- regex : /$/,
- next : "start"
- }, {
- defaultToken: "comment"
- }
- ],
- "directive" : [
- {
- token : "constant.other.multiline",
- regex : /\\/
- },
- {
- token : "constant.other.multiline",
- regex : /.*\\/
- },
- {
- token : "constant.other",
- regex : "\\s*<.+?>",
- next : "start"
- },
- {
- token : "constant.other", // single line
- regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
- next : "start"
- },
- {
- token : "constant.other", // single line
- regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
- next : "start"
- },
- {
- token : "constant.other",
- regex : /[^\\\/]+/,
- next : "start"
- }
- ]
- };
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ DocCommentHighlightRules.getEndRule("start") ]);
- this.normalizeRules();
- };
- oop.inherits(c_cppHighlightRules, TextHighlightRules);
- exports.c_cppHighlightRules = c_cppHighlightRules;
- });
- define("ace/mode/matching_brace_outdent",["ace_require","exports","module","ace/range"], function(ace_require, exports, module) {
- "use strict";
- var Range = ace_require("../range").Range;
- var MatchingBraceOutdent = function() {};
- (function() {
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
- return /^\s*\}/.test(input);
- };
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
- if (!match) return 0;
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
- if (!openBracePos || openBracePos.row == row) return 0;
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
- this.$getIndent = function(line) {
- return line.match(/^\s*/)[0];
- };
- }).call(MatchingBraceOutdent.prototype);
- exports.MatchingBraceOutdent = MatchingBraceOutdent;
- });
- define("ace/mode/folding/cstyle",["ace_require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("../../lib/oop");
- var Range = ace_require("../../range").Range;
- var BaseFoldMode = ace_require("./fold_mode").FoldMode;
- var FoldMode = exports.FoldMode = function(commentRegex) {
- if (commentRegex) {
- this.foldingStartMarker = new RegExp(
- this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
- );
- this.foldingStopMarker = new RegExp(
- this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
- );
- }
- };
- oop.inherits(FoldMode, BaseFoldMode);
- (function() {
-
- this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
- this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
- this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
- this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
- this._getFoldWidgetBase = this.getFoldWidget;
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
-
- if (this.singleLineBlockCommentRe.test(line)) {
- if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
- return "";
- }
-
- var fw = this._getFoldWidgetBase(session, foldStyle, row);
-
- if (!fw && this.startRegionRe.test(line))
- return "start"; // lineCommentRegionStart
-
- return fw;
- };
- this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
- var line = session.getLine(row);
-
- if (this.startRegionRe.test(line))
- return this.getCommentRegionBlock(session, line, row);
-
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- var range = session.getCommentFoldRange(row, i + match[0].length, 1);
-
- if (range && !range.isMultiLine()) {
- if (forceMultiline) {
- range = this.getSectionRange(session, row);
- } else if (foldStyle != "all")
- range = null;
- }
-
- return range;
- }
- if (foldStyle === "markbegin")
- return;
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
- if (match[1])
- return this.closingBracketBlock(session, match[1], row, i);
- return session.getCommentFoldRange(row, i, -1);
- }
- };
-
- this.getSectionRange = function(session, row) {
- var line = session.getLine(row);
- var startIndent = line.search(/\S/);
- var startRow = row;
- var startColumn = line.length;
- row = row + 1;
- var endRow = row;
- var maxRow = session.getLength();
- while (++row < maxRow) {
- line = session.getLine(row);
- var indent = line.search(/\S/);
- if (indent === -1)
- continue;
- if (startIndent > indent)
- break;
- var subRange = this.getFoldWidgetRange(session, "all", row);
-
- if (subRange) {
- if (subRange.start.row <= startRow) {
- break;
- } else if (subRange.isMultiLine()) {
- row = subRange.end.row;
- } else if (startIndent == indent) {
- break;
- }
- }
- endRow = row;
- }
-
- return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
- };
- this.getCommentRegionBlock = function(session, line, row) {
- var startColumn = line.search(/\s*$/);
- var maxRow = session.getLength();
- var startRow = row;
-
- var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
- var depth = 1;
- while (++row < maxRow) {
- line = session.getLine(row);
- var m = re.exec(line);
- if (!m) continue;
- if (m[1]) depth--;
- else depth++;
- if (!depth) break;
- }
- var endRow = row;
- if (endRow > startRow) {
- return new Range(startRow, startColumn, endRow, line.length);
- }
- };
- }).call(FoldMode.prototype);
- });
- define("ace/mode/c_cpp",["ace_require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("../lib/oop");
- var TextMode = ace_require("./text").Mode;
- var c_cppHighlightRules = ace_require("./c_cpp_highlight_rules").c_cppHighlightRules;
- var MatchingBraceOutdent = ace_require("./matching_brace_outdent").MatchingBraceOutdent;
- var Range = ace_require("../range").Range;
- var CstyleBehaviour = ace_require("./behaviour/cstyle").CstyleBehaviour;
- var CStyleFoldMode = ace_require("./folding/cstyle").FoldMode;
- var Mode = function() {
- this.HighlightRules = c_cppHighlightRules;
- 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/c_cpp";
- this.snippetFileId = "ace/snippets/c_cpp";
- }).call(Mode.prototype);
- exports.Mode = Mode;
- });
- define("ace/mode/dart_highlight_rules",["ace_require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("../lib/oop");
- var DocCommentHighlightRules = ace_require("./doc_comment_highlight_rules").DocCommentHighlightRules;
- var TextHighlightRules = ace_require("./text_highlight_rules").TextHighlightRules;
- var DartHighlightRules = function() {
- var constantLanguage = "true|false|null";
- var variableLanguage = "this|super";
- var keywordControl = "try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await";
- var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum";
- var storageModifier = "static|final|const";
- var storageType = "void|bool|num|int|double|dynamic|var|String";
- var keywordMapper = this.createKeywordMapper({
- "constant.language.dart": constantLanguage,
- "variable.language.dart": variableLanguage,
- "keyword.control.dart": keywordControl,
- "keyword.declaration.dart": keywordDeclaration,
- "storage.modifier.dart": storageModifier,
- "storage.type.primitive.dart": storageType
- }, "identifier");
- var stringfill = [{
- token : "constant.language.escape",
- regex : /\\./
- }, {
- token : "text",
- regex : /\$(?:\w+|{[^"'}]+})?/
- }, {
- defaultToken : "string"
- }];
- this.$rules = {
- "start": [
- {
- token : "comment",
- regex : /\/\/.*$/
- },
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : /\/\*/,
- next : "comment"
- },
- {
- token: ["meta.preprocessor.script.dart"],
- regex: "^(#!.*)$"
- },
- {
- token: "keyword.other.import.dart",
- regex: "(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\b)"
- },
- {
- token : ["keyword.other.import.dart", "text"],
- regex : "(?:\\b)(prefix)(\\s*:)"
- },
- {
- regex: "\\bas\\b",
- token: "keyword.cast.dart"
- },
- {
- regex: "\\?|:",
- token: "keyword.control.ternary.dart"
- },
- {
- regex: "(?:\\b)(is\\!?)(?:\\b)",
- token: ["keyword.operator.dart"]
- },
- {
- regex: "(<<|>>>?|~|\\^|\\||&)",
- token: ["keyword.operator.bitwise.dart"]
- },
- {
- regex: "((?:&|\\^|\\||<<|>>>?)=)",
- token: ["keyword.operator.assignment.bitwise.dart"]
- },
- {
- regex: "(===?|!==?|<=?|>=?)",
- token: ["keyword.operator.comparison.dart"]
- },
- {
- regex: "((?:[+*/%-]|\\~)=)",
- token: ["keyword.operator.assignment.arithmetic.dart"]
- },
- {
- regex: "=",
- token: "keyword.operator.assignment.dart"
- },
- {
- token : "string",
- regex : "'''",
- next : "qdoc"
- },
- {
- token : "string",
- regex : '"""',
- next : "qqdoc"
- },
- {
- token : "string",
- regex : "'",
- next : "qstring"
- },
- {
- token : "string",
- regex : '"',
- next : "qqstring"
- },
- {
- regex: "(\\-\\-|\\+\\+)",
- token: ["keyword.operator.increment-decrement.dart"]
- },
- {
- regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)",
- token: ["keyword.operator.arithmetic.dart"]
- },
- {
- regex: "(!|&&|\\|\\|)",
- token: ["keyword.operator.logical.dart"]
- },
- {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- },
- {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- },
- {
- token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : "\\*\\/",
- next : "start"
- }, {
- defaultToken : "comment"
- }
- ],
- "qdoc" : [
- {
- token : "string",
- regex : "'''",
- next : "start"
- }
- ].concat(stringfill),
- "qqdoc" : [
- {
- token : "string",
- regex : '"""',
- next : "start"
- }
- ].concat(stringfill),
- "qstring" : [
- {
- token : "string",
- regex : "'|$",
- next : "start"
- }
- ].concat(stringfill),
- "qqstring" : [
- {
- token : "string",
- regex : '"|$',
- next : "start"
- }
- ].concat(stringfill)
- };
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ DocCommentHighlightRules.getEndRule("start") ]);
- };
- oop.inherits(DartHighlightRules, TextHighlightRules);
- exports.DartHighlightRules = DartHighlightRules;
- });
- define("ace/mode/dart",["ace_require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"], function(ace_require, exports, module) {
- "use strict";
- var oop = ace_require("../lib/oop");
- var CMode = ace_require("./c_cpp").Mode;
- var DartHighlightRules = ace_require("./dart_highlight_rules").DartHighlightRules;
- var CStyleFoldMode = ace_require("./folding/cstyle").FoldMode;
- var Mode = function() {
- CMode.call(this);
- this.HighlightRules = DartHighlightRules;
- this.foldingRules = new CStyleFoldMode();
- };
- oop.inherits(Mode, CMode);
- (function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
- this.$id = "ace/mode/dart";
- this.snippetFileId = "ace/snippets/dart";
- }).call(Mode.prototype);
- exports.Mode = Mode;
- }); (function() {
- window.ace_require(["ace/mode/dart"], function(m) {
- if (typeof module == "object" && typeof exports == "object" && module) {
- module.exports = m;
- }
- });
- })();
-
|