ace-rails-ap 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +1 -1
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace/ace.js +6911 -5290
- data/vendor/assets/javascripts/ace/ext-chromevox.js +537 -0
- data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +301 -0
- data/vendor/assets/javascripts/ace/ext-emmet.js +1109 -0
- data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +207 -0
- data/vendor/assets/javascripts/ace/ext-language_tools.js +1665 -0
- data/vendor/assets/javascripts/ace/ext-modelist.js +168 -0
- data/vendor/assets/javascripts/ace/ext-old_ie.js +500 -0
- data/vendor/assets/javascripts/ace/ext-options.js +252 -0
- data/vendor/assets/javascripts/ace/ext-searchbox.js +421 -0
- data/vendor/assets/javascripts/ace/ext-settings_menu.js +632 -0
- data/vendor/assets/javascripts/ace/ext-spellcheck.js +68 -0
- data/vendor/assets/javascripts/ace/ext-split.js +271 -0
- data/vendor/assets/javascripts/ace/ext-static_highlight.js +178 -0
- data/vendor/assets/javascripts/ace/ext-statusbar.js +47 -0
- data/vendor/assets/javascripts/ace/ext-textarea.js +478 -0
- data/vendor/assets/javascripts/ace/ext-themelist.js +86 -0
- data/vendor/assets/javascripts/ace/ext-whitespace.js +206 -0
- data/vendor/assets/javascripts/ace/keybinding-emacs.js +822 -131
- data/vendor/assets/javascripts/ace/keybinding-vim.js +382 -258
- data/vendor/assets/javascripts/ace/mode-abap.js +261 -0
- data/vendor/assets/javascripts/ace/mode-actionscript.js +257 -0
- data/vendor/assets/javascripts/ace/mode-ada.js +118 -0
- data/vendor/assets/javascripts/ace/mode-asciidoc.js +373 -0
- data/vendor/assets/javascripts/ace/mode-assembly_x86.js +217 -0
- data/vendor/assets/javascripts/ace/mode-autohotkey.js +225 -0
- data/vendor/assets/javascripts/ace/mode-batchfile.js +213 -0
- data/vendor/assets/javascripts/ace/mode-c9search.js +144 -124
- data/vendor/assets/javascripts/ace/mode-c_cpp.js +296 -254
- data/vendor/assets/javascripts/ace/mode-clojure.js +113 -177
- data/vendor/assets/javascripts/ace/mode-cobol.js +125 -0
- data/vendor/assets/javascripts/ace/mode-coffee.js +152 -235
- data/vendor/assets/javascripts/ace/mode-coldfusion.js +823 -835
- data/vendor/assets/javascripts/ace/mode-csharp.js +325 -187
- data/vendor/assets/javascripts/ace/mode-css.js +583 -297
- data/vendor/assets/javascripts/ace/mode-curly.js +2423 -0
- data/vendor/assets/javascripts/ace/mode-d.js +492 -0
- data/vendor/assets/javascripts/ace/mode-dart.js +993 -0
- data/vendor/assets/javascripts/ace/mode-diff.js +124 -204
- data/vendor/assets/javascripts/ace/mode-django.js +2448 -0
- data/vendor/assets/javascripts/ace/mode-dot.js +361 -0
- data/vendor/assets/javascripts/ace/mode-ejs.js +2817 -0
- data/vendor/assets/javascripts/ace/mode-erlang.js +987 -0
- data/vendor/assets/javascripts/ace/mode-forth.js +280 -0
- data/vendor/assets/javascripts/ace/mode-ftl.js +1061 -0
- data/vendor/assets/javascripts/ace/mode-glsl.js +313 -275
- data/vendor/assets/javascripts/ace/mode-golang.js +268 -275
- data/vendor/assets/javascripts/ace/mode-groovy.js +347 -492
- data/vendor/assets/javascripts/ace/mode-haml.js +498 -0
- data/vendor/assets/javascripts/ace/mode-handlebars.js +2433 -0
- data/vendor/assets/javascripts/ace/mode-haskell.js +362 -0
- data/vendor/assets/javascripts/ace/mode-haxe.js +226 -202
- data/vendor/assets/javascripts/ace/mode-html.js +1099 -802
- data/vendor/assets/javascripts/ace/mode-html_completions.js +309 -0
- data/vendor/assets/javascripts/ace/mode-html_ruby.js +2822 -0
- data/vendor/assets/javascripts/ace/mode-ini.js +185 -0
- data/vendor/assets/javascripts/ace/mode-jack.js +653 -0
- data/vendor/assets/javascripts/ace/mode-jade.js +2081 -0
- data/vendor/assets/javascripts/ace/mode-java.js +339 -488
- data/vendor/assets/javascripts/ace/mode-javascript.js +342 -478
- data/vendor/assets/javascripts/ace/mode-json.js +215 -178
- data/vendor/assets/javascripts/ace/mode-jsoniq.js +2761 -0
- data/vendor/assets/javascripts/ace/mode-jsp.js +1553 -0
- data/vendor/assets/javascripts/ace/mode-jsx.js +325 -289
- data/vendor/assets/javascripts/ace/mode-julia.js +286 -0
- data/vendor/assets/javascripts/ace/mode-latex.js +141 -46
- data/vendor/assets/javascripts/ace/mode-less.js +493 -151
- data/vendor/assets/javascripts/ace/mode-liquid.js +594 -656
- data/vendor/assets/javascripts/ace/mode-lisp.js +137 -0
- data/vendor/assets/javascripts/ace/mode-livescript.js +288 -0
- data/vendor/assets/javascripts/ace/mode-logiql.js +669 -0
- data/vendor/assets/javascripts/ace/mode-lsl.js +890 -0
- data/vendor/assets/javascripts/ace/mode-lua.js +274 -368
- data/vendor/assets/javascripts/ace/mode-luapage.js +1331 -1107
- data/vendor/assets/javascripts/ace/mode-lucene.js +64 -0
- data/vendor/assets/javascripts/ace/mode-makefile.js +332 -0
- data/vendor/assets/javascripts/ace/mode-markdown.js +1303 -948
- data/vendor/assets/javascripts/ace/mode-matlab.js +230 -0
- data/vendor/assets/javascripts/ace/mode-mushcode.js +705 -0
- data/vendor/assets/javascripts/ace/mode-mushcode_high_rules.js +569 -0
- data/vendor/assets/javascripts/ace/mode-mysql.js +185 -0
- data/vendor/assets/javascripts/ace/mode-nix.js +935 -0
- data/vendor/assets/javascripts/ace/mode-objectivec.js +699 -0
- data/vendor/assets/javascripts/ace/mode-ocaml.js +44 -63
- data/vendor/assets/javascripts/ace/mode-pascal.js +233 -0
- data/vendor/assets/javascripts/ace/mode-perl.js +116 -189
- data/vendor/assets/javascripts/ace/mode-pgsql.js +886 -500
- data/vendor/assets/javascripts/ace/mode-php.js +1158 -380
- data/vendor/assets/javascripts/ace/mode-plain_text.js +56 -0
- data/vendor/assets/javascripts/ace/mode-powershell.js +222 -167
- data/vendor/assets/javascripts/ace/mode-prolog.js +354 -0
- data/vendor/assets/javascripts/ace/mode-properties.js +100 -0
- data/vendor/assets/javascripts/ace/mode-protobuf.js +885 -0
- data/vendor/assets/javascripts/ace/mode-python.js +99 -201
- data/vendor/assets/javascripts/ace/mode-r.js +337 -0
- data/vendor/assets/javascripts/ace/mode-rdoc.js +210 -0
- data/vendor/assets/javascripts/ace/mode-rhtml.js +2663 -0
- data/vendor/assets/javascripts/ace/mode-ruby.js +262 -136
- data/vendor/assets/javascripts/ace/mode-rust.js +245 -0
- data/vendor/assets/javascripts/ace/mode-sass.js +443 -0
- data/vendor/assets/javascripts/ace/mode-scad.js +225 -240
- data/vendor/assets/javascripts/ace/mode-scala.js +340 -494
- data/vendor/assets/javascripts/ace/mode-scheme.js +143 -0
- data/vendor/assets/javascripts/ace/mode-scss.js +499 -157
- data/vendor/assets/javascripts/ace/mode-sh.js +180 -110
- data/vendor/assets/javascripts/ace/mode-sjs.js +1154 -0
- data/vendor/assets/javascripts/ace/mode-snippets.js +198 -0
- data/vendor/assets/javascripts/ace/mode-soy_template.js +2707 -0
- data/vendor/assets/javascripts/ace/mode-space.js +160 -0
- data/vendor/assets/javascripts/ace/mode-sql.js +48 -69
- data/vendor/assets/javascripts/ace/mode-stylus.js +447 -0
- data/vendor/assets/javascripts/ace/mode-svg.js +552 -605
- data/vendor/assets/javascripts/ace/mode-tcl.js +139 -98
- data/vendor/assets/javascripts/ace/mode-tex.js +187 -0
- data/vendor/assets/javascripts/ace/mode-textile.js +29 -40
- data/vendor/assets/javascripts/ace/mode-tmsnippet.js +200 -0
- data/vendor/assets/javascripts/ace/mode-toml.js +177 -0
- data/vendor/assets/javascripts/ace/mode-twig.js +2228 -0
- data/vendor/assets/javascripts/ace/mode-typescript.js +1018 -0
- data/vendor/assets/javascripts/ace/mode-vbscript.js +250 -0
- data/vendor/assets/javascripts/ace/mode-velocity.js +1621 -0
- data/vendor/assets/javascripts/ace/mode-verilog.js +127 -0
- data/vendor/assets/javascripts/ace/mode-vhdl.js +139 -0
- data/vendor/assets/javascripts/ace/mode-xml.js +350 -242
- data/vendor/assets/javascripts/ace/mode-xquery.js +2490 -300
- data/vendor/assets/javascripts/ace/mode-yaml.js +146 -45
- data/vendor/assets/javascripts/ace/theme-ambiance.js +202 -0
- data/vendor/assets/javascripts/ace/theme-chaos.js +179 -0
- data/vendor/assets/javascripts/ace/theme-chrome.js +97 -153
- data/vendor/assets/javascripts/ace/theme-clouds.js +78 -119
- data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +79 -120
- data/vendor/assets/javascripts/ace/theme-cobalt.js +89 -140
- data/vendor/assets/javascripts/ace/theme-crimson_editor.js +93 -145
- data/vendor/assets/javascripts/ace/theme-dawn.js +84 -143
- data/vendor/assets/javascripts/ace/theme-dreamweaver.js +99 -162
- data/vendor/assets/javascripts/ace/theme-eclipse.js +78 -111
- data/vendor/assets/javascripts/ace/theme-github.js +70 -121
- data/vendor/assets/javascripts/ace/theme-idle_fingers.js +75 -134
- data/vendor/assets/javascripts/ace/theme-kr.js +135 -0
- data/vendor/assets/javascripts/ace/theme-merbivore.js +80 -143
- data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +81 -149
- data/vendor/assets/javascripts/ace/theme-mono_industrial.js +87 -146
- data/vendor/assets/javascripts/ace/theme-monokai.js +88 -146
- data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +82 -142
- data/vendor/assets/javascripts/ace/theme-solarized_dark.js +83 -144
- data/vendor/assets/javascripts/ace/theme-solarized_light.js +76 -133
- data/vendor/assets/javascripts/ace/theme-terminal.js +145 -0
- data/vendor/assets/javascripts/ace/theme-textmate.js +101 -158
- data/vendor/assets/javascripts/ace/theme-tomorrow.js +89 -163
- data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +89 -163
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +89 -165
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +101 -162
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +90 -160
- data/vendor/assets/javascripts/ace/theme-twilight.js +87 -158
- data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +75 -140
- data/vendor/assets/javascripts/ace/theme-xcode.js +120 -0
- data/vendor/assets/javascripts/ace/worker-coffee.js +3049 -2665
- data/vendor/assets/javascripts/ace/worker-css.js +1779 -4376
- data/vendor/assets/javascripts/ace/worker-javascript.js +8701 -9008
- data/vendor/assets/javascripts/ace/worker-json.js +709 -1340
- data/vendor/assets/javascripts/ace/worker-lua.js +3525 -0
- data/vendor/assets/javascripts/ace/worker-php.js +6893 -0
- data/vendor/assets/javascripts/ace/worker-xquery.js +19924 -64507
- metadata +100 -17
@@ -0,0 +1,492 @@
|
|
1
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
+
* Distributed under the BSD license:
|
3
|
+
*
|
4
|
+
* Copyright (c) 2012, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
9
|
+
* * Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* * Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* * Neither the name of Ajax.org B.V. nor the
|
15
|
+
* names of its contributors may be used to endorse or promote products
|
16
|
+
* derived from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
*
|
29
|
+
* ***** END LICENSE BLOCK ***** */
|
30
|
+
|
31
|
+
define('ace/mode/d', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/d_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
|
32
|
+
|
33
|
+
|
34
|
+
var oop = require("../lib/oop");
|
35
|
+
var TextMode = require("./text").Mode;
|
36
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
37
|
+
var DHighlightRules = require("./d_highlight_rules").DHighlightRules;
|
38
|
+
var FoldMode = require("./folding/cstyle").FoldMode;
|
39
|
+
|
40
|
+
var Mode = function() {
|
41
|
+
this.HighlightRules = DHighlightRules;
|
42
|
+
this.foldingRules = new FoldMode();
|
43
|
+
};
|
44
|
+
oop.inherits(Mode, TextMode);
|
45
|
+
|
46
|
+
(function() {
|
47
|
+
this.lineCommentStart = "/\\+";
|
48
|
+
this.blockComment = {start: "/*", end: "*/"};
|
49
|
+
this.$id = "ace/mode/d";
|
50
|
+
}).call(Mode.prototype);
|
51
|
+
|
52
|
+
exports.Mode = Mode;
|
53
|
+
});
|
54
|
+
|
55
|
+
define('ace/mode/d_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
56
|
+
|
57
|
+
|
58
|
+
var oop = require("../lib/oop");
|
59
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
60
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
61
|
+
|
62
|
+
var DHighlightRules = function() {
|
63
|
+
|
64
|
+
var keywords = (
|
65
|
+
"this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|"+
|
66
|
+
"typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters"
|
67
|
+
);
|
68
|
+
|
69
|
+
var keywordControls = (
|
70
|
+
"break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|" +
|
71
|
+
"return|switch|while|catch|try|throw|finally|version|assert|unittest|with"
|
72
|
+
);
|
73
|
+
|
74
|
+
var types = (
|
75
|
+
"auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|" +
|
76
|
+
"cfloat|creal|cdouble|cent|ifloat|ireal|idouble|" +
|
77
|
+
"int|long|short|void|uint|ulong|ushort|ucent|" +
|
78
|
+
"function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object"
|
79
|
+
);
|
80
|
+
|
81
|
+
var modifiers = (
|
82
|
+
"abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|" +
|
83
|
+
"ref|immutable|lazy|nothrow|override|package|pragma|private|protected|" +
|
84
|
+
"public|pure|scope|shared|__gshared|synchronized|static|volatile"
|
85
|
+
);
|
86
|
+
|
87
|
+
var storages = (
|
88
|
+
"class|struct|union|template|interface|enum|macro"
|
89
|
+
);
|
90
|
+
|
91
|
+
var stringEscapesSeq = {
|
92
|
+
token: "constant.language.escape",
|
93
|
+
regex: "\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv])|" +
|
94
|
+
"(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))"
|
95
|
+
};
|
96
|
+
|
97
|
+
var builtinConstants = (
|
98
|
+
"null|true|false|"+
|
99
|
+
"__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|"+
|
100
|
+
"__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__"
|
101
|
+
);
|
102
|
+
|
103
|
+
var operators = (
|
104
|
+
"/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|" +
|
105
|
+
"\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|" +
|
106
|
+
"\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|" +
|
107
|
+
"\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|" +
|
108
|
+
"\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#"
|
109
|
+
);
|
110
|
+
|
111
|
+
var keywordMapper = this.$keywords = this.createKeywordMapper({
|
112
|
+
"keyword.modifier" : modifiers,
|
113
|
+
"keyword.control" : keywordControls,
|
114
|
+
"keyword.type" : types,
|
115
|
+
"keyword": keywords,
|
116
|
+
"keyword.storage": storages,
|
117
|
+
"punctation": "\\.|\\,|;|\\.\\.|\\.\\.\\.",
|
118
|
+
"keyword.operator" : operators,
|
119
|
+
"constant.language": builtinConstants
|
120
|
+
}, "identifier");
|
121
|
+
|
122
|
+
var identifierRe = "[a-zA-Z_\u00a1-\uffff][a-zA-Z\\d_\u00a1-\uffff]*\\b";
|
123
|
+
|
124
|
+
this.$rules = {
|
125
|
+
"start" : [
|
126
|
+
{ //-------------------------------------------------------- COMMENTS
|
127
|
+
token : "comment",
|
128
|
+
regex : "\\/\\/.*$"
|
129
|
+
},
|
130
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
131
|
+
{
|
132
|
+
token : "comment", // multi line comment
|
133
|
+
regex : "\\/\\*",
|
134
|
+
next : "star-comment"
|
135
|
+
}, {
|
136
|
+
token: "comment.shebang",
|
137
|
+
regex: "^\s*#!.*"
|
138
|
+
}, {
|
139
|
+
token : "comment",
|
140
|
+
regex : "\\/\\+",
|
141
|
+
next: "plus-comment"
|
142
|
+
}, { //-------------------------------------------------------- STRINGS
|
143
|
+
onMatch: function(value, currentState, state) {
|
144
|
+
state.unshift(this.next, value.substr(2));
|
145
|
+
return "string";
|
146
|
+
},
|
147
|
+
regex: 'q"(?:[\\[\\(\\{\\<]+)',
|
148
|
+
next: 'operator-heredoc-string'
|
149
|
+
}, {
|
150
|
+
onMatch: function(value, currentState, state) {
|
151
|
+
state.unshift(this.next, value.substr(2));
|
152
|
+
return "string";
|
153
|
+
},
|
154
|
+
regex: 'q"(?:[a-zA-Z_]+)$',
|
155
|
+
next: 'identifier-heredoc-string'
|
156
|
+
}, {
|
157
|
+
token : "string", // multi line string start
|
158
|
+
regex : '[xr]?"',
|
159
|
+
next : "quote-string"
|
160
|
+
}, {
|
161
|
+
token : "string", // multi line string start
|
162
|
+
regex : '[xr]?`',
|
163
|
+
next : "backtick-string"
|
164
|
+
}, {
|
165
|
+
token : "string", // single line
|
166
|
+
regex : "[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"
|
167
|
+
}, { //-------------------------------------------------------- RULES
|
168
|
+
token: ["keyword", "text", "paren.lparen"],
|
169
|
+
regex: /(asm)(\s*)({)/,
|
170
|
+
next: "d-asm"
|
171
|
+
}, {
|
172
|
+
token: ["keyword", "text", "paren.lparen", "constant.language"],
|
173
|
+
regex: "(__traits)(\\s*)(\\()("+identifierRe+")"
|
174
|
+
}, { // import|module abc
|
175
|
+
token: ["keyword", "text", "variable.module"],
|
176
|
+
regex: "(import|module)(\\s+)((?:"+identifierRe+"\\.?)*)"
|
177
|
+
}, { // storage Name
|
178
|
+
token: ["keyword.storage", "text", "entity.name.type"],
|
179
|
+
regex: "("+storages+")(\\s*)("+identifierRe+")"
|
180
|
+
}, { // alias|typedef foo bar;
|
181
|
+
token: ["keyword", "text", "variable.storage", "text"],
|
182
|
+
regex: "(alias|typedef)(\\s*)("+identifierRe+")(\\s*)"
|
183
|
+
}, { //-------------------------------------------------------- OTHERS
|
184
|
+
token : "constant.numeric", // hex
|
185
|
+
regex : "0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"
|
186
|
+
}, {
|
187
|
+
token : "constant.numeric", // float
|
188
|
+
regex : "[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"
|
189
|
+
}, {
|
190
|
+
token: "entity.other.attribute-name",
|
191
|
+
regex: "@"+identifierRe
|
192
|
+
}, {
|
193
|
+
token : keywordMapper,
|
194
|
+
regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
|
195
|
+
}, {
|
196
|
+
token : "keyword.operator",
|
197
|
+
regex : operators
|
198
|
+
}, {
|
199
|
+
token : "punctuation.operator",
|
200
|
+
regex : "\\?|\\:|\\,|\\;|\\.|\\:"
|
201
|
+
}, {
|
202
|
+
token : "paren.lparen",
|
203
|
+
regex : "[[({]"
|
204
|
+
}, {
|
205
|
+
token : "paren.rparen",
|
206
|
+
regex : "[\\])}]"
|
207
|
+
}, {
|
208
|
+
token : "text",
|
209
|
+
regex : "\\s+"
|
210
|
+
}
|
211
|
+
],
|
212
|
+
"star-comment" : [
|
213
|
+
{
|
214
|
+
token : "comment", // closing comment
|
215
|
+
regex : "\\*\\/",
|
216
|
+
next : "start"
|
217
|
+
}, {
|
218
|
+
defaultToken: 'comment'
|
219
|
+
}
|
220
|
+
],
|
221
|
+
"plus-comment" : [
|
222
|
+
{
|
223
|
+
token : "comment", // closing comment
|
224
|
+
regex : "\\+\\/",
|
225
|
+
next : "start"
|
226
|
+
}, {
|
227
|
+
defaultToken: 'comment'
|
228
|
+
}
|
229
|
+
],
|
230
|
+
|
231
|
+
"quote-string" : [
|
232
|
+
stringEscapesSeq,
|
233
|
+
{
|
234
|
+
token : "string",
|
235
|
+
regex : '"[cdw]?',
|
236
|
+
next : "start"
|
237
|
+
}, {
|
238
|
+
defaultToken: 'string'
|
239
|
+
}
|
240
|
+
],
|
241
|
+
|
242
|
+
"backtick-string" : [
|
243
|
+
stringEscapesSeq,
|
244
|
+
{
|
245
|
+
token : "string",
|
246
|
+
regex : '`[cdw]?',
|
247
|
+
next : "start"
|
248
|
+
}, {
|
249
|
+
defaultToken: 'string'
|
250
|
+
}
|
251
|
+
],
|
252
|
+
|
253
|
+
"operator-heredoc-string": [
|
254
|
+
{
|
255
|
+
onMatch: function(value, currentState, state) {
|
256
|
+
value = value.substring(value.length-2, value.length-1);
|
257
|
+
var map = {'>':'<',']':'[',')':'(','}':'{'};
|
258
|
+
if(Object.keys(map).indexOf(value) != -1)
|
259
|
+
value = map[value];
|
260
|
+
if(value != state[1]) return "string";
|
261
|
+
state.shift();
|
262
|
+
state.shift();
|
263
|
+
|
264
|
+
return "string";
|
265
|
+
},
|
266
|
+
regex: '(?:[\\]\\)}>]+)"',
|
267
|
+
next: 'start'
|
268
|
+
}, {
|
269
|
+
token: 'string',
|
270
|
+
regex: '[^\\]\\)}>]+'
|
271
|
+
}
|
272
|
+
],
|
273
|
+
|
274
|
+
"identifier-heredoc-string": [
|
275
|
+
{
|
276
|
+
onMatch: function(value, currentState, state) {
|
277
|
+
value = value.substring(0, value.length-1);
|
278
|
+
if(value != state[1]) return "string";
|
279
|
+
state.shift();
|
280
|
+
state.shift();
|
281
|
+
|
282
|
+
return "string";
|
283
|
+
},
|
284
|
+
regex: '^(?:[A-Za-z_][a-zA-Z0-9]+)"',
|
285
|
+
next: 'start'
|
286
|
+
}, {
|
287
|
+
token: 'string',
|
288
|
+
regex: '[^\\]\\)}>]+'
|
289
|
+
}
|
290
|
+
],
|
291
|
+
|
292
|
+
"d-asm": [
|
293
|
+
{
|
294
|
+
token: "paren.rparen",
|
295
|
+
regex: "\\}",
|
296
|
+
next: "start"
|
297
|
+
}, {
|
298
|
+
token: 'keyword.instruction',
|
299
|
+
regex: '[a-zA-Z]+',
|
300
|
+
next: 'd-asm-instruction'
|
301
|
+
}, {
|
302
|
+
token: "text",
|
303
|
+
regex: "\\s+"
|
304
|
+
}
|
305
|
+
],
|
306
|
+
'd-asm-instruction': [
|
307
|
+
{
|
308
|
+
token: 'constant.language',
|
309
|
+
regex: /AL|AH|AX|EAX|BL|BH|BX|EBX|CL|CH|CX|ECX|DL|DH|DX|EDX|BP|EBP|SP|ESP|DI|EDI|SI|ESI/i
|
310
|
+
}, {
|
311
|
+
token: 'identifier',
|
312
|
+
regex: '[a-zA-Z]+'
|
313
|
+
}, {
|
314
|
+
token: 'string',
|
315
|
+
regex: '".*"'
|
316
|
+
}, {
|
317
|
+
token: 'comment',
|
318
|
+
regex: '//.*$'
|
319
|
+
}, {
|
320
|
+
token: 'constant.numeric',
|
321
|
+
regex: '[0-9.xA-F]+'
|
322
|
+
}, {
|
323
|
+
token: 'punctuation.operator',
|
324
|
+
regex: '\\,'
|
325
|
+
}, {
|
326
|
+
token: 'punctuation.operator',
|
327
|
+
regex: ';',
|
328
|
+
next: 'd-asm'
|
329
|
+
}, {
|
330
|
+
token: 'text',
|
331
|
+
regex: '\\s+'
|
332
|
+
}
|
333
|
+
]
|
334
|
+
};
|
335
|
+
|
336
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
337
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
338
|
+
};
|
339
|
+
|
340
|
+
DHighlightRules.metaData = {
|
341
|
+
comment: 'D language',
|
342
|
+
fileTypes: [ 'd', 'di' ],
|
343
|
+
firstLineMatch: '^#!.*\\b[glr]?dmd\\b.',
|
344
|
+
foldingStartMarker: '(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))',
|
345
|
+
foldingStopMarker: '(?<!\\*)\\*\\*/|^\\s*\\}',
|
346
|
+
keyEquivalent: '^~D',
|
347
|
+
name: 'D',
|
348
|
+
scopeName: 'source.d'
|
349
|
+
};
|
350
|
+
oop.inherits(DHighlightRules, TextHighlightRules);
|
351
|
+
|
352
|
+
exports.DHighlightRules = DHighlightRules;
|
353
|
+
});
|
354
|
+
|
355
|
+
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
356
|
+
|
357
|
+
|
358
|
+
var oop = require("../lib/oop");
|
359
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
360
|
+
|
361
|
+
var DocCommentHighlightRules = function() {
|
362
|
+
|
363
|
+
this.$rules = {
|
364
|
+
"start" : [ {
|
365
|
+
token : "comment.doc.tag",
|
366
|
+
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
367
|
+
}, {
|
368
|
+
token : "comment.doc.tag",
|
369
|
+
regex : "\\bTODO\\b"
|
370
|
+
}, {
|
371
|
+
defaultToken : "comment.doc"
|
372
|
+
}]
|
373
|
+
};
|
374
|
+
};
|
375
|
+
|
376
|
+
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
377
|
+
|
378
|
+
DocCommentHighlightRules.getStartRule = function(start) {
|
379
|
+
return {
|
380
|
+
token : "comment.doc", // doc comment
|
381
|
+
regex : "\\/\\*(?=\\*)",
|
382
|
+
next : start
|
383
|
+
};
|
384
|
+
};
|
385
|
+
|
386
|
+
DocCommentHighlightRules.getEndRule = function (start) {
|
387
|
+
return {
|
388
|
+
token : "comment.doc", // closing comment
|
389
|
+
regex : "\\*\\/",
|
390
|
+
next : start
|
391
|
+
};
|
392
|
+
};
|
393
|
+
|
394
|
+
|
395
|
+
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
396
|
+
|
397
|
+
});
|
398
|
+
|
399
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
400
|
+
|
401
|
+
|
402
|
+
var oop = require("../../lib/oop");
|
403
|
+
var Range = require("../../range").Range;
|
404
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
405
|
+
|
406
|
+
var FoldMode = exports.FoldMode = function(commentRegex) {
|
407
|
+
if (commentRegex) {
|
408
|
+
this.foldingStartMarker = new RegExp(
|
409
|
+
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
410
|
+
);
|
411
|
+
this.foldingStopMarker = new RegExp(
|
412
|
+
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
413
|
+
);
|
414
|
+
}
|
415
|
+
};
|
416
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
417
|
+
|
418
|
+
(function() {
|
419
|
+
|
420
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
421
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
422
|
+
|
423
|
+
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
424
|
+
var line = session.getLine(row);
|
425
|
+
var match = line.match(this.foldingStartMarker);
|
426
|
+
if (match) {
|
427
|
+
var i = match.index;
|
428
|
+
|
429
|
+
if (match[1])
|
430
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
431
|
+
|
432
|
+
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
433
|
+
|
434
|
+
if (range && !range.isMultiLine()) {
|
435
|
+
if (forceMultiline) {
|
436
|
+
range = this.getSectionRange(session, row);
|
437
|
+
} else if (foldStyle != "all")
|
438
|
+
range = null;
|
439
|
+
}
|
440
|
+
|
441
|
+
return range;
|
442
|
+
}
|
443
|
+
|
444
|
+
if (foldStyle === "markbegin")
|
445
|
+
return;
|
446
|
+
|
447
|
+
var match = line.match(this.foldingStopMarker);
|
448
|
+
if (match) {
|
449
|
+
var i = match.index + match[0].length;
|
450
|
+
|
451
|
+
if (match[1])
|
452
|
+
return this.closingBracketBlock(session, match[1], row, i);
|
453
|
+
|
454
|
+
return session.getCommentFoldRange(row, i, -1);
|
455
|
+
}
|
456
|
+
};
|
457
|
+
|
458
|
+
this.getSectionRange = function(session, row) {
|
459
|
+
var line = session.getLine(row);
|
460
|
+
var startIndent = line.search(/\S/);
|
461
|
+
var startRow = row;
|
462
|
+
var startColumn = line.length;
|
463
|
+
row = row + 1;
|
464
|
+
var endRow = row;
|
465
|
+
var maxRow = session.getLength();
|
466
|
+
while (++row < maxRow) {
|
467
|
+
line = session.getLine(row);
|
468
|
+
var indent = line.search(/\S/);
|
469
|
+
if (indent === -1)
|
470
|
+
continue;
|
471
|
+
if (startIndent > indent)
|
472
|
+
break;
|
473
|
+
var subRange = this.getFoldWidgetRange(session, "all", row);
|
474
|
+
|
475
|
+
if (subRange) {
|
476
|
+
if (subRange.start.row <= startRow) {
|
477
|
+
break;
|
478
|
+
} else if (subRange.isMultiLine()) {
|
479
|
+
row = subRange.end.row;
|
480
|
+
} else if (startIndent == indent) {
|
481
|
+
break;
|
482
|
+
}
|
483
|
+
}
|
484
|
+
endRow = row;
|
485
|
+
}
|
486
|
+
|
487
|
+
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
488
|
+
};
|
489
|
+
|
490
|
+
}).call(FoldMode.prototype);
|
491
|
+
|
492
|
+
});
|