datagram 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.env.sample +7 -0
- data/.gitignore +20 -0
- data/.rbenv-version +1 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +22 -0
- data/Procfile +1 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/config.ru +5 -0
- data/datagram.gemspec +23 -0
- data/db/migrate/1_create_queries.rb +9 -0
- data/db/migrate/2_add_name_to_queries.rb +5 -0
- data/lib/datagram/version.rb +3 -0
- data/lib/datagram.rb +135 -0
- data/lib/views/application.coffee +222 -0
- data/lib/views/index.haml +47 -0
- data/lib/views/layout.haml +17 -0
- data/lib/views/style.sass +179 -0
- data/public/ace/ace.js +15209 -0
- data/public/ace/ext-elastic_tabstops_lite.js +301 -0
- data/public/ace/ext-emmet.js +253 -0
- data/public/ace/ext-searchbox.js +441 -0
- data/public/ace/ext-spellcheck.js +67 -0
- data/public/ace/ext-static_highlight.js +96 -0
- data/public/ace/ext-textarea.js +492 -0
- data/public/ace/ext-whitespace.js +204 -0
- data/public/ace/keybinding-emacs.js +962 -0
- data/public/ace/keybinding-vim.js +1704 -0
- data/public/ace/mode-abap.js +260 -0
- data/public/ace/mode-asciidoc.js +372 -0
- data/public/ace/mode-c9search.js +182 -0
- data/public/ace/mode-c_cpp.js +737 -0
- data/public/ace/mode-clojure.js +299 -0
- data/public/ace/mode-coffee.js +426 -0
- data/public/ace/mode-coldfusion.js +1753 -0
- data/public/ace/mode-csharp.js +612 -0
- data/public/ace/mode-css.js +773 -0
- data/public/ace/mode-curly.js +1950 -0
- data/public/ace/mode-dart.js +945 -0
- data/public/ace/mode-diff.js +166 -0
- data/public/ace/mode-django.js +1969 -0
- data/public/ace/mode-dot.js +320 -0
- data/public/ace/mode-ftl.js +907 -0
- data/public/ace/mode-glsl.js +810 -0
- data/public/ace/mode-golang.js +632 -0
- data/public/ace/mode-groovy.js +1037 -0
- data/public/ace/mode-haml.js +487 -0
- data/public/ace/mode-haxe.js +609 -0
- data/public/ace/mode-html.js +1881 -0
- data/public/ace/mode-jade.js +1951 -0
- data/public/ace/mode-java.js +996 -0
- data/public/ace/mode-javascript.js +876 -0
- data/public/ace/mode-json.js +578 -0
- data/public/ace/mode-jsp.js +1351 -0
- data/public/ace/mode-jsx.js +635 -0
- data/public/ace/mode-latex.js +189 -0
- data/public/ace/mode-less.js +807 -0
- data/public/ace/mode-liquid.js +862 -0
- data/public/ace/mode-lisp.js +138 -0
- data/public/ace/mode-livescript.js +288 -0
- data/public/ace/mode-logiql.js +664 -0
- data/public/ace/mode-lsl.js +828 -0
- data/public/ace/mode-lua.js +455 -0
- data/public/ace/mode-luapage.js +2340 -0
- data/public/ace/mode-lucene.js +64 -0
- data/public/ace/mode-makefile.js +313 -0
- data/public/ace/mode-markdown.js +2280 -0
- data/public/ace/mode-mushcode.js +704 -0
- data/public/ace/mode-mushcode_high_rules.js +569 -0
- data/public/ace/mode-objectivec.js +659 -0
- data/public/ace/mode-ocaml.js +443 -0
- data/public/ace/mode-pascal.js +233 -0
- data/public/ace/mode-perl.js +316 -0
- data/public/ace/mode-pgsql.js +908 -0
- data/public/ace/mode-php.js +2291 -0
- data/public/ace/mode-powershell.js +618 -0
- data/public/ace/mode-python.js +264 -0
- data/public/ace/mode-r.js +404 -0
- data/public/ace/mode-rdoc.js +184 -0
- data/public/ace/mode-rhtml.js +2168 -0
- data/public/ace/mode-ruby.js +431 -0
- data/public/ace/mode-sass.js +442 -0
- data/public/ace/mode-scad.js +670 -0
- data/public/ace/mode-scala.js +1025 -0
- data/public/ace/mode-scheme.js +144 -0
- data/public/ace/mode-scss.js +832 -0
- data/public/ace/mode-sh.js +204 -0
- data/public/ace/mode-sql.js +118 -0
- data/public/ace/mode-stylus.js +483 -0
- data/public/ace/mode-svg.js +1442 -0
- data/public/ace/mode-tcl.js +319 -0
- data/public/ace/mode-tex.js +166 -0
- data/public/ace/mode-text.js +0 -0
- data/public/ace/mode-textile.js +170 -0
- data/public/ace/mode-tmsnippet.js +200 -0
- data/public/ace/mode-toml.js +180 -0
- data/public/ace/mode-typescript.js +961 -0
- data/public/ace/mode-vbscript.js +281 -0
- data/public/ace/mode-velocity.js +962 -0
- data/public/ace/mode-xml.js +789 -0
- data/public/ace/mode-xquery.js +2750 -0
- data/public/ace/mode-yaml.js +289 -0
- data/public/ace/theme-ambiance.js +202 -0
- data/public/ace/theme-chaos.js +182 -0
- data/public/ace/theme-chrome.js +161 -0
- data/public/ace/theme-clouds.js +135 -0
- data/public/ace/theme-clouds_midnight.js +136 -0
- data/public/ace/theme-cobalt.js +150 -0
- data/public/ace/theme-crimson_editor.js +154 -0
- data/public/ace/theme-dawn.js +146 -0
- data/public/ace/theme-dreamweaver.js +173 -0
- data/public/ace/theme-eclipse.js +122 -0
- data/public/ace/theme-github.js +136 -0
- data/public/ace/theme-idle_fingers.js +136 -0
- data/public/ace/theme-kr.js +143 -0
- data/public/ace/theme-merbivore.js +135 -0
- data/public/ace/theme-merbivore_soft.js +136 -0
- data/public/ace/theme-mono_industrial.js +148 -0
- data/public/ace/theme-monokai.js +140 -0
- data/public/ace/theme-pastel_on_dark.js +148 -0
- data/public/ace/theme-solarized_dark.js +128 -0
- data/public/ace/theme-solarized_light.js +131 -0
- data/public/ace/theme-terminal.js +154 -0
- data/public/ace/theme-textmate.js +0 -0
- data/public/ace/theme-tomorrow.js +147 -0
- data/public/ace/theme-tomorrow_night.js +147 -0
- data/public/ace/theme-tomorrow_night_blue.js +145 -0
- data/public/ace/theme-tomorrow_night_bright.js +147 -0
- data/public/ace/theme-tomorrow_night_eighties.js +144 -0
- data/public/ace/theme-twilight.js +147 -0
- data/public/ace/theme-vibrant_ink.js +131 -0
- data/public/ace/theme-xcode.js +125 -0
- data/public/ace/worker-coffee.js +7091 -0
- data/public/ace/worker-css.js +8289 -0
- data/public/ace/worker-javascript.js +6496 -0
- data/public/ace/worker-json.js +2305 -0
- data/public/ace/worker-lua.js +3313 -0
- data/public/ace/worker-php.js +6743 -0
- data/public/ace/worker-xquery.js +21897 -0
- data/public/font/FontAwesome.otf +0 -0
- data/public/font/fontawesome-webfont.eot +0 -0
- data/public/font/fontawesome-webfont.svg +284 -0
- data/public/font/fontawesome-webfont.ttf +0 -0
- data/public/font/fontawesome-webfont.woff +0 -0
- data/public/font-awesome.css +540 -0
- data/public/jquery.js +9597 -0
- data/script/migrate.sh +2 -0
- metadata +242 -0
@@ -0,0 +1,962 @@
|
|
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
|
+
*
|
30
|
+
* Contributor(s):
|
31
|
+
*
|
32
|
+
*
|
33
|
+
*
|
34
|
+
* ***** END LICENSE BLOCK ***** */
|
35
|
+
|
36
|
+
define('ace/mode/velocity', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/velocity_highlight_rules', 'ace/mode/folding/velocity'], function(require, exports, module) {
|
37
|
+
|
38
|
+
|
39
|
+
var oop = require("../lib/oop");
|
40
|
+
var TextMode = require("./text").Mode;
|
41
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
42
|
+
var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules;
|
43
|
+
var FoldMode = require("./folding/velocity").FoldMode;
|
44
|
+
|
45
|
+
var Mode = function() {
|
46
|
+
var highlighter = new VelocityHighlightRules();
|
47
|
+
this.foldingRules = new FoldMode();
|
48
|
+
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
49
|
+
};
|
50
|
+
oop.inherits(Mode, TextMode);
|
51
|
+
|
52
|
+
(function() {
|
53
|
+
this.lineCommentStart = "##";
|
54
|
+
this.blockComment = {start: "#*", end: "*#"};
|
55
|
+
}).call(Mode.prototype);
|
56
|
+
|
57
|
+
exports.Mode = Mode;
|
58
|
+
});define('ace/mode/velocity_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules'], function(require, exports, module) {
|
59
|
+
|
60
|
+
|
61
|
+
var oop = require("../lib/oop");
|
62
|
+
var lang = require("../lib/lang");
|
63
|
+
var xmlUtil = require("./xml_util");
|
64
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
65
|
+
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
66
|
+
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
67
|
+
|
68
|
+
var VelocityHighlightRules = function() {
|
69
|
+
var builtinConstants = lang.arrayToMap(
|
70
|
+
('true|false|null').split('|')
|
71
|
+
);
|
72
|
+
|
73
|
+
var builtinFunctions = lang.arrayToMap(
|
74
|
+
("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|')
|
75
|
+
);
|
76
|
+
|
77
|
+
var builtinVariables = lang.arrayToMap(
|
78
|
+
('$contentRoot|$foreach').split('|')
|
79
|
+
);
|
80
|
+
|
81
|
+
var keywords = lang.arrayToMap(
|
82
|
+
("#set|#macro|#include|#parse|" +
|
83
|
+
"#if|#elseif|#else|#foreach|" +
|
84
|
+
"#break|#end|#stop"
|
85
|
+
).split('|')
|
86
|
+
);
|
87
|
+
|
88
|
+
this.$rules = {
|
89
|
+
"start" : [
|
90
|
+
{
|
91
|
+
token : "meta.tag",
|
92
|
+
regex : "<\\!\\[CDATA\\[",
|
93
|
+
next : "cdata"
|
94
|
+
}, {
|
95
|
+
token : "xml-pe",
|
96
|
+
regex : "<\\?.*?\\?>"
|
97
|
+
}, {
|
98
|
+
token : "comment",
|
99
|
+
regex : "<\\!--",
|
100
|
+
next : "comment"
|
101
|
+
}, {
|
102
|
+
token : "meta.tag",
|
103
|
+
regex : "<(?=\\s*script\\b)",
|
104
|
+
next : "script"
|
105
|
+
}, {
|
106
|
+
token : "meta.tag",
|
107
|
+
regex : "<(?=\\s*style\\b)",
|
108
|
+
next : "style"
|
109
|
+
}, {
|
110
|
+
token : "meta.tag", // opening tag
|
111
|
+
regex : "<\\/?",
|
112
|
+
next : "tag"
|
113
|
+
}, {
|
114
|
+
token : "comment",
|
115
|
+
regex : "##.*$"
|
116
|
+
},{
|
117
|
+
token : "comment.block", // multi line comment
|
118
|
+
regex : "#\\*",
|
119
|
+
next : "comment"
|
120
|
+
}, {
|
121
|
+
token : "string.regexp",
|
122
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
123
|
+
}, {
|
124
|
+
token : "string", // single line
|
125
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
126
|
+
}, {
|
127
|
+
token : "string", // single line
|
128
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
129
|
+
}, {
|
130
|
+
token : "constant.numeric", // hex
|
131
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
132
|
+
}, {
|
133
|
+
token : "constant.numeric", // float
|
134
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
135
|
+
}, {
|
136
|
+
token : "constant.language.boolean",
|
137
|
+
regex : "(?:true|false)\\b"
|
138
|
+
}, {
|
139
|
+
token : function(value) {
|
140
|
+
if (keywords.hasOwnProperty(value))
|
141
|
+
return "keyword";
|
142
|
+
else if (builtinConstants.hasOwnProperty(value))
|
143
|
+
return "constant.language";
|
144
|
+
else if (builtinVariables.hasOwnProperty(value))
|
145
|
+
return "variable.language";
|
146
|
+
else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
|
147
|
+
return "support.function";
|
148
|
+
else if (value == "debugger")
|
149
|
+
return "invalid.deprecated";
|
150
|
+
else
|
151
|
+
if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/))
|
152
|
+
return "variable";
|
153
|
+
return "identifier";
|
154
|
+
},
|
155
|
+
regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b"
|
156
|
+
}, {
|
157
|
+
token : "keyword.operator",
|
158
|
+
regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=<|>|&&|\\|\\|"
|
159
|
+
}, {
|
160
|
+
token : "lparen",
|
161
|
+
regex : "[[({]"
|
162
|
+
}, {
|
163
|
+
token : "rparen",
|
164
|
+
regex : "[\\])}]"
|
165
|
+
}, {
|
166
|
+
token : "text",
|
167
|
+
regex : "\\s+"
|
168
|
+
}
|
169
|
+
],
|
170
|
+
"cdata" : [
|
171
|
+
{
|
172
|
+
token : "text",
|
173
|
+
regex : "\\]\\]>",
|
174
|
+
next : "start"
|
175
|
+
}, {
|
176
|
+
token : "text",
|
177
|
+
regex : "\\s+"
|
178
|
+
}, {
|
179
|
+
token : "text",
|
180
|
+
regex : ".+"
|
181
|
+
}
|
182
|
+
],
|
183
|
+
"comment" : [
|
184
|
+
{
|
185
|
+
token : "comment.block", // closing comment
|
186
|
+
regex : ".*?\\*#",
|
187
|
+
next : "start"
|
188
|
+
}, {
|
189
|
+
token : "comment", // comment spanning whole line
|
190
|
+
regex : ".+"
|
191
|
+
}
|
192
|
+
],
|
193
|
+
"vm_start" : [
|
194
|
+
{
|
195
|
+
token: "variable",
|
196
|
+
regex: "}",
|
197
|
+
next: "start"
|
198
|
+
}, {
|
199
|
+
token : "string.regexp",
|
200
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
201
|
+
}, {
|
202
|
+
token : "string", // single line
|
203
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
204
|
+
}, {
|
205
|
+
token : "string", // single line
|
206
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
207
|
+
}, {
|
208
|
+
token : "constant.numeric", // hex
|
209
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
210
|
+
}, {
|
211
|
+
token : "constant.numeric", // float
|
212
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
213
|
+
}, {
|
214
|
+
token : "constant.language.boolean",
|
215
|
+
regex : "(?:true|false)\\b"
|
216
|
+
}, {
|
217
|
+
token : function(value) {
|
218
|
+
if (keywords.hasOwnProperty(value))
|
219
|
+
return "keyword";
|
220
|
+
else if (builtinConstants.hasOwnProperty(value))
|
221
|
+
return "constant.language";
|
222
|
+
else if (builtinVariables.hasOwnProperty(value))
|
223
|
+
return "variable.language";
|
224
|
+
else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
|
225
|
+
return "support.function";
|
226
|
+
else if (value == "debugger")
|
227
|
+
return "invalid.deprecated";
|
228
|
+
else
|
229
|
+
if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/))
|
230
|
+
return "variable";
|
231
|
+
return "identifier";
|
232
|
+
},
|
233
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
234
|
+
}, {
|
235
|
+
token : "keyword.operator",
|
236
|
+
regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=<|>|&&|\\|\\|"
|
237
|
+
}, {
|
238
|
+
token : "lparen",
|
239
|
+
regex : "[[({]"
|
240
|
+
}, {
|
241
|
+
token : "rparen",
|
242
|
+
regex : "[\\])}]"
|
243
|
+
}, {
|
244
|
+
token : "text",
|
245
|
+
regex : "\\s+"
|
246
|
+
}
|
247
|
+
]
|
248
|
+
};
|
249
|
+
|
250
|
+
xmlUtil.tag(this.$rules, "tag", "start");
|
251
|
+
xmlUtil.tag(this.$rules, "style", "css-start");
|
252
|
+
xmlUtil.tag(this.$rules, "script", "js-start");
|
253
|
+
|
254
|
+
this.embedRules(JavaScriptHighlightRules, "js-", [{
|
255
|
+
token: "comment",
|
256
|
+
regex: "\\/\\/.*(?=<\\/script>)",
|
257
|
+
next: "tag"
|
258
|
+
}, {
|
259
|
+
token: "meta.tag",
|
260
|
+
regex: "<\\/(?=script)",
|
261
|
+
next: "tag"
|
262
|
+
}]);
|
263
|
+
|
264
|
+
this.embedRules(CssHighlightRules, "css-", [{
|
265
|
+
token: "meta.tag",
|
266
|
+
regex: "<\\/(?=style)",
|
267
|
+
next: "tag"
|
268
|
+
}]);
|
269
|
+
|
270
|
+
for (var i in this.$rules) {
|
271
|
+
this.$rules[i].unshift({
|
272
|
+
token: "variable",
|
273
|
+
regex: "\\${",
|
274
|
+
next: "vm_start"
|
275
|
+
});
|
276
|
+
}
|
277
|
+
};
|
278
|
+
|
279
|
+
oop.inherits(VelocityHighlightRules, TextHighlightRules);
|
280
|
+
|
281
|
+
exports.VelocityHighlightRules = VelocityHighlightRules;
|
282
|
+
});
|
283
|
+
|
284
|
+
define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
|
285
|
+
|
286
|
+
|
287
|
+
function string(state) {
|
288
|
+
return [{
|
289
|
+
token : "string",
|
290
|
+
regex : '"',
|
291
|
+
next : state + "_qqstring"
|
292
|
+
}, {
|
293
|
+
token : "string",
|
294
|
+
regex : "'",
|
295
|
+
next : state + "_qstring"
|
296
|
+
}];
|
297
|
+
}
|
298
|
+
|
299
|
+
function multiLineString(quote, state) {
|
300
|
+
return [
|
301
|
+
{token : "string", regex : quote, next : state},
|
302
|
+
{
|
303
|
+
token : "constant.language.escape",
|
304
|
+
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
305
|
+
},
|
306
|
+
{defaultToken : "string"}
|
307
|
+
];
|
308
|
+
}
|
309
|
+
|
310
|
+
exports.tag = function(states, name, nextState, tagMap) {
|
311
|
+
states[name] = [{
|
312
|
+
token : "text",
|
313
|
+
regex : "\\s+"
|
314
|
+
}, {
|
315
|
+
|
316
|
+
token : !tagMap ? "meta.tag.tag-name" : function(value) {
|
317
|
+
if (tagMap[value])
|
318
|
+
return "meta.tag.tag-name." + tagMap[value];
|
319
|
+
else
|
320
|
+
return "meta.tag.tag-name";
|
321
|
+
},
|
322
|
+
regex : "[-_a-zA-Z0-9:]+",
|
323
|
+
next : name + "_embed_attribute_list"
|
324
|
+
}, {
|
325
|
+
token: "empty",
|
326
|
+
regex: "",
|
327
|
+
next : name + "_embed_attribute_list"
|
328
|
+
}];
|
329
|
+
|
330
|
+
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
|
331
|
+
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
|
332
|
+
|
333
|
+
states[name + "_embed_attribute_list"] = [{
|
334
|
+
token : "meta.tag.r",
|
335
|
+
regex : "/?>",
|
336
|
+
next : nextState
|
337
|
+
}, {
|
338
|
+
token : "keyword.operator",
|
339
|
+
regex : "="
|
340
|
+
}, {
|
341
|
+
token : "entity.other.attribute-name",
|
342
|
+
regex : "[-_a-zA-Z0-9:]+"
|
343
|
+
}, {
|
344
|
+
token : "constant.numeric", // float
|
345
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
346
|
+
}, {
|
347
|
+
token : "text",
|
348
|
+
regex : "\\s+"
|
349
|
+
}].concat(string(name));
|
350
|
+
};
|
351
|
+
|
352
|
+
});
|
353
|
+
|
354
|
+
define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
355
|
+
|
356
|
+
|
357
|
+
var oop = require("../lib/oop");
|
358
|
+
var lang = require("../lib/lang");
|
359
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
360
|
+
var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
|
361
|
+
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
|
362
|
+
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
|
363
|
+
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
|
364
|
+
var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
|
365
|
+
|
366
|
+
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
|
367
|
+
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
|
368
|
+
var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
|
369
|
+
|
370
|
+
var CssHighlightRules = function() {
|
371
|
+
|
372
|
+
var keywordMapper = this.createKeywordMapper({
|
373
|
+
"support.function": supportFunction,
|
374
|
+
"support.constant": supportConstant,
|
375
|
+
"support.type": supportType,
|
376
|
+
"support.constant.color": supportConstantColor,
|
377
|
+
"support.constant.fonts": supportConstantFonts
|
378
|
+
}, "text", true);
|
379
|
+
|
380
|
+
var base_ruleset = [
|
381
|
+
{
|
382
|
+
token : "comment", // multi line comment
|
383
|
+
regex : "\\/\\*",
|
384
|
+
next : "ruleset_comment"
|
385
|
+
}, {
|
386
|
+
token : "string", // single line
|
387
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
388
|
+
}, {
|
389
|
+
token : "string", // single line
|
390
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
391
|
+
}, {
|
392
|
+
token : ["constant.numeric", "keyword"],
|
393
|
+
regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
|
394
|
+
}, {
|
395
|
+
token : "constant.numeric",
|
396
|
+
regex : numRe
|
397
|
+
}, {
|
398
|
+
token : "constant.numeric", // hex6 color
|
399
|
+
regex : "#[a-f0-9]{6}"
|
400
|
+
}, {
|
401
|
+
token : "constant.numeric", // hex3 color
|
402
|
+
regex : "#[a-f0-9]{3}"
|
403
|
+
}, {
|
404
|
+
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
|
405
|
+
regex : pseudoElements
|
406
|
+
}, {
|
407
|
+
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
|
408
|
+
regex : pseudoClasses
|
409
|
+
}, {
|
410
|
+
token : ["support.function", "string", "support.function"],
|
411
|
+
regex : "(url\\()(.*)(\\))"
|
412
|
+
}, {
|
413
|
+
token : keywordMapper,
|
414
|
+
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
415
|
+
}, {
|
416
|
+
caseInsensitive: true
|
417
|
+
}
|
418
|
+
];
|
419
|
+
|
420
|
+
var ruleset = lang.copyArray(base_ruleset);
|
421
|
+
ruleset.unshift({
|
422
|
+
token : "paren.rparen",
|
423
|
+
regex : "\\}",
|
424
|
+
next: "start"
|
425
|
+
});
|
426
|
+
|
427
|
+
var media_ruleset = lang.copyArray( base_ruleset );
|
428
|
+
media_ruleset.unshift({
|
429
|
+
token : "paren.rparen",
|
430
|
+
regex : "\\}",
|
431
|
+
next: "media"
|
432
|
+
});
|
433
|
+
|
434
|
+
var base_comment = [{
|
435
|
+
token : "comment", // comment spanning whole line
|
436
|
+
regex : ".+"
|
437
|
+
}];
|
438
|
+
|
439
|
+
var comment = lang.copyArray(base_comment);
|
440
|
+
comment.unshift({
|
441
|
+
token : "comment", // closing comment
|
442
|
+
regex : ".*?\\*\\/",
|
443
|
+
next : "start"
|
444
|
+
});
|
445
|
+
|
446
|
+
var media_comment = lang.copyArray(base_comment);
|
447
|
+
media_comment.unshift({
|
448
|
+
token : "comment", // closing comment
|
449
|
+
regex : ".*?\\*\\/",
|
450
|
+
next : "media"
|
451
|
+
});
|
452
|
+
|
453
|
+
var ruleset_comment = lang.copyArray(base_comment);
|
454
|
+
ruleset_comment.unshift({
|
455
|
+
token : "comment", // closing comment
|
456
|
+
regex : ".*?\\*\\/",
|
457
|
+
next : "ruleset"
|
458
|
+
});
|
459
|
+
|
460
|
+
this.$rules = {
|
461
|
+
"start" : [{
|
462
|
+
token : "comment", // multi line comment
|
463
|
+
regex : "\\/\\*",
|
464
|
+
next : "comment"
|
465
|
+
}, {
|
466
|
+
token: "paren.lparen",
|
467
|
+
regex: "\\{",
|
468
|
+
next: "ruleset"
|
469
|
+
}, {
|
470
|
+
token: "string",
|
471
|
+
regex: "@.*?{",
|
472
|
+
next: "media"
|
473
|
+
},{
|
474
|
+
token: "keyword",
|
475
|
+
regex: "#[a-z0-9-_]+"
|
476
|
+
},{
|
477
|
+
token: "variable",
|
478
|
+
regex: "\\.[a-z0-9-_]+"
|
479
|
+
},{
|
480
|
+
token: "string",
|
481
|
+
regex: ":[a-z0-9-_]+"
|
482
|
+
},{
|
483
|
+
token: "constant",
|
484
|
+
regex: "[a-z0-9-_]+"
|
485
|
+
},{
|
486
|
+
caseInsensitive: true
|
487
|
+
}],
|
488
|
+
|
489
|
+
"media" : [ {
|
490
|
+
token : "comment", // multi line comment
|
491
|
+
regex : "\\/\\*",
|
492
|
+
next : "media_comment"
|
493
|
+
}, {
|
494
|
+
token: "paren.lparen",
|
495
|
+
regex: "\\{",
|
496
|
+
next: "media_ruleset"
|
497
|
+
},{
|
498
|
+
token: "string",
|
499
|
+
regex: "\\}",
|
500
|
+
next: "start"
|
501
|
+
},{
|
502
|
+
token: "keyword",
|
503
|
+
regex: "#[a-z0-9-_]+"
|
504
|
+
},{
|
505
|
+
token: "variable",
|
506
|
+
regex: "\\.[a-z0-9-_]+"
|
507
|
+
},{
|
508
|
+
token: "string",
|
509
|
+
regex: ":[a-z0-9-_]+"
|
510
|
+
},{
|
511
|
+
token: "constant",
|
512
|
+
regex: "[a-z0-9-_]+"
|
513
|
+
},{
|
514
|
+
caseInsensitive: true
|
515
|
+
}],
|
516
|
+
|
517
|
+
"comment" : comment,
|
518
|
+
|
519
|
+
"ruleset" : ruleset,
|
520
|
+
"ruleset_comment" : ruleset_comment,
|
521
|
+
|
522
|
+
"media_ruleset" : media_ruleset,
|
523
|
+
"media_comment" : media_comment
|
524
|
+
};
|
525
|
+
};
|
526
|
+
|
527
|
+
oop.inherits(CssHighlightRules, TextHighlightRules);
|
528
|
+
|
529
|
+
exports.CssHighlightRules = CssHighlightRules;
|
530
|
+
|
531
|
+
});
|
532
|
+
|
533
|
+
define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
534
|
+
|
535
|
+
|
536
|
+
var oop = require("../lib/oop");
|
537
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
538
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
539
|
+
|
540
|
+
var JavaScriptHighlightRules = function() {
|
541
|
+
var keywordMapper = this.createKeywordMapper({
|
542
|
+
"variable.language":
|
543
|
+
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
|
544
|
+
"Namespace|QName|XML|XMLList|" + // E4X
|
545
|
+
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
546
|
+
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
547
|
+
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
|
548
|
+
"SyntaxError|TypeError|URIError|" +
|
549
|
+
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
|
550
|
+
"isNaN|parseFloat|parseInt|" +
|
551
|
+
"JSON|Math|" + // Other
|
552
|
+
"this|arguments|prototype|window|document" , // Pseudo
|
553
|
+
"keyword":
|
554
|
+
"const|yield|import|get|set|" +
|
555
|
+
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
556
|
+
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
557
|
+
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
558
|
+
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
|
559
|
+
"storage.type":
|
560
|
+
"const|let|var|function",
|
561
|
+
"constant.language":
|
562
|
+
"null|Infinity|NaN|undefined",
|
563
|
+
"support.function":
|
564
|
+
"alert",
|
565
|
+
"constant.language.boolean": "true|false"
|
566
|
+
}, "identifier");
|
567
|
+
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
|
568
|
+
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
|
569
|
+
|
570
|
+
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
571
|
+
"u[0-9a-fA-F]{4}|" + // unicode
|
572
|
+
"[0-2][0-7]{0,2}|" + // oct
|
573
|
+
"3[0-6][0-7]?|" + // oct
|
574
|
+
"37[0-7]?|" + // oct
|
575
|
+
"[4-7][0-7]?|" + //oct
|
576
|
+
".)";
|
577
|
+
|
578
|
+
this.$rules = {
|
579
|
+
"no_regex" : [
|
580
|
+
{
|
581
|
+
token : "comment",
|
582
|
+
regex : /\/\/.*$/
|
583
|
+
},
|
584
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
585
|
+
{
|
586
|
+
token : "comment", // multi line comment
|
587
|
+
regex : /\/\*/,
|
588
|
+
next : "comment"
|
589
|
+
}, {
|
590
|
+
token : "string",
|
591
|
+
regex : "'(?=.)",
|
592
|
+
next : "qstring"
|
593
|
+
}, {
|
594
|
+
token : "string",
|
595
|
+
regex : '"(?=.)',
|
596
|
+
next : "qqstring"
|
597
|
+
}, {
|
598
|
+
token : "constant.numeric", // hex
|
599
|
+
regex : /0[xX][0-9a-fA-F]+\b/
|
600
|
+
}, {
|
601
|
+
token : "constant.numeric", // float
|
602
|
+
regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
603
|
+
}, {
|
604
|
+
token : [
|
605
|
+
"storage.type", "punctuation.operator", "support.function",
|
606
|
+
"punctuation.operator", "entity.name.function", "text","keyword.operator"
|
607
|
+
],
|
608
|
+
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
|
609
|
+
next: "function_arguments"
|
610
|
+
}, {
|
611
|
+
token : [
|
612
|
+
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
613
|
+
"keyword.operator", "text", "storage.type", "text", "paren.lparen"
|
614
|
+
],
|
615
|
+
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
616
|
+
next: "function_arguments"
|
617
|
+
}, {
|
618
|
+
token : [
|
619
|
+
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
|
620
|
+
"text", "paren.lparen"
|
621
|
+
],
|
622
|
+
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
623
|
+
next: "function_arguments"
|
624
|
+
}, {
|
625
|
+
token : [
|
626
|
+
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
627
|
+
"keyword.operator", "text",
|
628
|
+
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
629
|
+
],
|
630
|
+
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
|
631
|
+
next: "function_arguments"
|
632
|
+
}, {
|
633
|
+
token : [
|
634
|
+
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
635
|
+
],
|
636
|
+
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
|
637
|
+
next: "function_arguments"
|
638
|
+
}, {
|
639
|
+
token : [
|
640
|
+
"entity.name.function", "text", "punctuation.operator",
|
641
|
+
"text", "storage.type", "text", "paren.lparen"
|
642
|
+
],
|
643
|
+
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
|
644
|
+
next: "function_arguments"
|
645
|
+
}, {
|
646
|
+
token : [
|
647
|
+
"text", "text", "storage.type", "text", "paren.lparen"
|
648
|
+
],
|
649
|
+
regex : "(:)(\\s*)(function)(\\s*)(\\()",
|
650
|
+
next: "function_arguments"
|
651
|
+
}, {
|
652
|
+
token : "keyword",
|
653
|
+
regex : "(?:" + kwBeforeRe + ")\\b",
|
654
|
+
next : "start"
|
655
|
+
}, {
|
656
|
+
token : ["punctuation.operator", "support.function"],
|
657
|
+
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
|
658
|
+
}, {
|
659
|
+
token : ["punctuation.operator", "support.function.dom"],
|
660
|
+
regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
|
661
|
+
}, {
|
662
|
+
token : ["punctuation.operator", "support.constant"],
|
663
|
+
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
|
664
|
+
}, {
|
665
|
+
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
|
666
|
+
regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
|
667
|
+
}, {
|
668
|
+
token : keywordMapper,
|
669
|
+
regex : identifierRe
|
670
|
+
}, {
|
671
|
+
token : "keyword.operator",
|
672
|
+
regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
|
673
|
+
next : "start"
|
674
|
+
}, {
|
675
|
+
token : "punctuation.operator",
|
676
|
+
regex : /\?|\:|\,|\;|\./,
|
677
|
+
next : "start"
|
678
|
+
}, {
|
679
|
+
token : "paren.lparen",
|
680
|
+
regex : /[\[({]/,
|
681
|
+
next : "start"
|
682
|
+
}, {
|
683
|
+
token : "paren.rparen",
|
684
|
+
regex : /[\])}]/
|
685
|
+
}, {
|
686
|
+
token : "keyword.operator",
|
687
|
+
regex : /\/=?/,
|
688
|
+
next : "start"
|
689
|
+
}, {
|
690
|
+
token: "comment",
|
691
|
+
regex: /^#!.*$/
|
692
|
+
}
|
693
|
+
],
|
694
|
+
"start": [
|
695
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
696
|
+
{
|
697
|
+
token : "comment", // multi line comment
|
698
|
+
regex : "\\/\\*",
|
699
|
+
next : "comment_regex_allowed"
|
700
|
+
}, {
|
701
|
+
token : "comment",
|
702
|
+
regex : "\\/\\/.*$",
|
703
|
+
next : "start"
|
704
|
+
}, {
|
705
|
+
token: "string.regexp",
|
706
|
+
regex: "\\/",
|
707
|
+
next: "regex"
|
708
|
+
}, {
|
709
|
+
token : "text",
|
710
|
+
regex : "\\s+|^$",
|
711
|
+
next : "start"
|
712
|
+
}, {
|
713
|
+
token: "empty",
|
714
|
+
regex: "",
|
715
|
+
next: "no_regex"
|
716
|
+
}
|
717
|
+
],
|
718
|
+
"regex": [
|
719
|
+
{
|
720
|
+
token: "regexp.keyword.operator",
|
721
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
722
|
+
}, {
|
723
|
+
token: "string.regexp",
|
724
|
+
regex: "/\\w*",
|
725
|
+
next: "no_regex"
|
726
|
+
}, {
|
727
|
+
token : "invalid",
|
728
|
+
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
729
|
+
}, {
|
730
|
+
token : "constant.language.escape",
|
731
|
+
regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
|
732
|
+
}, {
|
733
|
+
token : "constant.language.delimiter",
|
734
|
+
regex: /\|/
|
735
|
+
}, {
|
736
|
+
token: "constant.language.escape",
|
737
|
+
regex: /\[\^?/,
|
738
|
+
next: "regex_character_class"
|
739
|
+
}, {
|
740
|
+
token: "empty",
|
741
|
+
regex: "$",
|
742
|
+
next: "no_regex"
|
743
|
+
}, {
|
744
|
+
defaultToken: "string.regexp"
|
745
|
+
}
|
746
|
+
],
|
747
|
+
"regex_character_class": [
|
748
|
+
{
|
749
|
+
token: "regexp.keyword.operator",
|
750
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
751
|
+
}, {
|
752
|
+
token: "constant.language.escape",
|
753
|
+
regex: "]",
|
754
|
+
next: "regex"
|
755
|
+
}, {
|
756
|
+
token: "constant.language.escape",
|
757
|
+
regex: "-"
|
758
|
+
}, {
|
759
|
+
token: "empty",
|
760
|
+
regex: "$",
|
761
|
+
next: "no_regex"
|
762
|
+
}, {
|
763
|
+
defaultToken: "string.regexp.charachterclass"
|
764
|
+
}
|
765
|
+
],
|
766
|
+
"function_arguments": [
|
767
|
+
{
|
768
|
+
token: "variable.parameter",
|
769
|
+
regex: identifierRe
|
770
|
+
}, {
|
771
|
+
token: "punctuation.operator",
|
772
|
+
regex: "[, ]+"
|
773
|
+
}, {
|
774
|
+
token: "punctuation.operator",
|
775
|
+
regex: "$"
|
776
|
+
}, {
|
777
|
+
token: "empty",
|
778
|
+
regex: "",
|
779
|
+
next: "no_regex"
|
780
|
+
}
|
781
|
+
],
|
782
|
+
"comment_regex_allowed" : [
|
783
|
+
{token : "comment", regex : "\\*\\/", next : "start"},
|
784
|
+
{defaultToken : "comment"}
|
785
|
+
],
|
786
|
+
"comment" : [
|
787
|
+
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
788
|
+
{defaultToken : "comment"}
|
789
|
+
],
|
790
|
+
"qqstring" : [
|
791
|
+
{
|
792
|
+
token : "constant.language.escape",
|
793
|
+
regex : escapedRe
|
794
|
+
}, {
|
795
|
+
token : "string",
|
796
|
+
regex : "\\\\$",
|
797
|
+
next : "qqstring"
|
798
|
+
}, {
|
799
|
+
token : "string",
|
800
|
+
regex : '"|$',
|
801
|
+
next : "no_regex"
|
802
|
+
}, {
|
803
|
+
defaultToken: "string"
|
804
|
+
}
|
805
|
+
],
|
806
|
+
"qstring" : [
|
807
|
+
{
|
808
|
+
token : "constant.language.escape",
|
809
|
+
regex : escapedRe
|
810
|
+
}, {
|
811
|
+
token : "string",
|
812
|
+
regex : "\\\\$",
|
813
|
+
next : "qstring"
|
814
|
+
}, {
|
815
|
+
token : "string",
|
816
|
+
regex : "'|$",
|
817
|
+
next : "no_regex"
|
818
|
+
}, {
|
819
|
+
defaultToken: "string"
|
820
|
+
}
|
821
|
+
]
|
822
|
+
};
|
823
|
+
|
824
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
825
|
+
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
|
826
|
+
};
|
827
|
+
|
828
|
+
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
829
|
+
|
830
|
+
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
831
|
+
});
|
832
|
+
|
833
|
+
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
834
|
+
|
835
|
+
|
836
|
+
var oop = require("../lib/oop");
|
837
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
838
|
+
|
839
|
+
var DocCommentHighlightRules = function() {
|
840
|
+
|
841
|
+
this.$rules = {
|
842
|
+
"start" : [ {
|
843
|
+
token : "comment.doc.tag",
|
844
|
+
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
845
|
+
}, {
|
846
|
+
token : "comment.doc.tag",
|
847
|
+
regex : "\\bTODO\\b"
|
848
|
+
}, {
|
849
|
+
defaultToken : "comment.doc"
|
850
|
+
}]
|
851
|
+
};
|
852
|
+
};
|
853
|
+
|
854
|
+
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
855
|
+
|
856
|
+
DocCommentHighlightRules.getStartRule = function(start) {
|
857
|
+
return {
|
858
|
+
token : "comment.doc", // doc comment
|
859
|
+
regex : "\\/\\*(?=\\*)",
|
860
|
+
next : start
|
861
|
+
};
|
862
|
+
};
|
863
|
+
|
864
|
+
DocCommentHighlightRules.getEndRule = function (start) {
|
865
|
+
return {
|
866
|
+
token : "comment.doc", // closing comment
|
867
|
+
regex : "\\*\\/",
|
868
|
+
next : start
|
869
|
+
};
|
870
|
+
};
|
871
|
+
|
872
|
+
|
873
|
+
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
874
|
+
|
875
|
+
});
|
876
|
+
|
877
|
+
define('ace/mode/folding/velocity', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
|
878
|
+
|
879
|
+
|
880
|
+
var oop = require("../../lib/oop");
|
881
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
882
|
+
var Range = require("../../range").Range;
|
883
|
+
|
884
|
+
var FoldMode = exports.FoldMode = function() {};
|
885
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
886
|
+
|
887
|
+
(function() {
|
888
|
+
|
889
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
890
|
+
var range = this.indentationBlock(session, row);
|
891
|
+
if (range)
|
892
|
+
return range;
|
893
|
+
|
894
|
+
var re = /\S/;
|
895
|
+
var line = session.getLine(row);
|
896
|
+
var startLevel = line.search(re);
|
897
|
+
if (startLevel == -1 || line[startLevel] != "##")
|
898
|
+
return;
|
899
|
+
|
900
|
+
var startColumn = line.length;
|
901
|
+
var maxRow = session.getLength();
|
902
|
+
var startRow = row;
|
903
|
+
var endRow = row;
|
904
|
+
|
905
|
+
while (++row < maxRow) {
|
906
|
+
line = session.getLine(row);
|
907
|
+
var level = line.search(re);
|
908
|
+
|
909
|
+
if (level == -1)
|
910
|
+
continue;
|
911
|
+
|
912
|
+
if (line[level] != "##")
|
913
|
+
break;
|
914
|
+
|
915
|
+
endRow = row;
|
916
|
+
}
|
917
|
+
|
918
|
+
if (endRow > startRow) {
|
919
|
+
var endColumn = session.getLine(endRow).length;
|
920
|
+
return new Range(startRow, startColumn, endRow, endColumn);
|
921
|
+
}
|
922
|
+
};
|
923
|
+
this.getFoldWidget = function(session, foldStyle, row) {
|
924
|
+
var line = session.getLine(row);
|
925
|
+
var indent = line.search(/\S/);
|
926
|
+
var next = session.getLine(row + 1);
|
927
|
+
var prev = session.getLine(row - 1);
|
928
|
+
var prevIndent = prev.search(/\S/);
|
929
|
+
var nextIndent = next.search(/\S/);
|
930
|
+
|
931
|
+
if (indent == -1) {
|
932
|
+
session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
|
933
|
+
return "";
|
934
|
+
}
|
935
|
+
if (prevIndent == -1) {
|
936
|
+
if (indent == nextIndent && line[indent] == "##" && next[indent] == "##") {
|
937
|
+
session.foldWidgets[row - 1] = "";
|
938
|
+
session.foldWidgets[row + 1] = "";
|
939
|
+
return "start";
|
940
|
+
}
|
941
|
+
} else if (prevIndent == indent && line[indent] == "##" && prev[indent] == "##") {
|
942
|
+
if (session.getLine(row - 2).search(/\S/) == -1) {
|
943
|
+
session.foldWidgets[row - 1] = "start";
|
944
|
+
session.foldWidgets[row + 1] = "";
|
945
|
+
return "";
|
946
|
+
}
|
947
|
+
}
|
948
|
+
|
949
|
+
if (prevIndent!= -1 && prevIndent < indent)
|
950
|
+
session.foldWidgets[row - 1] = "start";
|
951
|
+
else
|
952
|
+
session.foldWidgets[row - 1] = "";
|
953
|
+
|
954
|
+
if (indent < nextIndent)
|
955
|
+
return "start";
|
956
|
+
else
|
957
|
+
return "";
|
958
|
+
};
|
959
|
+
|
960
|
+
}).call(FoldMode.prototype);
|
961
|
+
|
962
|
+
});
|