datagram 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. data/.env.sample +7 -0
  2. data/.gitignore +20 -0
  3. data/.rbenv-version +1 -0
  4. data/Gemfile +12 -0
  5. data/LICENSE.txt +22 -0
  6. data/Procfile +1 -0
  7. data/README.md +29 -0
  8. data/Rakefile +1 -0
  9. data/config.ru +5 -0
  10. data/datagram.gemspec +23 -0
  11. data/db/migrate/1_create_queries.rb +9 -0
  12. data/db/migrate/2_add_name_to_queries.rb +5 -0
  13. data/lib/datagram/version.rb +3 -0
  14. data/lib/datagram.rb +135 -0
  15. data/lib/views/application.coffee +222 -0
  16. data/lib/views/index.haml +47 -0
  17. data/lib/views/layout.haml +17 -0
  18. data/lib/views/style.sass +179 -0
  19. data/public/ace/ace.js +15209 -0
  20. data/public/ace/ext-elastic_tabstops_lite.js +301 -0
  21. data/public/ace/ext-emmet.js +253 -0
  22. data/public/ace/ext-searchbox.js +441 -0
  23. data/public/ace/ext-spellcheck.js +67 -0
  24. data/public/ace/ext-static_highlight.js +96 -0
  25. data/public/ace/ext-textarea.js +492 -0
  26. data/public/ace/ext-whitespace.js +204 -0
  27. data/public/ace/keybinding-emacs.js +962 -0
  28. data/public/ace/keybinding-vim.js +1704 -0
  29. data/public/ace/mode-abap.js +260 -0
  30. data/public/ace/mode-asciidoc.js +372 -0
  31. data/public/ace/mode-c9search.js +182 -0
  32. data/public/ace/mode-c_cpp.js +737 -0
  33. data/public/ace/mode-clojure.js +299 -0
  34. data/public/ace/mode-coffee.js +426 -0
  35. data/public/ace/mode-coldfusion.js +1753 -0
  36. data/public/ace/mode-csharp.js +612 -0
  37. data/public/ace/mode-css.js +773 -0
  38. data/public/ace/mode-curly.js +1950 -0
  39. data/public/ace/mode-dart.js +945 -0
  40. data/public/ace/mode-diff.js +166 -0
  41. data/public/ace/mode-django.js +1969 -0
  42. data/public/ace/mode-dot.js +320 -0
  43. data/public/ace/mode-ftl.js +907 -0
  44. data/public/ace/mode-glsl.js +810 -0
  45. data/public/ace/mode-golang.js +632 -0
  46. data/public/ace/mode-groovy.js +1037 -0
  47. data/public/ace/mode-haml.js +487 -0
  48. data/public/ace/mode-haxe.js +609 -0
  49. data/public/ace/mode-html.js +1881 -0
  50. data/public/ace/mode-jade.js +1951 -0
  51. data/public/ace/mode-java.js +996 -0
  52. data/public/ace/mode-javascript.js +876 -0
  53. data/public/ace/mode-json.js +578 -0
  54. data/public/ace/mode-jsp.js +1351 -0
  55. data/public/ace/mode-jsx.js +635 -0
  56. data/public/ace/mode-latex.js +189 -0
  57. data/public/ace/mode-less.js +807 -0
  58. data/public/ace/mode-liquid.js +862 -0
  59. data/public/ace/mode-lisp.js +138 -0
  60. data/public/ace/mode-livescript.js +288 -0
  61. data/public/ace/mode-logiql.js +664 -0
  62. data/public/ace/mode-lsl.js +828 -0
  63. data/public/ace/mode-lua.js +455 -0
  64. data/public/ace/mode-luapage.js +2340 -0
  65. data/public/ace/mode-lucene.js +64 -0
  66. data/public/ace/mode-makefile.js +313 -0
  67. data/public/ace/mode-markdown.js +2280 -0
  68. data/public/ace/mode-mushcode.js +704 -0
  69. data/public/ace/mode-mushcode_high_rules.js +569 -0
  70. data/public/ace/mode-objectivec.js +659 -0
  71. data/public/ace/mode-ocaml.js +443 -0
  72. data/public/ace/mode-pascal.js +233 -0
  73. data/public/ace/mode-perl.js +316 -0
  74. data/public/ace/mode-pgsql.js +908 -0
  75. data/public/ace/mode-php.js +2291 -0
  76. data/public/ace/mode-powershell.js +618 -0
  77. data/public/ace/mode-python.js +264 -0
  78. data/public/ace/mode-r.js +404 -0
  79. data/public/ace/mode-rdoc.js +184 -0
  80. data/public/ace/mode-rhtml.js +2168 -0
  81. data/public/ace/mode-ruby.js +431 -0
  82. data/public/ace/mode-sass.js +442 -0
  83. data/public/ace/mode-scad.js +670 -0
  84. data/public/ace/mode-scala.js +1025 -0
  85. data/public/ace/mode-scheme.js +144 -0
  86. data/public/ace/mode-scss.js +832 -0
  87. data/public/ace/mode-sh.js +204 -0
  88. data/public/ace/mode-sql.js +118 -0
  89. data/public/ace/mode-stylus.js +483 -0
  90. data/public/ace/mode-svg.js +1442 -0
  91. data/public/ace/mode-tcl.js +319 -0
  92. data/public/ace/mode-tex.js +166 -0
  93. data/public/ace/mode-text.js +0 -0
  94. data/public/ace/mode-textile.js +170 -0
  95. data/public/ace/mode-tmsnippet.js +200 -0
  96. data/public/ace/mode-toml.js +180 -0
  97. data/public/ace/mode-typescript.js +961 -0
  98. data/public/ace/mode-vbscript.js +281 -0
  99. data/public/ace/mode-velocity.js +962 -0
  100. data/public/ace/mode-xml.js +789 -0
  101. data/public/ace/mode-xquery.js +2750 -0
  102. data/public/ace/mode-yaml.js +289 -0
  103. data/public/ace/theme-ambiance.js +202 -0
  104. data/public/ace/theme-chaos.js +182 -0
  105. data/public/ace/theme-chrome.js +161 -0
  106. data/public/ace/theme-clouds.js +135 -0
  107. data/public/ace/theme-clouds_midnight.js +136 -0
  108. data/public/ace/theme-cobalt.js +150 -0
  109. data/public/ace/theme-crimson_editor.js +154 -0
  110. data/public/ace/theme-dawn.js +146 -0
  111. data/public/ace/theme-dreamweaver.js +173 -0
  112. data/public/ace/theme-eclipse.js +122 -0
  113. data/public/ace/theme-github.js +136 -0
  114. data/public/ace/theme-idle_fingers.js +136 -0
  115. data/public/ace/theme-kr.js +143 -0
  116. data/public/ace/theme-merbivore.js +135 -0
  117. data/public/ace/theme-merbivore_soft.js +136 -0
  118. data/public/ace/theme-mono_industrial.js +148 -0
  119. data/public/ace/theme-monokai.js +140 -0
  120. data/public/ace/theme-pastel_on_dark.js +148 -0
  121. data/public/ace/theme-solarized_dark.js +128 -0
  122. data/public/ace/theme-solarized_light.js +131 -0
  123. data/public/ace/theme-terminal.js +154 -0
  124. data/public/ace/theme-textmate.js +0 -0
  125. data/public/ace/theme-tomorrow.js +147 -0
  126. data/public/ace/theme-tomorrow_night.js +147 -0
  127. data/public/ace/theme-tomorrow_night_blue.js +145 -0
  128. data/public/ace/theme-tomorrow_night_bright.js +147 -0
  129. data/public/ace/theme-tomorrow_night_eighties.js +144 -0
  130. data/public/ace/theme-twilight.js +147 -0
  131. data/public/ace/theme-vibrant_ink.js +131 -0
  132. data/public/ace/theme-xcode.js +125 -0
  133. data/public/ace/worker-coffee.js +7091 -0
  134. data/public/ace/worker-css.js +8289 -0
  135. data/public/ace/worker-javascript.js +6496 -0
  136. data/public/ace/worker-json.js +2305 -0
  137. data/public/ace/worker-lua.js +3313 -0
  138. data/public/ace/worker-php.js +6743 -0
  139. data/public/ace/worker-xquery.js +21897 -0
  140. data/public/font/FontAwesome.otf +0 -0
  141. data/public/font/fontawesome-webfont.eot +0 -0
  142. data/public/font/fontawesome-webfont.svg +284 -0
  143. data/public/font/fontawesome-webfont.ttf +0 -0
  144. data/public/font/fontawesome-webfont.woff +0 -0
  145. data/public/font-awesome.css +540 -0
  146. data/public/jquery.js +9597 -0
  147. data/script/migrate.sh +2 -0
  148. metadata +242 -0
@@ -0,0 +1,945 @@
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/dart', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/dart_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
37
+
38
+
39
+ var oop = require("../lib/oop");
40
+ var CMode = require("./c_cpp").Mode;
41
+ var Tokenizer = require("../tokenizer").Tokenizer;
42
+ var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules;
43
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
44
+
45
+ var Mode = function() {
46
+ CMode.call(this);
47
+ var highlighter = new DartHighlightRules();
48
+ this.foldingRules = new CStyleFoldMode();
49
+
50
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
51
+ };
52
+ oop.inherits(Mode, CMode);
53
+
54
+ (function() {
55
+ this.lineCommentStart = "//";
56
+ this.blockComment = {start: "/*", end: "*/"};
57
+ }).call(Mode.prototype);
58
+
59
+ exports.Mode = Mode;
60
+ });
61
+
62
+ define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
63
+
64
+
65
+ var oop = require("../lib/oop");
66
+ var TextMode = require("./text").Mode;
67
+ var Tokenizer = require("../tokenizer").Tokenizer;
68
+ var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
69
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
70
+ var Range = require("../range").Range;
71
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
72
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
73
+
74
+ var Mode = function() {
75
+ this.$tokenizer = new Tokenizer(new c_cppHighlightRules().getRules());
76
+ this.$outdent = new MatchingBraceOutdent();
77
+ this.$behaviour = new CstyleBehaviour();
78
+ this.foldingRules = new CStyleFoldMode();
79
+ };
80
+ oop.inherits(Mode, TextMode);
81
+
82
+ (function() {
83
+
84
+ this.lineCommentStart = "//";
85
+ this.blockComment = {start: "/*", end: "*/"};
86
+
87
+ this.getNextLineIndent = function(state, line, tab) {
88
+ var indent = this.$getIndent(line);
89
+
90
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
91
+ var tokens = tokenizedLine.tokens;
92
+ var endState = tokenizedLine.state;
93
+
94
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
95
+ return indent;
96
+ }
97
+
98
+ if (state == "start") {
99
+ var match = line.match(/^.*[\{\(\[]\s*$/);
100
+ if (match) {
101
+ indent += tab;
102
+ }
103
+ } else if (state == "doc-start") {
104
+ if (endState == "start") {
105
+ return "";
106
+ }
107
+ var match = line.match(/^\s*(\/?)\*/);
108
+ if (match) {
109
+ if (match[1]) {
110
+ indent += " ";
111
+ }
112
+ indent += "* ";
113
+ }
114
+ }
115
+
116
+ return indent;
117
+ };
118
+
119
+ this.checkOutdent = function(state, line, input) {
120
+ return this.$outdent.checkOutdent(line, input);
121
+ };
122
+
123
+ this.autoOutdent = function(state, doc, row) {
124
+ this.$outdent.autoOutdent(doc, row);
125
+ };
126
+
127
+ }).call(Mode.prototype);
128
+
129
+ exports.Mode = Mode;
130
+ });
131
+ define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
132
+
133
+
134
+ var oop = require("../lib/oop");
135
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
136
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
137
+ var cFunctions = exports.cFunctions = "\\s*\\bhypot(?: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"
138
+
139
+ var c_cppHighlightRules = function() {
140
+
141
+ var keywordControls = (
142
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
143
+ "return|switch|while|catch|operator|try|throw|using"
144
+ );
145
+
146
+ var storageType = (
147
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
148
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
149
+ "class|wchar_t|template"
150
+ );
151
+
152
+ var storageModifiers = (
153
+ "const|extern|register|restrict|static|volatile|inline|private:|" +
154
+ "protected:|public:|friend|explicit|virtual|export|mutable|typename"
155
+ );
156
+
157
+ var keywordOperators = (
158
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
159
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
160
+ );
161
+
162
+ var builtinConstants = (
163
+ "NULL|true|false|TRUE|FALSE"
164
+ );
165
+
166
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
167
+ "keyword.control" : keywordControls,
168
+ "storage.type" : storageType,
169
+ "storage.modifier" : storageModifiers,
170
+ "keyword.operator" : keywordOperators,
171
+ "variable.language": "this",
172
+ "constant.language": builtinConstants
173
+ }, "identifier");
174
+
175
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
176
+
177
+ this.$rules = {
178
+ "start" : [
179
+ {
180
+ token : "comment",
181
+ regex : "\\/\\/.*$"
182
+ },
183
+ DocCommentHighlightRules.getStartRule("doc-start"),
184
+ {
185
+ token : "comment", // multi line comment
186
+ regex : "\\/\\*",
187
+ next : "comment"
188
+ }, {
189
+ token : "string", // single line
190
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
191
+ }, {
192
+ token : "string", // multi line string start
193
+ regex : '["].*\\\\$',
194
+ next : "qqstring"
195
+ }, {
196
+ token : "string", // single line
197
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
198
+ }, {
199
+ token : "string", // multi line string start
200
+ regex : "['].*\\\\$",
201
+ next : "qstring"
202
+ }, {
203
+ token : "constant.numeric", // hex
204
+ regex : "0[xX][0-9a-fA-F]+\\b"
205
+ }, {
206
+ token : "constant.numeric", // float
207
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
208
+ }, {
209
+ token : "keyword", // pre-compiler directives
210
+ regex : "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b",
211
+ next : "directive"
212
+ }, {
213
+ token : "keyword", // special case pre-compiler directive
214
+ regex : "(?:#endif)\\b"
215
+ }, {
216
+ token : "support.function.C99.c",
217
+ regex : cFunctions
218
+ }, {
219
+ token : keywordMapper,
220
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
221
+ }, {
222
+ token : "keyword.operator",
223
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
224
+ }, {
225
+ token : "punctuation.operator",
226
+ regex : "\\?|\\:|\\,|\\;|\\."
227
+ }, {
228
+ token : "paren.lparen",
229
+ regex : "[[({]"
230
+ }, {
231
+ token : "paren.rparen",
232
+ regex : "[\\])}]"
233
+ }, {
234
+ token : "text",
235
+ regex : "\\s+"
236
+ }
237
+ ],
238
+ "comment" : [
239
+ {
240
+ token : "comment", // closing comment
241
+ regex : ".*?\\*\\/",
242
+ next : "start"
243
+ }, {
244
+ token : "comment", // comment spanning whole line
245
+ regex : ".+"
246
+ }
247
+ ],
248
+ "qqstring" : [
249
+ {
250
+ token : "string",
251
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
252
+ next : "start"
253
+ }, {
254
+ token : "string",
255
+ regex : '.+'
256
+ }
257
+ ],
258
+ "qstring" : [
259
+ {
260
+ token : "string",
261
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
262
+ next : "start"
263
+ }, {
264
+ token : "string",
265
+ regex : '.+'
266
+ }
267
+ ],
268
+ "directive" : [
269
+ {
270
+ token : "constant.other.multiline",
271
+ regex : /\\/
272
+ },
273
+ {
274
+ token : "constant.other.multiline",
275
+ regex : /.*\\/
276
+ },
277
+ {
278
+ token : "constant.other",
279
+ regex : "\\s*<.+?>",
280
+ next : "start"
281
+ },
282
+ {
283
+ token : "constant.other", // single line
284
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
285
+ next : "start"
286
+ },
287
+ {
288
+ token : "constant.other", // single line
289
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
290
+ next : "start"
291
+ },
292
+ {
293
+ token : "constant.other",
294
+ regex : /[^\\\/]+/,
295
+ next : "start"
296
+ }
297
+ ]
298
+ };
299
+
300
+ this.embedRules(DocCommentHighlightRules, "doc-",
301
+ [ DocCommentHighlightRules.getEndRule("start") ]);
302
+ };
303
+
304
+ oop.inherits(c_cppHighlightRules, TextHighlightRules);
305
+
306
+ exports.c_cppHighlightRules = c_cppHighlightRules;
307
+ });
308
+
309
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
310
+
311
+
312
+ var oop = require("../lib/oop");
313
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
314
+
315
+ var DocCommentHighlightRules = function() {
316
+
317
+ this.$rules = {
318
+ "start" : [ {
319
+ token : "comment.doc.tag",
320
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
321
+ }, {
322
+ token : "comment.doc.tag",
323
+ regex : "\\bTODO\\b"
324
+ }, {
325
+ defaultToken : "comment.doc"
326
+ }]
327
+ };
328
+ };
329
+
330
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
331
+
332
+ DocCommentHighlightRules.getStartRule = function(start) {
333
+ return {
334
+ token : "comment.doc", // doc comment
335
+ regex : "\\/\\*(?=\\*)",
336
+ next : start
337
+ };
338
+ };
339
+
340
+ DocCommentHighlightRules.getEndRule = function (start) {
341
+ return {
342
+ token : "comment.doc", // closing comment
343
+ regex : "\\*\\/",
344
+ next : start
345
+ };
346
+ };
347
+
348
+
349
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
350
+
351
+ });
352
+
353
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
354
+
355
+
356
+ var Range = require("../range").Range;
357
+
358
+ var MatchingBraceOutdent = function() {};
359
+
360
+ (function() {
361
+
362
+ this.checkOutdent = function(line, input) {
363
+ if (! /^\s+$/.test(line))
364
+ return false;
365
+
366
+ return /^\s*\}/.test(input);
367
+ };
368
+
369
+ this.autoOutdent = function(doc, row) {
370
+ var line = doc.getLine(row);
371
+ var match = line.match(/^(\s*\})/);
372
+
373
+ if (!match) return 0;
374
+
375
+ var column = match[1].length;
376
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
377
+
378
+ if (!openBracePos || openBracePos.row == row) return 0;
379
+
380
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
381
+ doc.replace(new Range(row, 0, row, column-1), indent);
382
+ };
383
+
384
+ this.$getIndent = function(line) {
385
+ return line.match(/^\s*/)[0];
386
+ };
387
+
388
+ }).call(MatchingBraceOutdent.prototype);
389
+
390
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
391
+ });
392
+
393
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
394
+
395
+
396
+ var oop = require("../../lib/oop");
397
+ var Behaviour = require("../behaviour").Behaviour;
398
+ var TokenIterator = require("../../token_iterator").TokenIterator;
399
+ var lang = require("../../lib/lang");
400
+
401
+ var SAFE_INSERT_IN_TOKENS =
402
+ ["text", "paren.rparen", "punctuation.operator"];
403
+ var SAFE_INSERT_BEFORE_TOKENS =
404
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
405
+
406
+
407
+ var autoInsertedBrackets = 0;
408
+ var autoInsertedRow = -1;
409
+ var autoInsertedLineEnd = "";
410
+ var maybeInsertedBrackets = 0;
411
+ var maybeInsertedRow = -1;
412
+ var maybeInsertedLineStart = "";
413
+ var maybeInsertedLineEnd = "";
414
+
415
+ var CstyleBehaviour = function () {
416
+
417
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
418
+ var cursor = editor.getCursorPosition();
419
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
420
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
421
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
422
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
423
+ return false;
424
+ }
425
+ iterator.stepForward();
426
+ return iterator.getCurrentTokenRow() !== cursor.row ||
427
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
428
+ };
429
+
430
+ CstyleBehaviour.$matchTokenType = function(token, types) {
431
+ return types.indexOf(token.type || token) > -1;
432
+ };
433
+
434
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
435
+ var cursor = editor.getCursorPosition();
436
+ var line = session.doc.getLine(cursor.row);
437
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
438
+ autoInsertedBrackets = 0;
439
+ autoInsertedRow = cursor.row;
440
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
441
+ autoInsertedBrackets++;
442
+ };
443
+
444
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
445
+ var cursor = editor.getCursorPosition();
446
+ var line = session.doc.getLine(cursor.row);
447
+ if (!this.isMaybeInsertedClosing(cursor, line))
448
+ maybeInsertedBrackets = 0;
449
+ maybeInsertedRow = cursor.row;
450
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
451
+ maybeInsertedLineEnd = line.substr(cursor.column);
452
+ maybeInsertedBrackets++;
453
+ };
454
+
455
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
456
+ return autoInsertedBrackets > 0 &&
457
+ cursor.row === autoInsertedRow &&
458
+ bracket === autoInsertedLineEnd[0] &&
459
+ line.substr(cursor.column) === autoInsertedLineEnd;
460
+ };
461
+
462
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
463
+ return maybeInsertedBrackets > 0 &&
464
+ cursor.row === maybeInsertedRow &&
465
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
466
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
467
+ };
468
+
469
+ CstyleBehaviour.popAutoInsertedClosing = function() {
470
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
471
+ autoInsertedBrackets--;
472
+ };
473
+
474
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
475
+ maybeInsertedBrackets = 0;
476
+ maybeInsertedRow = -1;
477
+ };
478
+
479
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
480
+ var cursor = editor.getCursorPosition();
481
+ var line = session.doc.getLine(cursor.row);
482
+ if (text == '{') {
483
+ var selection = editor.getSelectionRange();
484
+ var selected = session.doc.getTextRange(selection);
485
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
486
+ return {
487
+ text: '{' + selected + '}',
488
+ selection: false
489
+ };
490
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
491
+ if (/[\]\}\)]/.test(line[cursor.column])) {
492
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
493
+ return {
494
+ text: '{}',
495
+ selection: [1, 1]
496
+ };
497
+ } else {
498
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
499
+ return {
500
+ text: '{',
501
+ selection: [1, 1]
502
+ };
503
+ }
504
+ }
505
+ } else if (text == '}') {
506
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
507
+ if (rightChar == '}') {
508
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
509
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
510
+ CstyleBehaviour.popAutoInsertedClosing();
511
+ return {
512
+ text: '',
513
+ selection: [1, 1]
514
+ };
515
+ }
516
+ }
517
+ } else if (text == "\n" || text == "\r\n") {
518
+ var closing = "";
519
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
520
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
521
+ CstyleBehaviour.clearMaybeInsertedClosing();
522
+ }
523
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
524
+ if (rightChar == '}' || closing !== "") {
525
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
526
+ if (!openBracePos)
527
+ return null;
528
+
529
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
530
+ var next_indent = this.$getIndent(line);
531
+
532
+ return {
533
+ text: '\n' + indent + '\n' + next_indent + closing,
534
+ selection: [1, indent.length, 1, indent.length]
535
+ };
536
+ }
537
+ }
538
+ });
539
+
540
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
541
+ var selected = session.doc.getTextRange(range);
542
+ if (!range.isMultiLine() && selected == '{') {
543
+ var line = session.doc.getLine(range.start.row);
544
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
545
+ if (rightChar == '}') {
546
+ range.end.column++;
547
+ return range;
548
+ } else {
549
+ maybeInsertedBrackets--;
550
+ }
551
+ }
552
+ });
553
+
554
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
555
+ if (text == '(') {
556
+ var selection = editor.getSelectionRange();
557
+ var selected = session.doc.getTextRange(selection);
558
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
559
+ return {
560
+ text: '(' + selected + ')',
561
+ selection: false
562
+ };
563
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
564
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
565
+ return {
566
+ text: '()',
567
+ selection: [1, 1]
568
+ };
569
+ }
570
+ } else if (text == ')') {
571
+ var cursor = editor.getCursorPosition();
572
+ var line = session.doc.getLine(cursor.row);
573
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
574
+ if (rightChar == ')') {
575
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
576
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
577
+ CstyleBehaviour.popAutoInsertedClosing();
578
+ return {
579
+ text: '',
580
+ selection: [1, 1]
581
+ };
582
+ }
583
+ }
584
+ }
585
+ });
586
+
587
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
588
+ var selected = session.doc.getTextRange(range);
589
+ if (!range.isMultiLine() && selected == '(') {
590
+ var line = session.doc.getLine(range.start.row);
591
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
592
+ if (rightChar == ')') {
593
+ range.end.column++;
594
+ return range;
595
+ }
596
+ }
597
+ });
598
+
599
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
600
+ if (text == '[') {
601
+ var selection = editor.getSelectionRange();
602
+ var selected = session.doc.getTextRange(selection);
603
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
604
+ return {
605
+ text: '[' + selected + ']',
606
+ selection: false
607
+ };
608
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
609
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
610
+ return {
611
+ text: '[]',
612
+ selection: [1, 1]
613
+ };
614
+ }
615
+ } else if (text == ']') {
616
+ var cursor = editor.getCursorPosition();
617
+ var line = session.doc.getLine(cursor.row);
618
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
619
+ if (rightChar == ']') {
620
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
621
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
622
+ CstyleBehaviour.popAutoInsertedClosing();
623
+ return {
624
+ text: '',
625
+ selection: [1, 1]
626
+ };
627
+ }
628
+ }
629
+ }
630
+ });
631
+
632
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
633
+ var selected = session.doc.getTextRange(range);
634
+ if (!range.isMultiLine() && selected == '[') {
635
+ var line = session.doc.getLine(range.start.row);
636
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
637
+ if (rightChar == ']') {
638
+ range.end.column++;
639
+ return range;
640
+ }
641
+ }
642
+ });
643
+
644
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
645
+ if (text == '"' || text == "'") {
646
+ var quote = text;
647
+ var selection = editor.getSelectionRange();
648
+ var selected = session.doc.getTextRange(selection);
649
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
650
+ return {
651
+ text: quote + selected + quote,
652
+ selection: false
653
+ };
654
+ } else {
655
+ var cursor = editor.getCursorPosition();
656
+ var line = session.doc.getLine(cursor.row);
657
+ var leftChar = line.substring(cursor.column-1, cursor.column);
658
+ if (leftChar == '\\') {
659
+ return null;
660
+ }
661
+ var tokens = session.getTokens(selection.start.row);
662
+ var col = 0, token;
663
+ var quotepos = -1; // Track whether we're inside an open quote.
664
+
665
+ for (var x = 0; x < tokens.length; x++) {
666
+ token = tokens[x];
667
+ if (token.type == "string") {
668
+ quotepos = -1;
669
+ } else if (quotepos < 0) {
670
+ quotepos = token.value.indexOf(quote);
671
+ }
672
+ if ((token.value.length + col) > selection.start.column) {
673
+ break;
674
+ }
675
+ col += tokens[x].value.length;
676
+ }
677
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
678
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
679
+ return;
680
+ return {
681
+ text: quote + quote,
682
+ selection: [1,1]
683
+ };
684
+ } else if (token && token.type === "string") {
685
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
686
+ if (rightChar == quote) {
687
+ return {
688
+ text: '',
689
+ selection: [1, 1]
690
+ };
691
+ }
692
+ }
693
+ }
694
+ }
695
+ });
696
+
697
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
698
+ var selected = session.doc.getTextRange(range);
699
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
700
+ var line = session.doc.getLine(range.start.row);
701
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
702
+ if (rightChar == selected) {
703
+ range.end.column++;
704
+ return range;
705
+ }
706
+ }
707
+ });
708
+
709
+ };
710
+
711
+ oop.inherits(CstyleBehaviour, Behaviour);
712
+
713
+ exports.CstyleBehaviour = CstyleBehaviour;
714
+ });
715
+
716
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
717
+
718
+
719
+ var oop = require("../../lib/oop");
720
+ var Range = require("../../range").Range;
721
+ var BaseFoldMode = require("./fold_mode").FoldMode;
722
+
723
+ var FoldMode = exports.FoldMode = function(commentRegex) {
724
+ if (commentRegex) {
725
+ this.foldingStartMarker = new RegExp(
726
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
727
+ );
728
+ this.foldingStopMarker = new RegExp(
729
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
730
+ );
731
+ }
732
+ };
733
+ oop.inherits(FoldMode, BaseFoldMode);
734
+
735
+ (function() {
736
+
737
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
738
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
739
+
740
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
741
+ var line = session.getLine(row);
742
+ var match = line.match(this.foldingStartMarker);
743
+ if (match) {
744
+ var i = match.index;
745
+
746
+ if (match[1])
747
+ return this.openingBracketBlock(session, match[1], row, i);
748
+
749
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
750
+ }
751
+
752
+ if (foldStyle !== "markbeginend")
753
+ return;
754
+
755
+ var match = line.match(this.foldingStopMarker);
756
+ if (match) {
757
+ var i = match.index + match[0].length;
758
+
759
+ if (match[1])
760
+ return this.closingBracketBlock(session, match[1], row, i);
761
+
762
+ return session.getCommentFoldRange(row, i, -1);
763
+ }
764
+ };
765
+
766
+ }).call(FoldMode.prototype);
767
+
768
+ });
769
+
770
+
771
+ define('ace/mode/dart_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
772
+
773
+
774
+ var oop = require("../lib/oop");
775
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
776
+
777
+ var DartHighlightRules = function() {
778
+
779
+ var constantLanguage = "true|false|null";
780
+ var variableLanguage = "this|super";
781
+ var keywordControl = "try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new";
782
+ var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef";
783
+ var storageModifier = "static|final|const";
784
+ var storageType = "void|bool|num|int|double|Dynamic|var|String";
785
+
786
+ var keywordMapper = this.createKeywordMapper({
787
+ "constant.language.dart": constantLanguage,
788
+ "variable.language.dart": variableLanguage,
789
+ "keyword.control.dart": keywordControl,
790
+ "keyword.declaration.dart": keywordDeclaration,
791
+ "storage.modifier.dart": storageModifier,
792
+ "storage.type.primitive.dart": storageType
793
+ }, "identifier");
794
+
795
+ var stringfill = {
796
+ token : "string",
797
+ regex : ".+"
798
+ };
799
+
800
+ this.$rules =
801
+ {
802
+ "start": [
803
+ {
804
+ token : "comment",
805
+ regex : /\/\/.*$/
806
+ },
807
+ {
808
+ token : "comment", // multi line comment
809
+ regex : /\/\*/,
810
+ next : "comment"
811
+ },
812
+ {
813
+ token: ["meta.preprocessor.script.dart"],
814
+ regex: "^(#!.*)$"
815
+ },
816
+ {
817
+ token: "keyword.other.import.dart",
818
+ regex: "(?:\\b)(?:library|import|source|part|of)(?:\\b)"
819
+ },
820
+ {
821
+ token : ["keyword.other.import.dart", "text"],
822
+ regex : "(?:\\b)(prefix)(\\s*:)"
823
+ },
824
+ {
825
+ regex: "\\bas\\b",
826
+ token: "keyword.cast.dart"
827
+ },
828
+ {
829
+ regex: "\\?|:",
830
+ token: "keyword.control.ternary.dart"
831
+ },
832
+ {
833
+ regex: "(?:\\b)(is\\!?)(?:\\b)",
834
+ token: ["keyword.operator.dart"]
835
+ },
836
+ {
837
+ regex: "(<<|>>>?|~|\\^|\\||&)",
838
+ token: ["keyword.operator.bitwise.dart"]
839
+ },
840
+ {
841
+ regex: "((?:&|\\^|\\||<<|>>>?)=)",
842
+ token: ["keyword.operator.assignment.bitwise.dart"]
843
+ },
844
+ {
845
+ regex: "(===?|!==?|<=?|>=?)",
846
+ token: ["keyword.operator.comparison.dart"]
847
+ },
848
+ {
849
+ regex: "((?:[+*/%-]|\\~)=)",
850
+ token: ["keyword.operator.assignment.arithmetic.dart"]
851
+ },
852
+ {
853
+ regex: "=",
854
+ token: "keyword.operator.assignment.dart"
855
+ },
856
+ {
857
+ token : "string",
858
+ regex : "'''",
859
+ next : "qdoc"
860
+ },
861
+ {
862
+ token : "string",
863
+ regex : '"""',
864
+ next : "qqdoc"
865
+ },
866
+ {
867
+ token : "string",
868
+ regex : "'",
869
+ next : "qstring"
870
+ },
871
+ {
872
+ token : "string",
873
+ regex : '"',
874
+ next : "qqstring"
875
+ },
876
+ {
877
+ regex: "(\\-\\-|\\+\\+)",
878
+ token: ["keyword.operator.increment-decrement.dart"]
879
+ },
880
+ {
881
+ regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)",
882
+ token: ["keyword.operator.arithmetic.dart"]
883
+ },
884
+ {
885
+ regex: "(!|&&|\\|\\|)",
886
+ token: ["keyword.operator.logical.dart"]
887
+ },
888
+ {
889
+ token : "constant.numeric", // hex
890
+ regex : "0[xX][0-9a-fA-F]+\\b"
891
+ },
892
+ {
893
+ token : "constant.numeric", // float
894
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
895
+ },
896
+ {
897
+ token : keywordMapper,
898
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
899
+ }
900
+ ],
901
+ "comment" : [
902
+ {
903
+ token : "comment", // closing comment
904
+ regex : ".*?\\*\\/",
905
+ next : "start"
906
+ }, {
907
+ token : "comment", // comment spanning whole line
908
+ regex : ".+"
909
+ }
910
+ ],
911
+ "qdoc" : [
912
+ {
913
+ token : "string",
914
+ regex : ".*?'''",
915
+ next : "start"
916
+ }, stringfill],
917
+
918
+ "qqdoc" : [
919
+ {
920
+ token : "string",
921
+ regex : '.*?"""',
922
+ next : "start"
923
+ }, stringfill],
924
+
925
+ "qstring" : [
926
+ {
927
+ token : "string",
928
+ regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
929
+ next : "start"
930
+ }, stringfill],
931
+
932
+ "qqstring" : [
933
+ {
934
+ token : "string",
935
+ regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
936
+ next : "start"
937
+ }, stringfill]
938
+ }
939
+
940
+ };
941
+
942
+ oop.inherits(DartHighlightRules, TextHighlightRules);
943
+
944
+ exports.DartHighlightRules = DartHighlightRules;
945
+ });