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.
Files changed (167) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1 -1
  3. data/lib/ace/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/ace/ace.js +6911 -5290
  5. data/vendor/assets/javascripts/ace/ext-chromevox.js +537 -0
  6. data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +301 -0
  7. data/vendor/assets/javascripts/ace/ext-emmet.js +1109 -0
  8. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +207 -0
  9. data/vendor/assets/javascripts/ace/ext-language_tools.js +1665 -0
  10. data/vendor/assets/javascripts/ace/ext-modelist.js +168 -0
  11. data/vendor/assets/javascripts/ace/ext-old_ie.js +500 -0
  12. data/vendor/assets/javascripts/ace/ext-options.js +252 -0
  13. data/vendor/assets/javascripts/ace/ext-searchbox.js +421 -0
  14. data/vendor/assets/javascripts/ace/ext-settings_menu.js +632 -0
  15. data/vendor/assets/javascripts/ace/ext-spellcheck.js +68 -0
  16. data/vendor/assets/javascripts/ace/ext-split.js +271 -0
  17. data/vendor/assets/javascripts/ace/ext-static_highlight.js +178 -0
  18. data/vendor/assets/javascripts/ace/ext-statusbar.js +47 -0
  19. data/vendor/assets/javascripts/ace/ext-textarea.js +478 -0
  20. data/vendor/assets/javascripts/ace/ext-themelist.js +86 -0
  21. data/vendor/assets/javascripts/ace/ext-whitespace.js +206 -0
  22. data/vendor/assets/javascripts/ace/keybinding-emacs.js +822 -131
  23. data/vendor/assets/javascripts/ace/keybinding-vim.js +382 -258
  24. data/vendor/assets/javascripts/ace/mode-abap.js +261 -0
  25. data/vendor/assets/javascripts/ace/mode-actionscript.js +257 -0
  26. data/vendor/assets/javascripts/ace/mode-ada.js +118 -0
  27. data/vendor/assets/javascripts/ace/mode-asciidoc.js +373 -0
  28. data/vendor/assets/javascripts/ace/mode-assembly_x86.js +217 -0
  29. data/vendor/assets/javascripts/ace/mode-autohotkey.js +225 -0
  30. data/vendor/assets/javascripts/ace/mode-batchfile.js +213 -0
  31. data/vendor/assets/javascripts/ace/mode-c9search.js +144 -124
  32. data/vendor/assets/javascripts/ace/mode-c_cpp.js +296 -254
  33. data/vendor/assets/javascripts/ace/mode-clojure.js +113 -177
  34. data/vendor/assets/javascripts/ace/mode-cobol.js +125 -0
  35. data/vendor/assets/javascripts/ace/mode-coffee.js +152 -235
  36. data/vendor/assets/javascripts/ace/mode-coldfusion.js +823 -835
  37. data/vendor/assets/javascripts/ace/mode-csharp.js +325 -187
  38. data/vendor/assets/javascripts/ace/mode-css.js +583 -297
  39. data/vendor/assets/javascripts/ace/mode-curly.js +2423 -0
  40. data/vendor/assets/javascripts/ace/mode-d.js +492 -0
  41. data/vendor/assets/javascripts/ace/mode-dart.js +993 -0
  42. data/vendor/assets/javascripts/ace/mode-diff.js +124 -204
  43. data/vendor/assets/javascripts/ace/mode-django.js +2448 -0
  44. data/vendor/assets/javascripts/ace/mode-dot.js +361 -0
  45. data/vendor/assets/javascripts/ace/mode-ejs.js +2817 -0
  46. data/vendor/assets/javascripts/ace/mode-erlang.js +987 -0
  47. data/vendor/assets/javascripts/ace/mode-forth.js +280 -0
  48. data/vendor/assets/javascripts/ace/mode-ftl.js +1061 -0
  49. data/vendor/assets/javascripts/ace/mode-glsl.js +313 -275
  50. data/vendor/assets/javascripts/ace/mode-golang.js +268 -275
  51. data/vendor/assets/javascripts/ace/mode-groovy.js +347 -492
  52. data/vendor/assets/javascripts/ace/mode-haml.js +498 -0
  53. data/vendor/assets/javascripts/ace/mode-handlebars.js +2433 -0
  54. data/vendor/assets/javascripts/ace/mode-haskell.js +362 -0
  55. data/vendor/assets/javascripts/ace/mode-haxe.js +226 -202
  56. data/vendor/assets/javascripts/ace/mode-html.js +1099 -802
  57. data/vendor/assets/javascripts/ace/mode-html_completions.js +309 -0
  58. data/vendor/assets/javascripts/ace/mode-html_ruby.js +2822 -0
  59. data/vendor/assets/javascripts/ace/mode-ini.js +185 -0
  60. data/vendor/assets/javascripts/ace/mode-jack.js +653 -0
  61. data/vendor/assets/javascripts/ace/mode-jade.js +2081 -0
  62. data/vendor/assets/javascripts/ace/mode-java.js +339 -488
  63. data/vendor/assets/javascripts/ace/mode-javascript.js +342 -478
  64. data/vendor/assets/javascripts/ace/mode-json.js +215 -178
  65. data/vendor/assets/javascripts/ace/mode-jsoniq.js +2761 -0
  66. data/vendor/assets/javascripts/ace/mode-jsp.js +1553 -0
  67. data/vendor/assets/javascripts/ace/mode-jsx.js +325 -289
  68. data/vendor/assets/javascripts/ace/mode-julia.js +286 -0
  69. data/vendor/assets/javascripts/ace/mode-latex.js +141 -46
  70. data/vendor/assets/javascripts/ace/mode-less.js +493 -151
  71. data/vendor/assets/javascripts/ace/mode-liquid.js +594 -656
  72. data/vendor/assets/javascripts/ace/mode-lisp.js +137 -0
  73. data/vendor/assets/javascripts/ace/mode-livescript.js +288 -0
  74. data/vendor/assets/javascripts/ace/mode-logiql.js +669 -0
  75. data/vendor/assets/javascripts/ace/mode-lsl.js +890 -0
  76. data/vendor/assets/javascripts/ace/mode-lua.js +274 -368
  77. data/vendor/assets/javascripts/ace/mode-luapage.js +1331 -1107
  78. data/vendor/assets/javascripts/ace/mode-lucene.js +64 -0
  79. data/vendor/assets/javascripts/ace/mode-makefile.js +332 -0
  80. data/vendor/assets/javascripts/ace/mode-markdown.js +1303 -948
  81. data/vendor/assets/javascripts/ace/mode-matlab.js +230 -0
  82. data/vendor/assets/javascripts/ace/mode-mushcode.js +705 -0
  83. data/vendor/assets/javascripts/ace/mode-mushcode_high_rules.js +569 -0
  84. data/vendor/assets/javascripts/ace/mode-mysql.js +185 -0
  85. data/vendor/assets/javascripts/ace/mode-nix.js +935 -0
  86. data/vendor/assets/javascripts/ace/mode-objectivec.js +699 -0
  87. data/vendor/assets/javascripts/ace/mode-ocaml.js +44 -63
  88. data/vendor/assets/javascripts/ace/mode-pascal.js +233 -0
  89. data/vendor/assets/javascripts/ace/mode-perl.js +116 -189
  90. data/vendor/assets/javascripts/ace/mode-pgsql.js +886 -500
  91. data/vendor/assets/javascripts/ace/mode-php.js +1158 -380
  92. data/vendor/assets/javascripts/ace/mode-plain_text.js +56 -0
  93. data/vendor/assets/javascripts/ace/mode-powershell.js +222 -167
  94. data/vendor/assets/javascripts/ace/mode-prolog.js +354 -0
  95. data/vendor/assets/javascripts/ace/mode-properties.js +100 -0
  96. data/vendor/assets/javascripts/ace/mode-protobuf.js +885 -0
  97. data/vendor/assets/javascripts/ace/mode-python.js +99 -201
  98. data/vendor/assets/javascripts/ace/mode-r.js +337 -0
  99. data/vendor/assets/javascripts/ace/mode-rdoc.js +210 -0
  100. data/vendor/assets/javascripts/ace/mode-rhtml.js +2663 -0
  101. data/vendor/assets/javascripts/ace/mode-ruby.js +262 -136
  102. data/vendor/assets/javascripts/ace/mode-rust.js +245 -0
  103. data/vendor/assets/javascripts/ace/mode-sass.js +443 -0
  104. data/vendor/assets/javascripts/ace/mode-scad.js +225 -240
  105. data/vendor/assets/javascripts/ace/mode-scala.js +340 -494
  106. data/vendor/assets/javascripts/ace/mode-scheme.js +143 -0
  107. data/vendor/assets/javascripts/ace/mode-scss.js +499 -157
  108. data/vendor/assets/javascripts/ace/mode-sh.js +180 -110
  109. data/vendor/assets/javascripts/ace/mode-sjs.js +1154 -0
  110. data/vendor/assets/javascripts/ace/mode-snippets.js +198 -0
  111. data/vendor/assets/javascripts/ace/mode-soy_template.js +2707 -0
  112. data/vendor/assets/javascripts/ace/mode-space.js +160 -0
  113. data/vendor/assets/javascripts/ace/mode-sql.js +48 -69
  114. data/vendor/assets/javascripts/ace/mode-stylus.js +447 -0
  115. data/vendor/assets/javascripts/ace/mode-svg.js +552 -605
  116. data/vendor/assets/javascripts/ace/mode-tcl.js +139 -98
  117. data/vendor/assets/javascripts/ace/mode-tex.js +187 -0
  118. data/vendor/assets/javascripts/ace/mode-textile.js +29 -40
  119. data/vendor/assets/javascripts/ace/mode-tmsnippet.js +200 -0
  120. data/vendor/assets/javascripts/ace/mode-toml.js +177 -0
  121. data/vendor/assets/javascripts/ace/mode-twig.js +2228 -0
  122. data/vendor/assets/javascripts/ace/mode-typescript.js +1018 -0
  123. data/vendor/assets/javascripts/ace/mode-vbscript.js +250 -0
  124. data/vendor/assets/javascripts/ace/mode-velocity.js +1621 -0
  125. data/vendor/assets/javascripts/ace/mode-verilog.js +127 -0
  126. data/vendor/assets/javascripts/ace/mode-vhdl.js +139 -0
  127. data/vendor/assets/javascripts/ace/mode-xml.js +350 -242
  128. data/vendor/assets/javascripts/ace/mode-xquery.js +2490 -300
  129. data/vendor/assets/javascripts/ace/mode-yaml.js +146 -45
  130. data/vendor/assets/javascripts/ace/theme-ambiance.js +202 -0
  131. data/vendor/assets/javascripts/ace/theme-chaos.js +179 -0
  132. data/vendor/assets/javascripts/ace/theme-chrome.js +97 -153
  133. data/vendor/assets/javascripts/ace/theme-clouds.js +78 -119
  134. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +79 -120
  135. data/vendor/assets/javascripts/ace/theme-cobalt.js +89 -140
  136. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +93 -145
  137. data/vendor/assets/javascripts/ace/theme-dawn.js +84 -143
  138. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +99 -162
  139. data/vendor/assets/javascripts/ace/theme-eclipse.js +78 -111
  140. data/vendor/assets/javascripts/ace/theme-github.js +70 -121
  141. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +75 -134
  142. data/vendor/assets/javascripts/ace/theme-kr.js +135 -0
  143. data/vendor/assets/javascripts/ace/theme-merbivore.js +80 -143
  144. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +81 -149
  145. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +87 -146
  146. data/vendor/assets/javascripts/ace/theme-monokai.js +88 -146
  147. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +82 -142
  148. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +83 -144
  149. data/vendor/assets/javascripts/ace/theme-solarized_light.js +76 -133
  150. data/vendor/assets/javascripts/ace/theme-terminal.js +145 -0
  151. data/vendor/assets/javascripts/ace/theme-textmate.js +101 -158
  152. data/vendor/assets/javascripts/ace/theme-tomorrow.js +89 -163
  153. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +89 -163
  154. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +89 -165
  155. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +101 -162
  156. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +90 -160
  157. data/vendor/assets/javascripts/ace/theme-twilight.js +87 -158
  158. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +75 -140
  159. data/vendor/assets/javascripts/ace/theme-xcode.js +120 -0
  160. data/vendor/assets/javascripts/ace/worker-coffee.js +3049 -2665
  161. data/vendor/assets/javascripts/ace/worker-css.js +1779 -4376
  162. data/vendor/assets/javascripts/ace/worker-javascript.js +8701 -9008
  163. data/vendor/assets/javascripts/ace/worker-json.js +709 -1340
  164. data/vendor/assets/javascripts/ace/worker-lua.js +3525 -0
  165. data/vendor/assets/javascripts/ace/worker-php.js +6893 -0
  166. data/vendor/assets/javascripts/ace/worker-xquery.js +19924 -64507
  167. metadata +100 -17
@@ -0,0 +1,280 @@
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/forth', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/forth_highlight_rules', 'ace/mode/folding/cstyle'], 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 ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules;
43
+ var FoldMode = require("./folding/cstyle").FoldMode;
44
+
45
+ var Mode = function() {
46
+ this.HighlightRules = ForthHighlightRules;
47
+ this.foldingRules = new FoldMode();
48
+ };
49
+ oop.inherits(Mode, TextMode);
50
+
51
+ (function() {
52
+ this.lineCommentStart = "(?<=^|\\s)\\.?\\( [^)]*\\)";
53
+ this.blockComment = {start: "/*", end: "*/"};
54
+ this.$id = "ace/mode/forth";
55
+ }).call(Mode.prototype);
56
+
57
+ exports.Mode = Mode;
58
+ });
59
+
60
+ define('ace/mode/forth_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
61
+
62
+
63
+ var oop = require("../lib/oop");
64
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
65
+
66
+ var ForthHighlightRules = function() {
67
+
68
+ this.$rules = { start: [ { include: '#forth' } ],
69
+ '#comment':
70
+ [ { token: 'comment.line.double-dash.forth',
71
+ regex: '(?:^|\\s)--\\s.*$',
72
+ comment: 'line comments for iForth' },
73
+ { token: 'comment.line.backslash.forth',
74
+ regex: '(?:^|\\s)\\\\[\\s\\S]*$',
75
+ comment: 'ANSI line comment' },
76
+ { token: 'comment.line.backslash-g.forth',
77
+ regex: '(?:^|\\s)\\\\[Gg] .*$',
78
+ comment: 'gForth line comment' },
79
+ { token: 'comment.block.forth',
80
+ regex: '(?:^|\\s)\\(\\*(?=\\s|$)',
81
+ push:
82
+ [ { token: 'comment.block.forth',
83
+ regex: '(?:^|\\s)\\*\\)(?=\\s|$)',
84
+ next: 'pop' },
85
+ { defaultToken: 'comment.block.forth' } ],
86
+ comment: 'multiline comments for iForth' },
87
+ { token: 'comment.block.documentation.forth',
88
+ regex: '\\bDOC\\b',
89
+ caseInsensitive: true,
90
+ push:
91
+ [ { token: 'comment.block.documentation.forth',
92
+ regex: '\\bENDDOC\\b',
93
+ caseInsensitive: true,
94
+ next: 'pop' },
95
+ { defaultToken: 'comment.block.documentation.forth' } ],
96
+ comment: 'documentation comments for iForth' },
97
+ { token: 'comment.line.parentheses.forth',
98
+ regex: '(?:^|\\s)\\.?\\( [^)]*\\)',
99
+ comment: 'ANSI line comment' } ],
100
+ '#constant':
101
+ [ { token: 'constant.language.forth',
102
+ regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)',
103
+ caseInsensitive: true},
104
+ { token: 'constant.numeric.forth',
105
+ regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'},
106
+ { token: 'constant.character.forth',
107
+ regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}],
108
+ '#forth':
109
+ [ { include: '#constant' },
110
+ { include: '#comment' },
111
+ { include: '#string' },
112
+ { include: '#word' },
113
+ { include: '#variable' },
114
+ { include: '#storage' },
115
+ { include: '#word-def' } ],
116
+ '#storage':
117
+ [ { token: 'storage.type.forth',
118
+ regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)',
119
+ caseInsensitive: true}],
120
+ '#string':
121
+ [ { token: 'string.quoted.double.forth',
122
+ regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',
123
+ caseInsensitive: true},
124
+ { token: 'string.unquoted.forth',
125
+ regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)',
126
+ caseInsensitive: true}],
127
+ '#variable':
128
+ [ { token: 'variable.language.forth',
129
+ regex: '\\b(?:I|J)\\b',
130
+ caseInsensitive: true } ],
131
+ '#word':
132
+ [ { token: 'keyword.control.immediate.forth',
133
+ regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)',
134
+ caseInsensitive: true},
135
+ { token: 'keyword.other.immediate.forth',
136
+ regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)',
137
+ caseInsensitive: true},
138
+ { token: 'keyword.control.compile-only.forth',
139
+ regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',
140
+ caseInsensitive: true},
141
+ { token: 'keyword.other.compile-only.forth',
142
+ regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]|<COMPILATION|<INTERPRETATION|ASSERT\\(|ASSERT0\\(|ASSERT1\\(|ASSERT2\\(|ASSERT3\\(|COMPILATION>|DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)',
143
+ caseInsensitive: true},
144
+ { token: 'keyword.other.non-immediate.forth',
145
+ regex: '(?:^|\\s)(?:\'|<IS>|<TO>|CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)',
146
+ caseInsensitive: true},
147
+ { token: 'keyword.other.warning.forth',
148
+ regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',
149
+ caseInsensitive: true}],
150
+ '#word-def':
151
+ [ { token:
152
+ [ 'keyword.other.compile-only.forth',
153
+ 'keyword.other.compile-only.forth',
154
+ 'meta.block.forth',
155
+ 'entity.name.function.forth' ],
156
+ regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)',
157
+ caseInsensitive: true,
158
+ push:
159
+ [ { token: 'keyword.other.compile-only.forth',
160
+ regex: ';(?:CODE)?',
161
+ caseInsensitive: true,
162
+ next: 'pop' },
163
+ { include: '#constant' },
164
+ { include: '#comment' },
165
+ { include: '#string' },
166
+ { include: '#word' },
167
+ { include: '#variable' },
168
+ { include: '#storage' },
169
+ { defaultToken: 'meta.block.forth' } ] } ] }
170
+
171
+ this.normalizeRules();
172
+ };
173
+
174
+ ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr' ],
175
+ foldingStartMarker: '/\\*\\*|\\{\\s*$',
176
+ foldingStopMarker: '\\*\\*/|^\\s*\\}',
177
+ keyEquivalent: '^~F',
178
+ name: 'Forth',
179
+ scopeName: 'source.forth' }
180
+
181
+
182
+ oop.inherits(ForthHighlightRules, TextHighlightRules);
183
+
184
+ exports.ForthHighlightRules = ForthHighlightRules;
185
+ });
186
+
187
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
188
+
189
+
190
+ var oop = require("../../lib/oop");
191
+ var Range = require("../../range").Range;
192
+ var BaseFoldMode = require("./fold_mode").FoldMode;
193
+
194
+ var FoldMode = exports.FoldMode = function(commentRegex) {
195
+ if (commentRegex) {
196
+ this.foldingStartMarker = new RegExp(
197
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
198
+ );
199
+ this.foldingStopMarker = new RegExp(
200
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
201
+ );
202
+ }
203
+ };
204
+ oop.inherits(FoldMode, BaseFoldMode);
205
+
206
+ (function() {
207
+
208
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
209
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
210
+
211
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
212
+ var line = session.getLine(row);
213
+ var match = line.match(this.foldingStartMarker);
214
+ if (match) {
215
+ var i = match.index;
216
+
217
+ if (match[1])
218
+ return this.openingBracketBlock(session, match[1], row, i);
219
+
220
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
221
+
222
+ if (range && !range.isMultiLine()) {
223
+ if (forceMultiline) {
224
+ range = this.getSectionRange(session, row);
225
+ } else if (foldStyle != "all")
226
+ range = null;
227
+ }
228
+
229
+ return range;
230
+ }
231
+
232
+ if (foldStyle === "markbegin")
233
+ return;
234
+
235
+ var match = line.match(this.foldingStopMarker);
236
+ if (match) {
237
+ var i = match.index + match[0].length;
238
+
239
+ if (match[1])
240
+ return this.closingBracketBlock(session, match[1], row, i);
241
+
242
+ return session.getCommentFoldRange(row, i, -1);
243
+ }
244
+ };
245
+
246
+ this.getSectionRange = function(session, row) {
247
+ var line = session.getLine(row);
248
+ var startIndent = line.search(/\S/);
249
+ var startRow = row;
250
+ var startColumn = line.length;
251
+ row = row + 1;
252
+ var endRow = row;
253
+ var maxRow = session.getLength();
254
+ while (++row < maxRow) {
255
+ line = session.getLine(row);
256
+ var indent = line.search(/\S/);
257
+ if (indent === -1)
258
+ continue;
259
+ if (startIndent > indent)
260
+ break;
261
+ var subRange = this.getFoldWidgetRange(session, "all", row);
262
+
263
+ if (subRange) {
264
+ if (subRange.start.row <= startRow) {
265
+ break;
266
+ } else if (subRange.isMultiLine()) {
267
+ row = subRange.end.row;
268
+ } else if (startIndent == indent) {
269
+ break;
270
+ }
271
+ }
272
+ endRow = row;
273
+ }
274
+
275
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
276
+ };
277
+
278
+ }).call(FoldMode.prototype);
279
+
280
+ });
@@ -0,0 +1,1061 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2010, 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/ftl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ftl_highlight_rules'], 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 FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules;
38
+
39
+ var Mode = function() {
40
+ this.HighlightRules = FtlHighlightRules;
41
+ };
42
+ oop.inherits(Mode, TextMode);
43
+
44
+ (function() {
45
+
46
+ this.$id = "ace/mode/ftl";
47
+ }).call(Mode.prototype);
48
+
49
+ exports.Mode = Mode;
50
+ });
51
+
52
+ define('ace/mode/ftl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
53
+
54
+
55
+ var oop = require("../lib/oop");
56
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
57
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
58
+
59
+ var FtlLangHighlightRules = function () {
60
+
61
+ var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|"
62
+ + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|"
63
+ + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|"
64
+ + "upper_case|word_list|xhtml|xml";
65
+ var numberBuiltIns = "c|round|floor|ceiling";
66
+ var dateBuiltIns = "iso_[a-z_]+";
67
+ var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk";
68
+ var hashBuiltIns = "keys|values";
69
+ var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace";
70
+ var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|"
71
+ + "eval|has_content|interpret|is_[a-z_]+|namespacenew";
72
+ var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns
73
+ + xmlBuiltIns + expertBuiltIns;
74
+
75
+ var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
76
+
77
+ var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|"
78
+ + "now|output_encoding|template_name|url_escaping_charset|vars|version";
79
+
80
+ var operators = "gt|gte|lt|lte|as|in|using";
81
+
82
+ var reserved = "true|false";
83
+
84
+ var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|"
85
+ + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|"
86
+ + "attributes";
87
+
88
+ this.$rules = {
89
+ "start" : [{
90
+ token : "constant.character.entity",
91
+ regex : /&[^;]+;/
92
+ }, {
93
+ token : "support.function",
94
+ regex : "\\?("+allBuiltIns+")"
95
+ }, {
96
+ token : "support.function.deprecated",
97
+ regex : "\\?("+deprecatedBuiltIns+")"
98
+ }, {
99
+ token : "language.variable",
100
+ regex : "\\.(?:"+variables+")"
101
+ }, {
102
+ token : "constant.language",
103
+ regex : "\\b("+reserved+")\\b"
104
+ }, {
105
+ token : "keyword.operator",
106
+ regex : "\\b(?:"+operators+")\\b"
107
+ }, {
108
+ token : "entity.other.attribute-name",
109
+ regex : attributes
110
+ }, {
111
+ token : "string", //
112
+ regex : /['"]/,
113
+ next : "qstring"
114
+ }, {
115
+ token : function(value) {
116
+ if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
117
+ return "constant.numeric";
118
+ } else {
119
+ return "variable";
120
+ }
121
+ },
122
+ regex : /[\w.+\-]+/
123
+ }, {
124
+ token : "keyword.operator",
125
+ regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
126
+ }, {
127
+ token : "paren.lparen",
128
+ regex : "[[({]"
129
+ }, {
130
+ token : "paren.rparen",
131
+ regex : "[\\])}]"
132
+ }, {
133
+ token : "text",
134
+ regex : "\\s+"
135
+ }],
136
+
137
+ "qstring" : [{
138
+ token : "constant.character.escape",
139
+ regex : '\\\\[nrtvef\\\\"$]'
140
+ }, {
141
+ token : "string",
142
+ regex : /['"]/,
143
+ next : "start"
144
+ }, {
145
+ defaultToken : "string"
146
+ }]
147
+ };
148
+ };
149
+
150
+ oop.inherits(FtlLangHighlightRules, TextHighlightRules);
151
+
152
+ var FtlHighlightRules = function() {
153
+ HtmlHighlightRules.call(this);
154
+
155
+ var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|"
156
+ + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|"
157
+ + "setting|stop|switch|t|visit";
158
+
159
+ var startRules = [
160
+ {
161
+ token : "comment",
162
+ regex : "<#--",
163
+ next : "ftl-dcomment"
164
+ }, {
165
+ token : "string.interpolated",
166
+ regex : "\\${",
167
+ push : "ftl-start"
168
+ }, {
169
+ token : "keyword.function",
170
+ regex : "</?#("+directives+")",
171
+ push : "ftl-start"
172
+ }, {
173
+ token : "keyword.other",
174
+ regex : "</?@[a-zA-Z\\.]+",
175
+ push : "ftl-start"
176
+ }
177
+ ];
178
+
179
+ var endRules = [
180
+ {
181
+ token : "keyword",
182
+ regex : "/?>",
183
+ next : "pop"
184
+ }, {
185
+ token : "string.interpolated",
186
+ regex : "}",
187
+ next : "pop"
188
+ }
189
+ ];
190
+
191
+ for (var key in this.$rules)
192
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
193
+
194
+ this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]);
195
+
196
+ this.addRules({
197
+ "ftl-dcomment" : [{
198
+ token : "comment",
199
+ regex : ".*?-->",
200
+ next : "pop"
201
+ }, {
202
+ token : "comment",
203
+ regex : ".+"
204
+ }]
205
+ });
206
+
207
+ this.normalizeRules();
208
+ };
209
+
210
+ oop.inherits(FtlHighlightRules, HtmlHighlightRules);
211
+
212
+ exports.FtlHighlightRules = FtlHighlightRules;
213
+ });
214
+
215
+ define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
216
+
217
+
218
+ var oop = require("../lib/oop");
219
+ var lang = require("../lib/lang");
220
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
221
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
222
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
223
+
224
+ var tagMap = lang.createMap({
225
+ a : 'anchor',
226
+ button : 'form',
227
+ form : 'form',
228
+ img : 'image',
229
+ input : 'form',
230
+ label : 'form',
231
+ option : 'form',
232
+ script : 'script',
233
+ select : 'form',
234
+ textarea : 'form',
235
+ style : 'style',
236
+ table : 'table',
237
+ tbody : 'table',
238
+ td : 'table',
239
+ tfoot : 'table',
240
+ th : 'table',
241
+ tr : 'table'
242
+ });
243
+
244
+ var HtmlHighlightRules = function() {
245
+ XmlHighlightRules.call(this);
246
+
247
+ this.addRules({
248
+ attributes: [{
249
+ include : "space"
250
+ }, {
251
+ token : "entity.other.attribute-name",
252
+ regex : "[-_a-zA-Z0-9:]+"
253
+ }, {
254
+ token : "keyword.operator.separator",
255
+ regex : "=",
256
+ push : [{
257
+ include: "space"
258
+ }, {
259
+ token : "string",
260
+ regex : "[^<>='\"`\\s]+",
261
+ next : "pop"
262
+ }, {
263
+ token : "empty",
264
+ regex : "",
265
+ next : "pop"
266
+ }]
267
+ }, {
268
+ include : "string"
269
+ }],
270
+ tag: [{
271
+ token : function(start, tag) {
272
+ var group = tagMap[tag];
273
+ return ["meta.tag.punctuation.begin",
274
+ "meta.tag.name" + (group ? "." + group : "")];
275
+ },
276
+ regex : "(<)([-_a-zA-Z0-9:]+)",
277
+ next: "start_tag_stuff"
278
+ }, {
279
+ token : function(start, tag) {
280
+ var group = tagMap[tag];
281
+ return ["meta.tag.punctuation.begin",
282
+ "meta.tag.name" + (group ? "." + group : "")];
283
+ },
284
+ regex : "(</)([-_a-zA-Z0-9:]+)",
285
+ next: "end_tag_stuff"
286
+ }],
287
+ start_tag_stuff: [
288
+ {include : "attributes"},
289
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
290
+ ],
291
+ end_tag_stuff: [
292
+ {include : "space"},
293
+ {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
294
+ ]
295
+ });
296
+
297
+ this.embedTagRules(CssHighlightRules, "css-", "style");
298
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
299
+
300
+ if (this.constructor === HtmlHighlightRules)
301
+ this.normalizeRules();
302
+ };
303
+
304
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
305
+
306
+ exports.HtmlHighlightRules = HtmlHighlightRules;
307
+ });
308
+
309
+ define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
310
+
311
+
312
+ var oop = require("../lib/oop");
313
+ var lang = require("../lib/lang");
314
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
315
+ 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|pointer-events|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";
316
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
317
+ 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";
318
+ var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
319
+ 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";
320
+
321
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
322
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
323
+ 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";
324
+
325
+ var CssHighlightRules = function() {
326
+
327
+ var keywordMapper = this.createKeywordMapper({
328
+ "support.function": supportFunction,
329
+ "support.constant": supportConstant,
330
+ "support.type": supportType,
331
+ "support.constant.color": supportConstantColor,
332
+ "support.constant.fonts": supportConstantFonts
333
+ }, "text", true);
334
+
335
+ this.$rules = {
336
+ "start" : [{
337
+ token : "comment", // multi line comment
338
+ regex : "\\/\\*",
339
+ push : "comment"
340
+ }, {
341
+ token: "paren.lparen",
342
+ regex: "\\{",
343
+ push: "ruleset"
344
+ }, {
345
+ token: "string",
346
+ regex: "@.*?{",
347
+ push: "media"
348
+ }, {
349
+ token: "keyword",
350
+ regex: "#[a-z0-9-_]+"
351
+ }, {
352
+ token: "variable",
353
+ regex: "\\.[a-z0-9-_]+"
354
+ }, {
355
+ token: "string",
356
+ regex: ":[a-z0-9-_]+"
357
+ }, {
358
+ token: "constant",
359
+ regex: "[a-z0-9-_]+"
360
+ }, {
361
+ caseInsensitive: true
362
+ }],
363
+
364
+ "media" : [{
365
+ token : "comment", // multi line comment
366
+ regex : "\\/\\*",
367
+ push : "comment"
368
+ }, {
369
+ token: "paren.lparen",
370
+ regex: "\\{",
371
+ push: "ruleset"
372
+ }, {
373
+ token: "string",
374
+ regex: "\\}",
375
+ next: "pop"
376
+ }, {
377
+ token: "keyword",
378
+ regex: "#[a-z0-9-_]+"
379
+ }, {
380
+ token: "variable",
381
+ regex: "\\.[a-z0-9-_]+"
382
+ }, {
383
+ token: "string",
384
+ regex: ":[a-z0-9-_]+"
385
+ }, {
386
+ token: "constant",
387
+ regex: "[a-z0-9-_]+"
388
+ }, {
389
+ caseInsensitive: true
390
+ }],
391
+
392
+ "comment" : [{
393
+ token : "comment",
394
+ regex : "\\*\\/",
395
+ next : "pop"
396
+ }, {
397
+ defaultToken : "comment"
398
+ }],
399
+
400
+ "ruleset" : [
401
+ {
402
+ token : "paren.rparen",
403
+ regex : "\\}",
404
+ next: "pop"
405
+ }, {
406
+ token : "comment", // multi line comment
407
+ regex : "\\/\\*",
408
+ push : "comment"
409
+ }, {
410
+ token : "string", // single line
411
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
412
+ }, {
413
+ token : "string", // single line
414
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
415
+ }, {
416
+ token : ["constant.numeric", "keyword"],
417
+ 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|%)"
418
+ }, {
419
+ token : "constant.numeric",
420
+ regex : numRe
421
+ }, {
422
+ token : "constant.numeric", // hex6 color
423
+ regex : "#[a-f0-9]{6}"
424
+ }, {
425
+ token : "constant.numeric", // hex3 color
426
+ regex : "#[a-f0-9]{3}"
427
+ }, {
428
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
429
+ regex : pseudoElements
430
+ }, {
431
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
432
+ regex : pseudoClasses
433
+ }, {
434
+ token : ["support.function", "string", "support.function"],
435
+ regex : "(url\\()(.*)(\\))"
436
+ }, {
437
+ token : keywordMapper,
438
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
439
+ }, {
440
+ caseInsensitive: true
441
+ }]
442
+ };
443
+
444
+ this.normalizeRules();
445
+ };
446
+
447
+ oop.inherits(CssHighlightRules, TextHighlightRules);
448
+
449
+ exports.CssHighlightRules = CssHighlightRules;
450
+
451
+ });
452
+
453
+ 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) {
454
+
455
+
456
+ var oop = require("../lib/oop");
457
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
458
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
459
+
460
+ var JavaScriptHighlightRules = function() {
461
+ var keywordMapper = this.createKeywordMapper({
462
+ "variable.language":
463
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
464
+ "Namespace|QName|XML|XMLList|" + // E4X
465
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
466
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
467
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
468
+ "SyntaxError|TypeError|URIError|" +
469
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
470
+ "isNaN|parseFloat|parseInt|" +
471
+ "JSON|Math|" + // Other
472
+ "this|arguments|prototype|window|document" , // Pseudo
473
+ "keyword":
474
+ "const|yield|import|get|set|" +
475
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
476
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
477
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
478
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
479
+ "storage.type":
480
+ "const|let|var|function",
481
+ "constant.language":
482
+ "null|Infinity|NaN|undefined",
483
+ "support.function":
484
+ "alert",
485
+ "constant.language.boolean": "true|false"
486
+ }, "identifier");
487
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
488
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
489
+
490
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
491
+ "u[0-9a-fA-F]{4}|" + // unicode
492
+ "[0-2][0-7]{0,2}|" + // oct
493
+ "3[0-6][0-7]?|" + // oct
494
+ "37[0-7]?|" + // oct
495
+ "[4-7][0-7]?|" + //oct
496
+ ".)";
497
+
498
+ this.$rules = {
499
+ "no_regex" : [
500
+ {
501
+ token : "comment",
502
+ regex : "\\/\\/",
503
+ next : "line_comment"
504
+ },
505
+ DocCommentHighlightRules.getStartRule("doc-start"),
506
+ {
507
+ token : "comment", // multi line comment
508
+ regex : /\/\*/,
509
+ next : "comment"
510
+ }, {
511
+ token : "string",
512
+ regex : "'(?=.)",
513
+ next : "qstring"
514
+ }, {
515
+ token : "string",
516
+ regex : '"(?=.)',
517
+ next : "qqstring"
518
+ }, {
519
+ token : "constant.numeric", // hex
520
+ regex : /0[xX][0-9a-fA-F]+\b/
521
+ }, {
522
+ token : "constant.numeric", // float
523
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
524
+ }, {
525
+ token : [
526
+ "storage.type", "punctuation.operator", "support.function",
527
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
528
+ ],
529
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
530
+ next: "function_arguments"
531
+ }, {
532
+ token : [
533
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
534
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
535
+ ],
536
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
537
+ next: "function_arguments"
538
+ }, {
539
+ token : [
540
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
541
+ "text", "paren.lparen"
542
+ ],
543
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
544
+ next: "function_arguments"
545
+ }, {
546
+ token : [
547
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
548
+ "keyword.operator", "text",
549
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
550
+ ],
551
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
552
+ next: "function_arguments"
553
+ }, {
554
+ token : [
555
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
556
+ ],
557
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
558
+ next: "function_arguments"
559
+ }, {
560
+ token : [
561
+ "entity.name.function", "text", "punctuation.operator",
562
+ "text", "storage.type", "text", "paren.lparen"
563
+ ],
564
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
565
+ next: "function_arguments"
566
+ }, {
567
+ token : [
568
+ "text", "text", "storage.type", "text", "paren.lparen"
569
+ ],
570
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
571
+ next: "function_arguments"
572
+ }, {
573
+ token : "keyword",
574
+ regex : "(?:" + kwBeforeRe + ")\\b",
575
+ next : "start"
576
+ }, {
577
+ token : ["punctuation.operator", "support.function"],
578
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|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(?=\()/
579
+ }, {
580
+ token : ["punctuation.operator", "support.function.dom"],
581
+ 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(?=\()/
582
+ }, {
583
+ token : ["punctuation.operator", "support.constant"],
584
+ 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/
585
+ }, {
586
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
587
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
588
+ }, {
589
+ token : keywordMapper,
590
+ regex : identifierRe
591
+ }, {
592
+ token : "keyword.operator",
593
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
594
+ next : "start"
595
+ }, {
596
+ token : "punctuation.operator",
597
+ regex : /\?|\:|\,|\;|\./,
598
+ next : "start"
599
+ }, {
600
+ token : "paren.lparen",
601
+ regex : /[\[({]/,
602
+ next : "start"
603
+ }, {
604
+ token : "paren.rparen",
605
+ regex : /[\])}]/
606
+ }, {
607
+ token : "keyword.operator",
608
+ regex : /\/=?/,
609
+ next : "start"
610
+ }, {
611
+ token: "comment",
612
+ regex: /^#!.*$/
613
+ }
614
+ ],
615
+ "start": [
616
+ DocCommentHighlightRules.getStartRule("doc-start"),
617
+ {
618
+ token : "comment", // multi line comment
619
+ regex : "\\/\\*",
620
+ next : "comment_regex_allowed"
621
+ }, {
622
+ token : "comment",
623
+ regex : "\\/\\/",
624
+ next : "line_comment_regex_allowed"
625
+ }, {
626
+ token: "string.regexp",
627
+ regex: "\\/",
628
+ next: "regex"
629
+ }, {
630
+ token : "text",
631
+ regex : "\\s+|^$",
632
+ next : "start"
633
+ }, {
634
+ token: "empty",
635
+ regex: "",
636
+ next: "no_regex"
637
+ }
638
+ ],
639
+ "regex": [
640
+ {
641
+ token: "regexp.keyword.operator",
642
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
643
+ }, {
644
+ token: "string.regexp",
645
+ regex: "/[sxngimy]*",
646
+ next: "no_regex"
647
+ }, {
648
+ token : "invalid",
649
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
650
+ }, {
651
+ token : "constant.language.escape",
652
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
653
+ }, {
654
+ token : "constant.language.delimiter",
655
+ regex: /\|/
656
+ }, {
657
+ token: "constant.language.escape",
658
+ regex: /\[\^?/,
659
+ next: "regex_character_class"
660
+ }, {
661
+ token: "empty",
662
+ regex: "$",
663
+ next: "no_regex"
664
+ }, {
665
+ defaultToken: "string.regexp"
666
+ }
667
+ ],
668
+ "regex_character_class": [
669
+ {
670
+ token: "regexp.keyword.operator",
671
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
672
+ }, {
673
+ token: "constant.language.escape",
674
+ regex: "]",
675
+ next: "regex"
676
+ }, {
677
+ token: "constant.language.escape",
678
+ regex: "-"
679
+ }, {
680
+ token: "empty",
681
+ regex: "$",
682
+ next: "no_regex"
683
+ }, {
684
+ defaultToken: "string.regexp.charachterclass"
685
+ }
686
+ ],
687
+ "function_arguments": [
688
+ {
689
+ token: "variable.parameter",
690
+ regex: identifierRe
691
+ }, {
692
+ token: "punctuation.operator",
693
+ regex: "[, ]+"
694
+ }, {
695
+ token: "punctuation.operator",
696
+ regex: "$"
697
+ }, {
698
+ token: "empty",
699
+ regex: "",
700
+ next: "no_regex"
701
+ }
702
+ ],
703
+ "comment_regex_allowed" : [
704
+ {token : "comment", regex : "\\*\\/", next : "start"},
705
+ {defaultToken : "comment"}
706
+ ],
707
+ "comment" : [
708
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
709
+ {defaultToken : "comment"}
710
+ ],
711
+ "line_comment_regex_allowed" : [
712
+ {token : "comment", regex : "$|^", next : "start"},
713
+ {defaultToken : "comment"}
714
+ ],
715
+ "line_comment" : [
716
+ {token : "comment", regex : "$|^", next : "no_regex"},
717
+ {defaultToken : "comment"}
718
+ ],
719
+ "qqstring" : [
720
+ {
721
+ token : "constant.language.escape",
722
+ regex : escapedRe
723
+ }, {
724
+ token : "string",
725
+ regex : "\\\\$",
726
+ next : "qqstring"
727
+ }, {
728
+ token : "string",
729
+ regex : '"|$',
730
+ next : "no_regex"
731
+ }, {
732
+ defaultToken: "string"
733
+ }
734
+ ],
735
+ "qstring" : [
736
+ {
737
+ token : "constant.language.escape",
738
+ regex : escapedRe
739
+ }, {
740
+ token : "string",
741
+ regex : "\\\\$",
742
+ next : "qstring"
743
+ }, {
744
+ token : "string",
745
+ regex : "'|$",
746
+ next : "no_regex"
747
+ }, {
748
+ defaultToken: "string"
749
+ }
750
+ ]
751
+ };
752
+
753
+ this.embedRules(DocCommentHighlightRules, "doc-",
754
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
755
+ };
756
+
757
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
758
+
759
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
760
+ });
761
+
762
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
763
+
764
+
765
+ var oop = require("../lib/oop");
766
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
767
+
768
+ var DocCommentHighlightRules = function() {
769
+
770
+ this.$rules = {
771
+ "start" : [ {
772
+ token : "comment.doc.tag",
773
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
774
+ }, {
775
+ token : "comment.doc.tag",
776
+ regex : "\\bTODO\\b"
777
+ }, {
778
+ defaultToken : "comment.doc"
779
+ }]
780
+ };
781
+ };
782
+
783
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
784
+
785
+ DocCommentHighlightRules.getStartRule = function(start) {
786
+ return {
787
+ token : "comment.doc", // doc comment
788
+ regex : "\\/\\*(?=\\*)",
789
+ next : start
790
+ };
791
+ };
792
+
793
+ DocCommentHighlightRules.getEndRule = function (start) {
794
+ return {
795
+ token : "comment.doc", // closing comment
796
+ regex : "\\*\\/",
797
+ next : start
798
+ };
799
+ };
800
+
801
+
802
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
803
+
804
+ });
805
+
806
+ define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
807
+
808
+
809
+ var oop = require("../lib/oop");
810
+ var xmlUtil = require("./xml_util");
811
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
812
+
813
+ var XmlHighlightRules = function(normalize) {
814
+ this.$rules = {
815
+ start : [
816
+ {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
817
+ {
818
+ token : ["punctuation.instruction.begin", "keyword.instruction"],
819
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
820
+ },
821
+ {
822
+ token : ["punctuation.instruction.begin", "keyword.instruction"],
823
+ regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
824
+ },
825
+ {token : "comment", regex : "<\\!--", next : "comment"},
826
+ {
827
+ token : ["punctuation.doctype.begin", "meta.tag.doctype"],
828
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
829
+ },
830
+ {include : "tag"},
831
+ {include : "reference"}
832
+ ],
833
+
834
+ xml_declaration : [
835
+ {include : "attributes"},
836
+ {include : "instruction"}
837
+ ],
838
+
839
+ instruction : [
840
+ {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
841
+ ],
842
+
843
+ doctype : [
844
+ {include : "space"},
845
+ {include : "string"},
846
+ {token : "punctuation.doctype.end", regex : ">", next : "start"},
847
+ {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
848
+ {token : "punctuation.begin", regex : "\\[", push : "declarations"}
849
+ ],
850
+
851
+ declarations : [{
852
+ token : "text",
853
+ regex : "\\s+"
854
+ }, {
855
+ token: "punctuation.end",
856
+ regex: "]",
857
+ next: "pop"
858
+ }, {
859
+ token : ["punctuation.begin", "keyword"],
860
+ regex : "(<\\!)([-_a-zA-Z0-9]+)",
861
+ push : [{
862
+ token : "text",
863
+ regex : "\\s+"
864
+ },
865
+ {
866
+ token : "punctuation.end",
867
+ regex : ">",
868
+ next : "pop"
869
+ },
870
+ {include : "string"}]
871
+ }],
872
+
873
+ cdata : [
874
+ {token : "string.end", regex : "\\]\\]>", next : "start"},
875
+ {token : "text", regex : "\\s+"},
876
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
877
+ ],
878
+
879
+ comment : [
880
+ {token : "comment", regex : "-->", next : "start"},
881
+ {defaultToken : "comment"}
882
+ ],
883
+
884
+ tag : [{
885
+ token : ["meta.tag.punctuation.begin", "meta.tag.name"],
886
+ regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
887
+ next: [
888
+ {include : "attributes"},
889
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
890
+ ]
891
+ }, {
892
+ token : ["meta.tag.punctuation.begin", "meta.tag.name"],
893
+ regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
894
+ next: [
895
+ {include : "space"},
896
+ {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
897
+ ]
898
+ }],
899
+
900
+ space : [
901
+ {token : "text", regex : "\\s+"}
902
+ ],
903
+
904
+ reference : [{
905
+ token : "constant.language.escape",
906
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
907
+ }, {
908
+ token : "text", regex : "&"
909
+ }],
910
+
911
+ string: [{
912
+ token : "string",
913
+ regex : "'",
914
+ push : "qstring_inner"
915
+ }, {
916
+ token : "string",
917
+ regex : '"',
918
+ push : "qqstring_inner"
919
+ }],
920
+
921
+ qstring_inner: [
922
+ {token : "string", regex: "'", next: "pop"},
923
+ {include : "reference"},
924
+ {defaultToken : "string"}
925
+ ],
926
+
927
+ qqstring_inner: [
928
+ {token : "string", regex: '"', next: "pop"},
929
+ {include : "reference"},
930
+ {defaultToken : "string"}
931
+ ],
932
+
933
+ attributes: [{
934
+ token : "entity.other.attribute-name",
935
+ regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
936
+ }, {
937
+ token : "keyword.operator.separator",
938
+ regex : "="
939
+ }, {
940
+ include : "space"
941
+ }, {
942
+ include : "string"
943
+ }]
944
+ };
945
+
946
+ if (this.constructor === XmlHighlightRules)
947
+ this.normalizeRules();
948
+ };
949
+
950
+
951
+ (function() {
952
+
953
+ this.embedTagRules = function(HighlightRules, prefix, tag){
954
+ this.$rules.tag.unshift({
955
+ token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
956
+ regex : "(<)(" + tag + ")",
957
+ next: [
958
+ {include : "space"},
959
+ {include : "attributes"},
960
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
961
+ ]
962
+ });
963
+
964
+ this.$rules[tag + "-end"] = [
965
+ {include : "space"},
966
+ {token : "meta.tag.punctuation.end", regex : ">", next: "start",
967
+ onMatch : function(value, currentState, stack) {
968
+ stack.splice(0);
969
+ return this.token;
970
+ }}
971
+ ]
972
+
973
+ this.embedRules(HighlightRules, prefix, [{
974
+ token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
975
+ regex : "(</)(" + tag + ")",
976
+ next: tag + "-end"
977
+ }, {
978
+ token: "string.begin",
979
+ regex : "<\\!\\[CDATA\\["
980
+ }, {
981
+ token: "string.end",
982
+ regex : "\\]\\]>"
983
+ }]);
984
+ };
985
+
986
+ }).call(TextHighlightRules.prototype);
987
+
988
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
989
+
990
+ exports.XmlHighlightRules = XmlHighlightRules;
991
+ });
992
+
993
+ define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
994
+
995
+
996
+ function string(state) {
997
+ return [{
998
+ token : "string",
999
+ regex : '"',
1000
+ next : state + "_qqstring"
1001
+ }, {
1002
+ token : "string",
1003
+ regex : "'",
1004
+ next : state + "_qstring"
1005
+ }];
1006
+ }
1007
+
1008
+ function multiLineString(quote, state) {
1009
+ return [
1010
+ {token : "string", regex : quote, next : state},
1011
+ {
1012
+ token : "constant.language.escape",
1013
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1014
+ },
1015
+ {defaultToken : "string"}
1016
+ ];
1017
+ }
1018
+
1019
+ exports.tag = function(states, name, nextState, tagMap) {
1020
+ states[name] = [{
1021
+ token : "text",
1022
+ regex : "\\s+"
1023
+ }, {
1024
+
1025
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
1026
+ if (tagMap[value])
1027
+ return "meta.tag.tag-name." + tagMap[value];
1028
+ else
1029
+ return "meta.tag.tag-name";
1030
+ },
1031
+ regex : "[-_a-zA-Z0-9:]+",
1032
+ next : name + "_embed_attribute_list"
1033
+ }, {
1034
+ token: "empty",
1035
+ regex: "",
1036
+ next : name + "_embed_attribute_list"
1037
+ }];
1038
+
1039
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
1040
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
1041
+
1042
+ states[name + "_embed_attribute_list"] = [{
1043
+ token : "meta.tag.r",
1044
+ regex : "/?>",
1045
+ next : nextState
1046
+ }, {
1047
+ token : "keyword.operator",
1048
+ regex : "="
1049
+ }, {
1050
+ token : "entity.other.attribute-name",
1051
+ regex : "[-_a-zA-Z0-9:]+"
1052
+ }, {
1053
+ token : "constant.numeric", // float
1054
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1055
+ }, {
1056
+ token : "text",
1057
+ regex : "\\s+"
1058
+ }].concat(string(name));
1059
+ };
1060
+
1061
+ });