ace-rails-ap 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. data/.gitmodules +3 -0
  2. data/lib/ace/rails/version.rb +1 -1
  3. data/update.sh +3 -0
  4. data/vendor/assets/javascripts/ace-compat-noconflict.js +1 -0
  5. data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +480 -0
  6. data/vendor/assets/javascripts/ace-compat-uncompressed.js +480 -0
  7. data/vendor/assets/javascripts/ace-compat.js +1 -0
  8. data/vendor/assets/javascripts/ace-noconflict.js +10 -0
  9. data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +19976 -0
  10. data/vendor/assets/javascripts/ace-uncompressed.js +6568 -998
  11. data/vendor/assets/javascripts/ace.js +1 -1
  12. data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +1 -0
  13. data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +150 -0
  14. data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +150 -0
  15. data/vendor/assets/javascripts/keybinding-emacs.js +1 -1
  16. data/vendor/assets/javascripts/keybinding-vim-noconflict.js +1 -0
  17. data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +138 -0
  18. data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +138 -0
  19. data/vendor/assets/javascripts/keybinding-vim.js +1 -1
  20. data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +1 -0
  21. data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +919 -0
  22. data/vendor/assets/javascripts/mode-c_cpp-uncompressed.js +919 -0
  23. data/vendor/assets/javascripts/mode-c_cpp.js +1 -1
  24. data/vendor/assets/javascripts/mode-clojure-noconflict.js +1 -0
  25. data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +422 -0
  26. data/vendor/assets/javascripts/mode-clojure-uncompressed.js +422 -0
  27. data/vendor/assets/javascripts/mode-clojure.js +1 -1
  28. data/vendor/assets/javascripts/mode-coffee-noconflict.js +1 -0
  29. data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +607 -0
  30. data/vendor/assets/javascripts/mode-coffee-uncompressed.js +607 -0
  31. data/vendor/assets/javascripts/mode-coffee.js +1 -1
  32. data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +1 -0
  33. data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +2458 -0
  34. data/vendor/assets/javascripts/mode-coldfusion-uncompressed.js +2458 -0
  35. data/vendor/assets/javascripts/mode-coldfusion.js +1 -0
  36. data/vendor/assets/javascripts/mode-csharp-noconflict.js +1 -0
  37. data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +769 -0
  38. data/vendor/assets/javascripts/mode-csharp-uncompressed.js +769 -0
  39. data/vendor/assets/javascripts/mode-csharp.js +1 -1
  40. data/vendor/assets/javascripts/mode-css-noconflict.js +1 -0
  41. data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +641 -0
  42. data/vendor/assets/javascripts/mode-css-uncompressed.js +641 -0
  43. data/vendor/assets/javascripts/mode-css.js +1 -1
  44. data/vendor/assets/javascripts/mode-golang-noconflict.js +1 -0
  45. data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +378 -0
  46. data/vendor/assets/javascripts/mode-golang-uncompressed.js +378 -0
  47. data/vendor/assets/javascripts/mode-golang.js +1 -0
  48. data/vendor/assets/javascripts/mode-groovy-noconflict.js +1 -0
  49. data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +1393 -0
  50. data/vendor/assets/javascripts/mode-groovy-uncompressed.js +1393 -0
  51. data/vendor/assets/javascripts/mode-groovy.js +1 -1
  52. data/vendor/assets/javascripts/mode-haxe-noconflict.js +1 -0
  53. data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +769 -0
  54. data/vendor/assets/javascripts/mode-haxe-uncompressed.js +769 -0
  55. data/vendor/assets/javascripts/mode-haxe.js +1 -0
  56. data/vendor/assets/javascripts/mode-html-noconflict.js +1 -0
  57. data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +2475 -0
  58. data/vendor/assets/javascripts/mode-html-uncompressed.js +2475 -0
  59. data/vendor/assets/javascripts/mode-html.js +1 -1
  60. data/vendor/assets/javascripts/mode-java-noconflict.js +1 -0
  61. data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +1395 -0
  62. data/vendor/assets/javascripts/mode-java-uncompressed.js +1395 -0
  63. data/vendor/assets/javascripts/mode-java.js +1 -1
  64. data/vendor/assets/javascripts/mode-javascript-noconflict.js +1 -0
  65. data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +1226 -0
  66. data/vendor/assets/javascripts/mode-javascript-uncompressed.js +1226 -0
  67. data/vendor/assets/javascripts/mode-javascript.js +1 -1
  68. data/vendor/assets/javascripts/mode-json-noconflict.js +1 -0
  69. data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +701 -0
  70. data/vendor/assets/javascripts/mode-json-uncompressed.js +701 -0
  71. data/vendor/assets/javascripts/mode-json.js +1 -1
  72. data/vendor/assets/javascripts/mode-latex-noconflict.js +1 -0
  73. data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +95 -0
  74. data/vendor/assets/javascripts/mode-latex-uncompressed.js +95 -0
  75. data/vendor/assets/javascripts/mode-less-noconflict.js +1 -0
  76. data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +655 -0
  77. data/vendor/assets/javascripts/mode-less-uncompressed.js +655 -0
  78. data/vendor/assets/javascripts/mode-less.js +1 -0
  79. data/vendor/assets/javascripts/mode-liquid-noconflict.js +1 -0
  80. data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +1353 -0
  81. data/vendor/assets/javascripts/mode-liquid-uncompressed.js +1353 -0
  82. data/vendor/assets/javascripts/mode-liquid.js +1 -0
  83. data/vendor/assets/javascripts/mode-lua-noconflict.js +1 -0
  84. data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +523 -0
  85. data/vendor/assets/javascripts/mode-lua-uncompressed.js +523 -0
  86. data/vendor/assets/javascripts/mode-markdown-noconflict.js +1 -0
  87. data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +2925 -0
  88. data/vendor/assets/javascripts/mode-markdown-uncompressed.js +2925 -0
  89. data/vendor/assets/javascripts/mode-markdown.js +1 -1
  90. data/vendor/assets/javascripts/mode-ocaml-noconflict.js +1 -0
  91. data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +539 -0
  92. data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +539 -0
  93. data/vendor/assets/javascripts/mode-ocaml.js +1 -1
  94. data/vendor/assets/javascripts/mode-perl-noconflict.js +1 -0
  95. data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +574 -0
  96. data/vendor/assets/javascripts/mode-perl-uncompressed.js +574 -0
  97. data/vendor/assets/javascripts/mode-perl.js +1 -1
  98. data/vendor/assets/javascripts/mode-pgsql-noconflict.js +1 -0
  99. data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +1104 -0
  100. data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +1104 -0
  101. data/vendor/assets/javascripts/mode-pgsql.js +1 -0
  102. data/vendor/assets/javascripts/mode-php-noconflict.js +1 -0
  103. data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +1885 -0
  104. data/vendor/assets/javascripts/mode-php-uncompressed.js +1885 -0
  105. data/vendor/assets/javascripts/mode-php.js +1 -1
  106. data/vendor/assets/javascripts/mode-powershell-noconflict.js +1 -0
  107. data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +710 -0
  108. data/vendor/assets/javascripts/mode-powershell-uncompressed.js +710 -0
  109. data/vendor/assets/javascripts/mode-powershell.js +1 -0
  110. data/vendor/assets/javascripts/mode-python-noconflict.js +1 -0
  111. data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +507 -0
  112. data/vendor/assets/javascripts/mode-python-uncompressed.js +507 -0
  113. data/vendor/assets/javascripts/mode-python.js +1 -1
  114. data/vendor/assets/javascripts/mode-ruby-noconflict.js +1 -0
  115. data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +391 -0
  116. data/vendor/assets/javascripts/mode-ruby-uncompressed.js +391 -0
  117. data/vendor/assets/javascripts/mode-ruby.js +1 -1
  118. data/vendor/assets/javascripts/mode-scad-noconflict.js +1 -0
  119. data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +907 -0
  120. data/vendor/assets/javascripts/mode-scad-uncompressed.js +907 -0
  121. data/vendor/assets/javascripts/mode-scad.js +1 -1
  122. data/vendor/assets/javascripts/mode-scala-noconflict.js +1 -0
  123. data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +1395 -0
  124. data/vendor/assets/javascripts/mode-scala-uncompressed.js +1395 -0
  125. data/vendor/assets/javascripts/mode-scala.js +1 -1
  126. data/vendor/assets/javascripts/mode-scss-noconflict.js +1 -0
  127. data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +679 -0
  128. data/vendor/assets/javascripts/mode-scss-uncompressed.js +679 -0
  129. data/vendor/assets/javascripts/mode-scss.js +1 -1
  130. data/vendor/assets/javascripts/mode-sh-noconflict.js +1 -0
  131. data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +289 -0
  132. data/vendor/assets/javascripts/mode-sh-uncompressed.js +289 -0
  133. data/vendor/assets/javascripts/mode-sh.js +1 -0
  134. data/vendor/assets/javascripts/mode-sql-noconflict.js +1 -0
  135. data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +159 -0
  136. data/vendor/assets/javascripts/mode-sql-uncompressed.js +159 -0
  137. data/vendor/assets/javascripts/mode-sql.js +1 -0
  138. data/vendor/assets/javascripts/mode-svg-noconflict.js +1 -0
  139. data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +2137 -0
  140. data/vendor/assets/javascripts/mode-svg-uncompressed.js +2137 -0
  141. data/vendor/assets/javascripts/mode-svg.js +1 -1
  142. data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
  143. data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
  144. data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
  145. data/vendor/assets/javascripts/mode-text.js +0 -0
  146. data/vendor/assets/javascripts/mode-textile-noconflict.js +1 -0
  147. data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +254 -0
  148. data/vendor/assets/javascripts/mode-textile-uncompressed.js +254 -0
  149. data/vendor/assets/javascripts/mode-textile.js +1 -1
  150. data/vendor/assets/javascripts/mode-xml-noconflict.js +1 -0
  151. data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +1012 -0
  152. data/vendor/assets/javascripts/mode-xml-uncompressed.js +1012 -0
  153. data/vendor/assets/javascripts/mode-xml.js +1 -1
  154. data/vendor/assets/javascripts/mode-xquery-noconflict.js +1 -0
  155. data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +540 -0
  156. data/vendor/assets/javascripts/mode-xquery-uncompressed.js +540 -0
  157. data/vendor/assets/javascripts/mode-xquery.js +1 -0
  158. data/vendor/assets/javascripts/theme-chrome-noconflict.js +1 -0
  159. data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +207 -0
  160. data/vendor/assets/javascripts/theme-chrome-uncompressed.js +207 -0
  161. data/vendor/assets/javascripts/theme-chrome.js +1 -0
  162. data/vendor/assets/javascripts/theme-clouds-noconflict.js +1 -0
  163. data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +160 -0
  164. data/vendor/assets/javascripts/theme-clouds-uncompressed.js +160 -0
  165. data/vendor/assets/javascripts/theme-clouds.js +1 -1
  166. data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +1 -0
  167. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +161 -0
  168. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +161 -0
  169. data/vendor/assets/javascripts/theme-clouds_midnight.js +1 -1
  170. data/vendor/assets/javascripts/theme-cobalt-noconflict.js +1 -0
  171. data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +187 -0
  172. data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +187 -0
  173. data/vendor/assets/javascripts/theme-cobalt.js +1 -1
  174. data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +1 -0
  175. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +198 -0
  176. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +198 -0
  177. data/vendor/assets/javascripts/theme-dawn-noconflict.js +1 -0
  178. data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +191 -0
  179. data/vendor/assets/javascripts/theme-dawn-uncompressed.js +191 -0
  180. data/vendor/assets/javascripts/theme-dawn.js +1 -1
  181. data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +1 -0
  182. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +227 -0
  183. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +227 -0
  184. data/vendor/assets/javascripts/theme-dreamweaver.js +1 -0
  185. data/vendor/assets/javascripts/theme-eclipse-noconflict.js +1 -0
  186. data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +147 -0
  187. data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +147 -0
  188. data/vendor/assets/javascripts/theme-eclipse.js +1 -1
  189. data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +1 -0
  190. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +179 -0
  191. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +179 -0
  192. data/vendor/assets/javascripts/theme-idle_fingers.js +1 -1
  193. data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +1 -0
  194. data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +182 -0
  195. data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +182 -0
  196. data/vendor/assets/javascripts/theme-kr_theme.js +1 -1
  197. data/vendor/assets/javascripts/theme-merbivore-noconflict.js +1 -0
  198. data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +182 -0
  199. data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +182 -0
  200. data/vendor/assets/javascripts/theme-merbivore.js +1 -1
  201. data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +1 -0
  202. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +188 -0
  203. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +188 -0
  204. data/vendor/assets/javascripts/theme-merbivore_soft.js +1 -1
  205. data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +1 -0
  206. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +190 -0
  207. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +190 -0
  208. data/vendor/assets/javascripts/theme-mono_industrial.js +1 -1
  209. data/vendor/assets/javascripts/theme-monokai-noconflict.js +1 -0
  210. data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +191 -0
  211. data/vendor/assets/javascripts/theme-monokai-uncompressed.js +191 -0
  212. data/vendor/assets/javascripts/theme-monokai.js +1 -1
  213. data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +1 -0
  214. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +192 -0
  215. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +192 -0
  216. data/vendor/assets/javascripts/theme-pastel_on_dark.js +1 -1
  217. data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +1 -0
  218. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +176 -0
  219. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +176 -0
  220. data/vendor/assets/javascripts/theme-solarized_dark.js +1 -1
  221. data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +1 -0
  222. data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +172 -0
  223. data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +172 -0
  224. data/vendor/assets/javascripts/theme-solarized_light.js +1 -1
  225. data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
  226. data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
  227. data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
  228. data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +1 -0
  229. data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +206 -0
  230. data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +206 -0
  231. data/vendor/assets/javascripts/theme-tomorrow.js +1 -1
  232. data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +1 -0
  233. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +206 -0
  234. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +206 -0
  235. data/vendor/assets/javascripts/theme-tomorrow_night.js +1 -1
  236. data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +1 -0
  237. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +209 -0
  238. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +209 -0
  239. data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +1 -1
  240. data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +1 -0
  241. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +206 -0
  242. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +206 -0
  243. data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +1 -1
  244. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +1 -0
  245. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +202 -0
  246. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +202 -0
  247. data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +1 -1
  248. data/vendor/assets/javascripts/theme-twilight-noconflict.js +1 -0
  249. data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +204 -0
  250. data/vendor/assets/javascripts/theme-twilight-uncompressed.js +204 -0
  251. data/vendor/assets/javascripts/theme-twilight.js +1 -1
  252. data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +1 -0
  253. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +183 -0
  254. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +183 -0
  255. data/vendor/assets/javascripts/theme-vibrant_ink.js +1 -1
  256. data/vendor/assets/javascripts/worker-coffee.js +2367 -1425
  257. data/vendor/assets/javascripts/worker-css.js +3271 -582
  258. data/vendor/assets/javascripts/worker-javascript.js +4313 -2934
  259. data/vendor/assets/javascripts/worker-json.js +3597 -0
  260. metadata +225 -7
@@ -0,0 +1 @@
1
+ define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./less_highlight_rules").LessHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./folding/cstyle").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap(function(){var a="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),b="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),c="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),d=[];for(var e=0,f=a.length;e<f;e++)Array.prototype.push.apply(d,(a[e]+b.join("|"+a[e])).split("|"));return Array.prototype.push.apply(d,b),Array.prototype.push.apply(d,c),d}()),b=e.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|hue|saturation|lightness|alpha|round|ceil|floor|percentage|color|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f=e.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare|when|not|and".split("|")),g=e.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|")),h="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:h+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:h},{token:function(a){return f.hasOwnProperty(a)?"keyword":"variable"},regex:"@[a-z0-9_\\-@]*\\b"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":f.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":b.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":g.hasOwnProperty(e.toLowerCase())?"variable.language":"text"},regex:"\\-?[@a-z_][@a-z0-9_\\-]*"},{token:"variable.language",regex:"#[a-z0-9-_]+"},{token:"variable.language",regex:"\\.[a-z0-9-_]+"},{token:"variable.language",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{token:"keyword.operator",regex:"<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.LessHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)})
@@ -0,0 +1 @@
1
+ ace.define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./liquid_highlight_rules").LiquidHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),ace.define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/lang","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("../lib/lang"),h=a("./xml_util"),i=a("./text_highlight_rules").TextHighlightRules,j=function(){var a=g.arrayToMap("date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split".split("|")),b=g.arrayToMap("capture|endcapture|case|endcase|when|comment|endcomment|cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow".split("|")),c=g.arrayToMap(["forloop"]),d=g.arrayToMap("assign".split("|"));this.$rules={start:[{token:"variable",regex:"{%",next:"liquid_start"},{token:"variable",regex:"{{",next:"liquid_start"},{token:"meta.tag",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=\\s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=\\s*style\\b)",next:"style"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}],liquid_start:[{token:"variable",regex:"}}",next:"start"},{token:"variable",regex:"%}",next:"start"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return a.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"variable.language":d.hasOwnProperty(e)?"keyword.definition":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"/|\\*|\\-|\\+|=|!=|\\?\\:"},{token:"paren.lparen",regex:/[\[\({]/},{token:"paren.rparen",regex:/[\])}]/},{token:"text",regex:"\\s+"}]},h.tag(this.$rules,"tag","start"),h.tag(this.$rules,"style","css-start"),h.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(j,i),b.LiquidHighlightRules=j}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("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|font-size|font|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|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f=e.arrayToMap("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace".split("|")),g="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i="(:)\\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",j=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+g+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:["constant.numeric"],regex:"([0-9]+)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":f.hasOwnProperty(e.toLowerCase())?"support.constant.fonts":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],k=e.copyArray(j);k.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var l=e.copyArray(j);l.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var m=[{token:"comment",merge:!0,regex:".+"}],n=e.copyArray(m);n.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var o=e.copyArray(m);o.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var p=e.copyArray(m);p.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:n,ruleset:k,ruleset_comment:p,media_ruleset:l,media_comment:o}};d.inherits(g,f),b.CssHighlightRules=g}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],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(?=\()/},{token:["punctuation.operator","support.constant"],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/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"storage.type":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:k},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(g,"doc-",[g.getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),ace.define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"_qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"_qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:]+",next:b+"_embed_attribute_list"},{token:"empty",regex:"",next:b+"_embed_attribute_list"}],a[b+"_qstring"]=h("'",b+"_embed_attribute_list"),a[b+"_qqstring"]=h('"',b+"_embed_attribute_list"),a[b+"_embed_attribute_list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e})
@@ -0,0 +1,1353 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3
+ *
4
+ * The contents of this file are subject to the Mozilla Public License Version
5
+ * 1.1 (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ * http://www.mozilla.org/MPL/
8
+ *
9
+ * Software distributed under the License is distributed on an "AS IS" basis,
10
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
+ * for the specific language governing rights and limitations under the
12
+ * License.
13
+ *
14
+ * The Original Code is Ajax.org Code Editor (ACE).
15
+ *
16
+ * The Initial Developer of the Original Code is
17
+ * Ajax.org B.V.
18
+ * Portions created by the Initial Developer are Copyright (C) 2010
19
+ * the Initial Developer. All Rights Reserved.
20
+ *
21
+ * Contributor(s):
22
+ * Fabian Jakobs <fabian AT ajax DOT org>
23
+ *
24
+ * Alternatively, the contents of this file may be used under the terms of
25
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
26
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
+ * in which case the provisions of the GPL or the LGPL are applicable instead
28
+ * of those above. If you wish to allow use of your version of this file only
29
+ * under the terms of either the GPL or the LGPL, and not to allow others to
30
+ * use your version of this file under the terms of the MPL, indicate your
31
+ * decision by deleting the provisions above and replace them with the notice
32
+ * and other provisions required by the GPL or the LGPL. If you do not delete
33
+ * the provisions above, a recipient may use your version of this file under
34
+ * the terms of any one of the MPL, the GPL or the LGPL.
35
+ *
36
+ * ***** END LICENSE BLOCK ***** */
37
+
38
+ ace.define('ace/mode/liquid', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/liquid_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
39
+
40
+ var oop = require("../lib/oop");
41
+ var TextMode = require("./text").Mode;
42
+ var Tokenizer = require("../tokenizer").Tokenizer;
43
+ var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules;
44
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
45
+ var Range = require("../range").Range;
46
+
47
+ var Mode = function() {
48
+ this.$tokenizer = new Tokenizer(new LiquidHighlightRules().getRules());
49
+ this.$outdent = new MatchingBraceOutdent();
50
+ };
51
+ oop.inherits(Mode, TextMode);
52
+
53
+ (function() {
54
+
55
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
56
+ var outdent = true;
57
+ var outentedRows = [];
58
+ var re = /^(\s*)#/;
59
+
60
+ for (var i=startRow; i<= endRow; i++) {
61
+ if (!re.test(doc.getLine(i))) {
62
+ outdent = false;
63
+ break;
64
+ }
65
+ }
66
+
67
+ if (outdent) {
68
+ var deleteRange = new Range(0, 0, 0, 0);
69
+ for (var i=startRow; i<= endRow; i++)
70
+ {
71
+ var line = doc.getLine(i);
72
+ var m = line.match(re);
73
+ deleteRange.start.row = i;
74
+ deleteRange.end.row = i;
75
+ deleteRange.end.column = m[0].length;
76
+ doc.replace(deleteRange, m[1]);
77
+ }
78
+ }
79
+ else {
80
+ doc.indentRows(startRow, endRow, "#");
81
+ }
82
+ };
83
+
84
+ this.getNextLineIndent = function(state, line, tab) {
85
+ var indent = this.$getIndent(line);
86
+
87
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
88
+ var tokens = tokenizedLine.tokens;
89
+ var endState = tokenizedLine.state;
90
+
91
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
92
+ return indent;
93
+ }
94
+
95
+ if (state == "start") {
96
+ var match = line.match(/^.*[\{\(\[]\s*$/);
97
+ if (match) {
98
+ indent += tab;
99
+ }
100
+ }
101
+
102
+ return indent;
103
+ };
104
+
105
+ this.checkOutdent = function(state, line, input) {
106
+ return this.$outdent.checkOutdent(line, input);
107
+ };
108
+
109
+ this.autoOutdent = function(state, doc, row) {
110
+ this.$outdent.autoOutdent(doc, row);
111
+ };
112
+
113
+ }).call(Mode.prototype);
114
+
115
+ exports.Mode = Mode;
116
+ });
117
+ /* ***** BEGIN LICENSE BLOCK *****
118
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
119
+ *
120
+ * The contents of this file are subject to the Mozilla Public License Version
121
+ * 1.1 (the "License"); you may not use this file except in compliance with
122
+ * the License. You may obtain a copy of the License at
123
+ * http://www.mozilla.org/MPL/
124
+ *
125
+ * Software distributed under the License is distributed on an "AS IS" basis,
126
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
127
+ * for the specific language governing rights and limitations under the
128
+ * License.
129
+ *
130
+ * The Original Code is Ajax.org Code Editor (ACE).
131
+ *
132
+ * The Initial Developer of the Original Code is
133
+ * Ajax.org B.V.
134
+ * Portions created by the Initial Developer are Copyright (C) 2010
135
+ * the Initial Developer. All Rights Reserved.
136
+ *
137
+ * Contributor(s):
138
+ * Fabian Jakobs <fabian AT ajax DOT org>
139
+ *
140
+ * Alternatively, the contents of this file may be used under the terms of
141
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
142
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
143
+ * in which case the provisions of the GPL or the LGPL are applicable instead
144
+ * of those above. If you wish to allow use of your version of this file only
145
+ * under the terms of either the GPL or the LGPL, and not to allow others to
146
+ * use your version of this file under the terms of the MPL, indicate your
147
+ * decision by deleting the provisions above and replace them with the notice
148
+ * and other provisions required by the GPL or the LGPL. If you do not delete
149
+ * the provisions above, a recipient may use your version of this file under
150
+ * the terms of any one of the MPL, the GPL or the LGPL.
151
+ *
152
+ * ***** END LICENSE BLOCK ***** */
153
+
154
+ ace.define('ace/mode/liquid_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/lib/lang', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
155
+ "use strict";
156
+
157
+ var oop = require("../lib/oop");
158
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
159
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
160
+ var lang = require("../lib/lang");
161
+ var xmlUtil = require("./xml_util");
162
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
163
+
164
+ var LiquidHighlightRules = function() {
165
+
166
+ // see: https://developer.mozilla.org/en/Liquid/Reference/Global_Objects
167
+ var functions = lang.arrayToMap(
168
+ // Standard Filters
169
+ ("date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" +
170
+ "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" +
171
+ "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split"
172
+ ).split("|")
173
+ );
174
+
175
+ var keywords = lang.arrayToMap(
176
+ // Standard Tags
177
+ ("capture|endcapture|case|endcase|when|comment|endcomment|" +
178
+ "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" +
179
+ // Commonly used tags
180
+ "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow").split("|")
181
+ );
182
+
183
+ var builtinVariables = lang.arrayToMap(
184
+ ['forloop']
185
+ // ("forloop\\.(length|index|index0|rindex|rindex0|first|last)|limit|offset|range" +
186
+ // "tablerowloop\\.(length|index|index0|rindex|rindex0|first|last|col|col0|"+
187
+ // "col_first|col_last)").split("|")
188
+ );
189
+
190
+ var definitions = lang.arrayToMap(("assign").split("|"));
191
+
192
+ // regexp must not have capturing parentheses. Use (?:) instead.
193
+ // regexps are ordered -> the first match is used
194
+
195
+ this.$rules = {
196
+ start : [{
197
+ token : "variable",
198
+ regex : "{%",
199
+ next : "liquid_start"
200
+ }, {
201
+ token : "variable",
202
+ regex : "{{",
203
+ next : "liquid_start"
204
+ }, {
205
+ token : "meta.tag",
206
+ merge : true,
207
+ regex : "<\\!\\[CDATA\\[",
208
+ next : "cdata"
209
+ }, {
210
+ token : "xml_pe",
211
+ regex : "<\\?.*?\\?>"
212
+ }, {
213
+ token : "comment",
214
+ merge : true,
215
+ regex : "<\\!--",
216
+ next : "comment"
217
+ }, {
218
+ token : "meta.tag",
219
+ regex : "<(?=\\s*script\\b)",
220
+ next : "script"
221
+ }, {
222
+ token : "meta.tag",
223
+ regex : "<(?=\\s*style\\b)",
224
+ next : "style"
225
+ }, {
226
+ token : "meta.tag", // opening tag
227
+ regex : "<\\/?",
228
+ next : "tag"
229
+ }, {
230
+ token : "text",
231
+ regex : "\\s+"
232
+ }, {
233
+ token : "text",
234
+ regex : "[^<]+"
235
+ } ],
236
+
237
+ cdata : [ {
238
+ token : "text",
239
+ regex : "\\]\\]>",
240
+ next : "start"
241
+ }, {
242
+ token : "text",
243
+ merge : true,
244
+ regex : "\\s+"
245
+ }, {
246
+ token : "text",
247
+ merge : true,
248
+ regex : ".+"
249
+ } ],
250
+
251
+ comment : [ {
252
+ token : "comment",
253
+ regex : ".*?-->",
254
+ next : "start"
255
+ }, {
256
+ token : "comment",
257
+ merge : true,
258
+ regex : ".+"
259
+ } ] ,
260
+
261
+ liquid_start : [{
262
+ token: "variable",
263
+ regex: "}}",
264
+ next: "start"
265
+ }, {
266
+ token: "variable",
267
+ regex: "%}",
268
+ next: "start"
269
+ }, {
270
+ token : "string", // single line
271
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
272
+ }, {
273
+ token : "string", // single line
274
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
275
+ }, {
276
+ token : "constant.numeric", // hex
277
+ regex : "0[xX][0-9a-fA-F]+\\b"
278
+ }, {
279
+ token : "constant.numeric", // float
280
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
281
+ }, {
282
+ token : "constant.language.boolean",
283
+ regex : "(?:true|false)\\b"
284
+ }, {
285
+ token : function(value) {
286
+ if (functions.hasOwnProperty(value))
287
+ return "support.function";
288
+ else if (keywords.hasOwnProperty(value))
289
+ return "keyword";
290
+ else if (builtinVariables.hasOwnProperty(value))
291
+ return "variable.language";
292
+ else if (definitions.hasOwnProperty(value))
293
+ return "keyword.definition";
294
+ else
295
+ return "identifier";
296
+ },
297
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
298
+ }, {
299
+ token : "keyword.operator",
300
+ regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:"
301
+ }, {
302
+ token : "paren.lparen",
303
+ regex : /[\[\({]/
304
+ }, {
305
+ token : "paren.rparen",
306
+ regex : /[\])}]/
307
+ }, {
308
+ token : "text",
309
+ regex : "\\s+"
310
+ }]
311
+ };
312
+
313
+ xmlUtil.tag(this.$rules, "tag", "start");
314
+ xmlUtil.tag(this.$rules, "style", "css-start");
315
+ xmlUtil.tag(this.$rules, "script", "js-start");
316
+
317
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
318
+ token: "comment",
319
+ regex: "\\/\\/.*(?=<\\/script>)",
320
+ next: "tag"
321
+ }, {
322
+ token: "meta.tag",
323
+ regex: "<\\/(?=script)",
324
+ next: "tag"
325
+ }]);
326
+
327
+ this.embedRules(CssHighlightRules, "css-", [{
328
+ token: "meta.tag",
329
+ regex: "<\\/(?=style)",
330
+ next: "tag"
331
+ }]);
332
+ };
333
+ oop.inherits(LiquidHighlightRules, TextHighlightRules);
334
+
335
+ exports.LiquidHighlightRules = LiquidHighlightRules;
336
+ });
337
+ /* ***** BEGIN LICENSE BLOCK *****
338
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
339
+ *
340
+ * The contents of this file are subject to the Mozilla Public License Version
341
+ * 1.1 (the "License"); you may not use this file except in compliance with
342
+ * the License. You may obtain a copy of the License at
343
+ * http://www.mozilla.org/MPL/
344
+ *
345
+ * Software distributed under the License is distributed on an "AS IS" basis,
346
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
347
+ * for the specific language governing rights and limitations under the
348
+ * License.
349
+ *
350
+ * The Original Code is Ajax.org Code Editor (ACE).
351
+ *
352
+ * The Initial Developer of the Original Code is
353
+ * Ajax.org B.V.
354
+ * Portions created by the Initial Developer are Copyright (C) 2010
355
+ * the Initial Developer. All Rights Reserved.
356
+ *
357
+ * Contributor(s):
358
+ * Fabian Jakobs <fabian AT ajax DOT org>
359
+ *
360
+ * Alternatively, the contents of this file may be used under the terms of
361
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
362
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
363
+ * in which case the provisions of the GPL or the LGPL are applicable instead
364
+ * of those above. If you wish to allow use of your version of this file only
365
+ * under the terms of either the GPL or the LGPL, and not to allow others to
366
+ * use your version of this file under the terms of the MPL, indicate your
367
+ * decision by deleting the provisions above and replace them with the notice
368
+ * and other provisions required by the GPL or the LGPL. If you do not delete
369
+ * the provisions above, a recipient may use your version of this file under
370
+ * the terms of any one of the MPL, the GPL or the LGPL.
371
+ *
372
+ * ***** END LICENSE BLOCK ***** */
373
+
374
+ ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
375
+ "use strict";
376
+
377
+ var oop = require("../lib/oop");
378
+ var lang = require("../lib/lang");
379
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
380
+
381
+ var CssHighlightRules = function() {
382
+
383
+ var properties = lang.arrayToMap(
384
+ ("animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index").split("|")
385
+ );
386
+
387
+ var functions = lang.arrayToMap(
388
+ ("rgb|rgba|url|attr|counter|counters").split("|")
389
+ );
390
+
391
+ var constants = lang.arrayToMap(
392
+ ("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|font-size|font|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|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero").split("|")
393
+ );
394
+
395
+ var colors = lang.arrayToMap(
396
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
397
+ "purple|red|silver|teal|white|yellow").split("|")
398
+ );
399
+
400
+ var fonts = lang.arrayToMap(
401
+ ("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|" +
402
+ "symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|" +
403
+ "serif|monospace").split("|")
404
+ );
405
+
406
+ // regexp must not have capturing parentheses. Use (?:) instead.
407
+ // regexps are ordered -> the first match is used
408
+
409
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
410
+ var pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
411
+ var 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";
412
+
413
+ var base_ruleset = [
414
+ {
415
+ token : "comment", // multi line comment
416
+ merge : true,
417
+ regex : "\\/\\*",
418
+ next : "ruleset_comment"
419
+ }, {
420
+ token : "string", // single line
421
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
422
+ }, {
423
+ token : "string", // single line
424
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
425
+ }, {
426
+ token : ["constant.numeric", "keyword"],
427
+ 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|%)"
428
+ }, {
429
+ token : ["constant.numeric"],
430
+ regex : "([0-9]+)"
431
+ }, {
432
+ token : "constant.numeric", // hex6 color
433
+ regex : "#[a-f0-9]{6}"
434
+ }, {
435
+ token : "constant.numeric", // hex3 color
436
+ regex : "#[a-f0-9]{3}"
437
+ }, {
438
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
439
+ regex : pseudoElements
440
+ }, {
441
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
442
+ regex : pseudoClasses
443
+ }, {
444
+ token : function(value) {
445
+ if (properties.hasOwnProperty(value.toLowerCase())) {
446
+ return "support.type";
447
+ }
448
+ else if (functions.hasOwnProperty(value.toLowerCase())) {
449
+ return "support.function";
450
+ }
451
+ else if (constants.hasOwnProperty(value.toLowerCase())) {
452
+ return "support.constant";
453
+ }
454
+ else if (colors.hasOwnProperty(value.toLowerCase())) {
455
+ return "support.constant.color";
456
+ }
457
+ else if (fonts.hasOwnProperty(value.toLowerCase())) {
458
+ return "support.constant.fonts";
459
+ }
460
+ else {
461
+ return "text";
462
+ }
463
+ },
464
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
465
+ }
466
+ ];
467
+
468
+ var ruleset = lang.copyArray(base_ruleset);
469
+ ruleset.unshift({
470
+ token : "paren.rparen",
471
+ regex : "\\}",
472
+ next: "start"
473
+ });
474
+
475
+ var media_ruleset = lang.copyArray( base_ruleset );
476
+ media_ruleset.unshift({
477
+ token : "paren.rparen",
478
+ regex : "\\}",
479
+ next: "media"
480
+ });
481
+
482
+ var base_comment = [{
483
+ token : "comment", // comment spanning whole line
484
+ merge : true,
485
+ regex : ".+"
486
+ }];
487
+
488
+ var comment = lang.copyArray(base_comment);
489
+ comment.unshift({
490
+ token : "comment", // closing comment
491
+ regex : ".*?\\*\\/",
492
+ next : "start"
493
+ });
494
+
495
+ var media_comment = lang.copyArray(base_comment);
496
+ media_comment.unshift({
497
+ token : "comment", // closing comment
498
+ regex : ".*?\\*\\/",
499
+ next : "media"
500
+ });
501
+
502
+ var ruleset_comment = lang.copyArray(base_comment);
503
+ ruleset_comment.unshift({
504
+ token : "comment", // closing comment
505
+ regex : ".*?\\*\\/",
506
+ next : "ruleset"
507
+ });
508
+
509
+ this.$rules = {
510
+ "start" : [{
511
+ token : "comment", // multi line comment
512
+ merge : true,
513
+ regex : "\\/\\*",
514
+ next : "comment"
515
+ }, {
516
+ token: "paren.lparen",
517
+ regex: "\\{",
518
+ next: "ruleset"
519
+ }, {
520
+ token: "string",
521
+ regex: "@.*?{",
522
+ next: "media"
523
+ },{
524
+ token: "keyword",
525
+ regex: "#[a-z0-9-_]+"
526
+ },{
527
+ token: "variable",
528
+ regex: "\\.[a-z0-9-_]+"
529
+ },{
530
+ token: "string",
531
+ regex: ":[a-z0-9-_]+"
532
+ },{
533
+ token: "constant",
534
+ regex: "[a-z0-9-_]+"
535
+ }],
536
+
537
+ "media" : [ {
538
+ token : "comment", // multi line comment
539
+ merge : true,
540
+ regex : "\\/\\*",
541
+ next : "media_comment"
542
+ }, {
543
+ token: "paren.lparen",
544
+ regex: "\\{",
545
+ next: "media_ruleset"
546
+ },{
547
+ token: "string",
548
+ regex: "\\}",
549
+ next: "start"
550
+ },{
551
+ token: "keyword",
552
+ regex: "#[a-z0-9-_]+"
553
+ },{
554
+ token: "variable",
555
+ regex: "\\.[a-z0-9-_]+"
556
+ },{
557
+ token: "string",
558
+ regex: ":[a-z0-9-_]+"
559
+ },{
560
+ token: "constant",
561
+ regex: "[a-z0-9-_]+"
562
+ }],
563
+
564
+ "comment" : comment,
565
+
566
+ "ruleset" : ruleset,
567
+ "ruleset_comment" : ruleset_comment,
568
+
569
+ "media_ruleset" : media_ruleset,
570
+ "media_comment" : media_comment
571
+ };
572
+ };
573
+
574
+ oop.inherits(CssHighlightRules, TextHighlightRules);
575
+
576
+ exports.CssHighlightRules = CssHighlightRules;
577
+
578
+ });
579
+ /* ***** BEGIN LICENSE BLOCK *****
580
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
581
+ *
582
+ * The contents of this file are subject to the Mozilla Public License Version
583
+ * 1.1 (the "License"); you may not use this file except in compliance with
584
+ * the License. You may obtain a copy of the License at
585
+ * http://www.mozilla.org/MPL/
586
+ *
587
+ * Software distributed under the License is distributed on an "AS IS" basis,
588
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
589
+ * for the specific language governing rights and limitations under the
590
+ * License.
591
+ *
592
+ * The Original Code is Ajax.org Code Editor (ACE).
593
+ *
594
+ * The Initial Developer of the Original Code is
595
+ * Ajax.org B.V.
596
+ * Portions created by the Initial Developer are Copyright (C) 2010
597
+ * the Initial Developer. All Rights Reserved.
598
+ *
599
+ * Contributor(s):
600
+ * Fabian Jakobs <fabian AT ajax DOT org>
601
+ * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
602
+ *
603
+ * Alternatively, the contents of this file may be used under the terms of
604
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
605
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
606
+ * in which case the provisions of the GPL or the LGPL are applicable instead
607
+ * of those above. If you wish to allow use of your version of this file only
608
+ * under the terms of either the GPL or the LGPL, and not to allow others to
609
+ * use your version of this file under the terms of the MPL, indicate your
610
+ * decision by deleting the provisions above and replace them with the notice
611
+ * and other provisions required by the GPL or the LGPL. If you do not delete
612
+ * the provisions above, a recipient may use your version of this file under
613
+ * the terms of any one of the MPL, the GPL or the LGPL.
614
+ *
615
+ * ***** END LICENSE BLOCK ***** */
616
+
617
+ ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
618
+ "use strict";
619
+
620
+ var oop = require("../lib/oop");
621
+ var lang = require("../lib/lang");
622
+ var unicode = require("../unicode");
623
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
624
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
625
+
626
+ var JavaScriptHighlightRules = function() {
627
+
628
+ // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
629
+ var globals = lang.arrayToMap(
630
+ // Constructors
631
+ ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
632
+ // E4X
633
+ "Namespace|QName|XML|XMLList|" +
634
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
635
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
636
+ // Errors
637
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
638
+ "SyntaxError|TypeError|URIError|" +
639
+ // Non-constructor functions
640
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
641
+ "isNaN|parseFloat|parseInt|" +
642
+ // Other
643
+ "JSON|Math|" +
644
+ // Pseudo
645
+ "this|arguments|prototype|window|document"
646
+ ).split("|")
647
+ );
648
+
649
+ var keywords = lang.arrayToMap(
650
+ ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
651
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
652
+ "const|yield|import|get|set").split("|")
653
+ );
654
+
655
+ // keywords which can be followed by regular expressions
656
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
657
+
658
+ var deprecated = lang.arrayToMap(
659
+ ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
660
+ );
661
+
662
+ var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
663
+
664
+ var buildinConstants = lang.arrayToMap(
665
+ ("null|Infinity|NaN|undefined").split("|")
666
+ );
667
+
668
+ var futureReserved = lang.arrayToMap(
669
+ ("class|enum|extends|super|export|implements|private|" +
670
+ "public|interface|package|protected|static").split("|")
671
+ );
672
+
673
+ // TODO: Unicode escape sequences
674
+ var identifierRe = "[" + unicode.packages.L + "\\$_]["
675
+ + unicode.packages.L
676
+ + unicode.packages.Mn + unicode.packages.Mc
677
+ + unicode.packages.Nd
678
+ + unicode.packages.Pc + "\\$_]*\\b";
679
+
680
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
681
+ "u[0-9a-fA-F]{4}|" + // unicode
682
+ "[0-2][0-7]{0,2}|" + // oct
683
+ "3[0-6][0-7]?|" + // oct
684
+ "37[0-7]?|" + // oct
685
+ "[4-7][0-7]?|" + //oct
686
+ ".)";
687
+
688
+ // regexp must not have capturing parentheses. Use (?:) instead.
689
+ // regexps are ordered -> the first match is used
690
+
691
+ this.$rules = {
692
+ "start" : [
693
+ {
694
+ token : "comment",
695
+ regex : /\/\/.*$/
696
+ },
697
+ DocCommentHighlightRules.getStartRule("doc-start"),
698
+ {
699
+ token : "comment", // multi line comment
700
+ merge : true,
701
+ regex : /\/\*/,
702
+ next : "comment"
703
+ }, {
704
+ token : "string",
705
+ regex : "'(?=.)",
706
+ next : "qstring"
707
+ }, {
708
+ token : "string",
709
+ regex : '"(?=.)',
710
+ next : "qqstring"
711
+ }, {
712
+ token : "constant.numeric", // hex
713
+ regex : /0[xX][0-9a-fA-F]+\b/
714
+ }, {
715
+ token : "constant.numeric", // float
716
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
717
+ }, { // match stuff like: Sound.prototype.play = function() { }
718
+ token : [
719
+ "storage.type",
720
+ "punctuation.operator",
721
+ "support.function",
722
+ "punctuation.operator",
723
+ "entity.name.function",
724
+ "text",
725
+ "keyword.operator",
726
+ "text",
727
+ "storage.type",
728
+ "text",
729
+ "paren.lparen"
730
+ ],
731
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
732
+ next: "function_arguments"
733
+ }, { // match stuff like: Sound.prototype.play = myfunc
734
+ token : [
735
+ "storage.type",
736
+ "punctuation.operator",
737
+ "support.function",
738
+ "punctuation.operator",
739
+ "entity.name.function",
740
+ "text",
741
+ "keyword.operator",
742
+ "text"
743
+ ],
744
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)",
745
+ next: "function_arguments"
746
+ }, { // match stuff like: Sound.play = function() { }
747
+ token : [
748
+ "storage.type",
749
+ "punctuation.operator",
750
+ "entity.name.function",
751
+ "text",
752
+ "keyword.operator",
753
+ "text",
754
+ "storage.type",
755
+ "text",
756
+ "paren.lparen"
757
+ ],
758
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
759
+ next: "function_arguments"
760
+ }, { // match stuff like: play = function() { }
761
+ token : [
762
+ "entity.name.function",
763
+ "text",
764
+ "keyword.operator",
765
+ "text",
766
+ "storage.type",
767
+ "text",
768
+ "paren.lparen"
769
+ ],
770
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
771
+ next: "function_arguments"
772
+ }, { // match regular function like: function myFunc(arg) { }
773
+ token : [
774
+ "storage.type",
775
+ "text",
776
+ "entity.name.function",
777
+ "text",
778
+ "paren.lparen"
779
+ ],
780
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
781
+ next: "function_arguments"
782
+ }, { // match stuff like: foobar: function() { }
783
+ token : [
784
+ "entity.name.function",
785
+ "text",
786
+ "punctuation.operator",
787
+ "text",
788
+ "storage.type",
789
+ "text",
790
+ "paren.lparen"
791
+ ],
792
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
793
+ next: "function_arguments"
794
+ }, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
795
+ token : [
796
+ "text",
797
+ "text",
798
+ "storage.type",
799
+ "text",
800
+ "paren.lparen"
801
+ ],
802
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
803
+ next: "function_arguments"
804
+ }, {
805
+ token : "constant.language.boolean",
806
+ regex : /(?:true|false)\b/
807
+ }, {
808
+ token : "keyword",
809
+ regex : "(?:" + kwBeforeRe + ")\\b",
810
+ next : "regex_allowed"
811
+ }, {
812
+ token : ["punctuation.operator", "support.function"],
813
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
814
+ }, {
815
+ token : ["punctuation.operator", "support.function.dom"],
816
+ 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(?=\()/
817
+ }, {
818
+ token : ["punctuation.operator", "support.constant"],
819
+ 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/
820
+ }, {
821
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
822
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
823
+ }, {
824
+ token : function(value) {
825
+ if (globals.hasOwnProperty(value))
826
+ return "variable.language";
827
+ else if (deprecated.hasOwnProperty(value))
828
+ return "invalid.deprecated";
829
+ else if (definitions.hasOwnProperty(value))
830
+ return "storage.type";
831
+ else if (keywords.hasOwnProperty(value))
832
+ return "keyword";
833
+ else if (buildinConstants.hasOwnProperty(value))
834
+ return "constant.language";
835
+ else if (futureReserved.hasOwnProperty(value))
836
+ return "invalid.illegal";
837
+ else if (value == "debugger")
838
+ return "invalid.deprecated";
839
+ else
840
+ return "identifier";
841
+ },
842
+ regex : identifierRe
843
+ }, {
844
+ token : "keyword.operator",
845
+ regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,
846
+ next : "regex_allowed"
847
+ }, {
848
+ token : "punctuation.operator",
849
+ regex : /\?|\:|\,|\;|\./,
850
+ next : "regex_allowed"
851
+ }, {
852
+ token : "paren.lparen",
853
+ regex : /[\[({]/,
854
+ next : "regex_allowed"
855
+ }, {
856
+ token : "paren.rparen",
857
+ regex : /[\])}]/
858
+ }, {
859
+ token : "keyword.operator",
860
+ regex : /\/=?/,
861
+ next : "regex_allowed"
862
+ }, {
863
+ token: "comment",
864
+ regex: /^#!.*$/
865
+ }, {
866
+ token : "text",
867
+ regex : /\s+/
868
+ }
869
+ ],
870
+ // regular expressions are only allowed after certain tokens. This
871
+ // makes sure we don't mix up regexps with the divison operator
872
+ "regex_allowed": [
873
+ DocCommentHighlightRules.getStartRule("doc-start"),
874
+ {
875
+ token : "comment", // multi line comment
876
+ merge : true,
877
+ regex : "\\/\\*",
878
+ next : "comment_regex_allowed"
879
+ }, {
880
+ token : "comment",
881
+ regex : "\\/\\/.*$"
882
+ }, {
883
+ token: "string.regexp",
884
+ regex: "\\/",
885
+ next: "regex",
886
+ merge: true
887
+ }, {
888
+ token : "text",
889
+ regex : "\\s+"
890
+ }, {
891
+ // immediately return to the start mode without matching
892
+ // anything
893
+ token: "empty",
894
+ regex: "",
895
+ next: "start"
896
+ }
897
+ ],
898
+ "regex": [
899
+ {
900
+ token: "regexp.keyword.operator",
901
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
902
+ }, {
903
+ // flag
904
+ token: "string.regexp",
905
+ regex: "/\\w*",
906
+ next: "start",
907
+ merge: true
908
+ }, {
909
+ token: "string.regexp",
910
+ regex: "[^\\\\/\\[]+",
911
+ merge: true
912
+ }, {
913
+ token: "string.regexp.charachterclass",
914
+ regex: "\\[",
915
+ next: "regex_character_class",
916
+ merge: true
917
+ }, {
918
+ token: "empty",
919
+ regex: "",
920
+ next: "start"
921
+ }
922
+ ],
923
+ "regex_character_class": [
924
+ {
925
+ token: "regexp.keyword.operator",
926
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
927
+ }, {
928
+ token: "string.regexp.charachterclass",
929
+ regex: "]",
930
+ next: "regex",
931
+ merge: true
932
+ }, {
933
+ token: "string.regexp.charachterclass",
934
+ regex: "[^\\\\\\]]+",
935
+ merge: true
936
+ }, {
937
+ token: "empty",
938
+ regex: "",
939
+ next: "start"
940
+ }
941
+ ],
942
+ "function_arguments": [
943
+ {
944
+ token: "variable.parameter",
945
+ regex: identifierRe,
946
+ }, {
947
+ token: "punctuation.operator",
948
+ regex: "[, ]+",
949
+ merge: true
950
+ }, {
951
+ token: "punctuation.operator",
952
+ regex: "$",
953
+ merge: true
954
+ }, {
955
+ token: "empty",
956
+ regex: "",
957
+ next: "start"
958
+ }
959
+ ],
960
+ "comment_regex_allowed" : [
961
+ {
962
+ token : "comment", // closing comment
963
+ regex : ".*?\\*\\/",
964
+ merge : true,
965
+ next : "regex_allowed"
966
+ }, {
967
+ token : "comment", // comment spanning whole line
968
+ merge : true,
969
+ regex : ".+"
970
+ }
971
+ ],
972
+ "comment" : [
973
+ {
974
+ token : "comment", // closing comment
975
+ regex : ".*?\\*\\/",
976
+ merge : true,
977
+ next : "start"
978
+ }, {
979
+ token : "comment", // comment spanning whole line
980
+ merge : true,
981
+ regex : ".+"
982
+ }
983
+ ],
984
+ "qqstring" : [
985
+ {
986
+ token : "constant.language.escape",
987
+ regex : escapedRe
988
+ }, {
989
+ token : "string",
990
+ regex : '[^"\\\\]+',
991
+ merge : true
992
+ }, {
993
+ token : "string",
994
+ regex : "\\\\$",
995
+ next : "qqstring",
996
+ merge : true
997
+ }, {
998
+ token : "string",
999
+ regex : '"|$',
1000
+ next : "start",
1001
+ merge : true
1002
+ }
1003
+ ],
1004
+ "qstring" : [
1005
+ {
1006
+ token : "constant.language.escape",
1007
+ regex : escapedRe
1008
+ }, {
1009
+ token : "string",
1010
+ regex : "[^'\\\\]+",
1011
+ merge : true
1012
+ }, {
1013
+ token : "string",
1014
+ regex : "\\\\$",
1015
+ next : "qstring",
1016
+ merge : true
1017
+ }, {
1018
+ token : "string",
1019
+ regex : "'|$",
1020
+ next : "start",
1021
+ merge : true
1022
+ }
1023
+ ]
1024
+ };
1025
+
1026
+ this.embedRules(DocCommentHighlightRules, "doc-",
1027
+ [ DocCommentHighlightRules.getEndRule("start") ]);
1028
+ };
1029
+
1030
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
1031
+
1032
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
1033
+ });
1034
+ /* ***** BEGIN LICENSE BLOCK *****
1035
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1036
+ *
1037
+ * The contents of this file are subject to the Mozilla Public License Version
1038
+ * 1.1 (the "License"); you may not use this file except in compliance with
1039
+ * the License. You may obtain a copy of the License at
1040
+ * http://www.mozilla.org/MPL/
1041
+ *
1042
+ * Software distributed under the License is distributed on an "AS IS" basis,
1043
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1044
+ * for the specific language governing rights and limitations under the
1045
+ * License.
1046
+ *
1047
+ * The Original Code is Ajax.org Code Editor (ACE).
1048
+ *
1049
+ * The Initial Developer of the Original Code is
1050
+ * Ajax.org B.V.
1051
+ * Portions created by the Initial Developer are Copyright (C) 2010
1052
+ * the Initial Developer. All Rights Reserved.
1053
+ *
1054
+ * Contributor(s):
1055
+ * Fabian Jakobs <fabian AT ajax DOT org>
1056
+ *
1057
+ * Alternatively, the contents of this file may be used under the terms of
1058
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1059
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1060
+ * in which case the provisions of the GPL or the LGPL are applicable instead
1061
+ * of those above. If you wish to allow use of your version of this file only
1062
+ * under the terms of either the GPL or the LGPL, and not to allow others to
1063
+ * use your version of this file under the terms of the MPL, indicate your
1064
+ * decision by deleting the provisions above and replace them with the notice
1065
+ * and other provisions required by the GPL or the LGPL. If you do not delete
1066
+ * the provisions above, a recipient may use your version of this file under
1067
+ * the terms of any one of the MPL, the GPL or the LGPL.
1068
+ *
1069
+ * ***** END LICENSE BLOCK ***** */
1070
+
1071
+ ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1072
+ "use strict";
1073
+
1074
+ var oop = require("../lib/oop");
1075
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1076
+
1077
+ var DocCommentHighlightRules = function() {
1078
+
1079
+ this.$rules = {
1080
+ "start" : [ {
1081
+ token : "comment.doc.tag",
1082
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
1083
+ }, {
1084
+ token : "comment.doc",
1085
+ merge : true,
1086
+ regex : "\\s+"
1087
+ }, {
1088
+ token : "comment.doc",
1089
+ merge : true,
1090
+ regex : "TODO"
1091
+ }, {
1092
+ token : "comment.doc",
1093
+ merge : true,
1094
+ regex : "[^@\\*]+"
1095
+ }, {
1096
+ token : "comment.doc",
1097
+ merge : true,
1098
+ regex : "."
1099
+ }]
1100
+ };
1101
+ };
1102
+
1103
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
1104
+
1105
+ DocCommentHighlightRules.getStartRule = function(start) {
1106
+ return {
1107
+ token : "comment.doc", // doc comment
1108
+ merge : true,
1109
+ regex : "\\/\\*(?=\\*)",
1110
+ next : start
1111
+ };
1112
+ };
1113
+
1114
+ DocCommentHighlightRules.getEndRule = function (start) {
1115
+ return {
1116
+ token : "comment.doc", // closing comment
1117
+ merge : true,
1118
+ regex : "\\*\\/",
1119
+ next : start
1120
+ };
1121
+ };
1122
+
1123
+
1124
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
1125
+
1126
+ });
1127
+ /* ***** BEGIN LICENSE BLOCK *****
1128
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1129
+ *
1130
+ * The contents of this file are subject to the Mozilla Public License Version
1131
+ * 1.1 (the "License"); you may not use this file except in compliance with
1132
+ * the License. You may obtain a copy of the License at
1133
+ * http://www.mozilla.org/MPL/
1134
+ *
1135
+ * Software distributed under the License is distributed on an "AS IS" basis,
1136
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1137
+ * for the specific language governing rights and limitations under the
1138
+ * License.
1139
+ *
1140
+ * The Original Code is Ajax.org Code Editor (ACE).
1141
+ *
1142
+ * The Initial Developer of the Original Code is
1143
+ * Ajax.org B.V.
1144
+ * Portions created by the Initial Developer are Copyright (C) 2010
1145
+ * the Initial Developer. All Rights Reserved.
1146
+ *
1147
+ * Contributor(s):
1148
+ * Fabian Jakobs <fabian AT ajax DOT org>
1149
+ *
1150
+ * Alternatively, the contents of this file may be used under the terms of
1151
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1152
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1153
+ * in which case the provisions of the GPL or the LGPL are applicable instead
1154
+ * of those above. If you wish to allow use of your version of this file only
1155
+ * under the terms of either the GPL or the LGPL, and not to allow others to
1156
+ * use your version of this file under the terms of the MPL, indicate your
1157
+ * decision by deleting the provisions above and replace them with the notice
1158
+ * and other provisions required by the GPL or the LGPL. If you do not delete
1159
+ * the provisions above, a recipient may use your version of this file under
1160
+ * the terms of any one of the MPL, the GPL or the LGPL.
1161
+ *
1162
+ * ***** END LICENSE BLOCK ***** */
1163
+
1164
+ ace.define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
1165
+ "use strict";
1166
+
1167
+ var lang = require("../lib/lang");
1168
+
1169
+ var formTags = lang.arrayToMap(
1170
+ ("button|form|input|label|select|textarea").split("|")
1171
+ );
1172
+
1173
+ var tableTags = lang.arrayToMap(
1174
+ ("table|tbody|td|tfoot|th|tr").split("|")
1175
+ );
1176
+
1177
+ function string(state) {
1178
+ return [{
1179
+ token : "string",
1180
+ regex : '".*?"'
1181
+ }, {
1182
+ token : "string", // multi line string start
1183
+ merge : true,
1184
+ regex : '["].*',
1185
+ next : state + "_qqstring"
1186
+ }, {
1187
+ token : "string",
1188
+ regex : "'.*?'"
1189
+ }, {
1190
+ token : "string", // multi line string start
1191
+ merge : true,
1192
+ regex : "['].*",
1193
+ next : state + "_qstring"
1194
+ }];
1195
+ }
1196
+
1197
+ function multiLineString(quote, state) {
1198
+ return [{
1199
+ token : "string",
1200
+ merge : true,
1201
+ regex : ".*?" + quote,
1202
+ next : state
1203
+ }, {
1204
+ token : "string",
1205
+ merge : true,
1206
+ regex : '.+'
1207
+ }];
1208
+ }
1209
+
1210
+ exports.tag = function(states, name, nextState) {
1211
+ states[name] = [{
1212
+ token : "text",
1213
+ regex : "\\s+"
1214
+ }, {
1215
+ //token : "meta.tag",
1216
+
1217
+ token : function(value) {
1218
+ if ( value==='a' ) {
1219
+ return "meta.tag.anchor";
1220
+ }
1221
+ else if ( value==='img' ) {
1222
+ return "meta.tag.image";
1223
+ }
1224
+ else if ( value==='script' ) {
1225
+ return "meta.tag.script";
1226
+ }
1227
+ else if ( value==='style' ) {
1228
+ return "meta.tag.style";
1229
+ }
1230
+ else if (formTags.hasOwnProperty(value.toLowerCase())) {
1231
+ return "meta.tag.form";
1232
+ }
1233
+ else if (tableTags.hasOwnProperty(value.toLowerCase())) {
1234
+ return "meta.tag.table";
1235
+ }
1236
+ else {
1237
+ return "meta.tag";
1238
+ }
1239
+ },
1240
+ merge : true,
1241
+ regex : "[-_a-zA-Z0-9:]+",
1242
+ next : name + "_embed_attribute_list"
1243
+ }, {
1244
+ token: "empty",
1245
+ regex: "",
1246
+ next : name + "_embed_attribute_list"
1247
+ }];
1248
+
1249
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
1250
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
1251
+
1252
+ states[name + "_embed_attribute_list"] = [{
1253
+ token : "meta.tag",
1254
+ merge : true,
1255
+ regex : "\/?>",
1256
+ next : nextState
1257
+ }, {
1258
+ token : "keyword.operator",
1259
+ regex : "="
1260
+ }, {
1261
+ token : "entity.other.attribute-name",
1262
+ regex : "[-_a-zA-Z0-9:]+"
1263
+ }, {
1264
+ token : "constant.numeric", // float
1265
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1266
+ }, {
1267
+ token : "text",
1268
+ regex : "\\s+"
1269
+ }].concat(string(name));
1270
+ };
1271
+
1272
+ });
1273
+ /* ***** BEGIN LICENSE BLOCK *****
1274
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1275
+ *
1276
+ * The contents of this file are subject to the Mozilla Public License Version
1277
+ * 1.1 (the "License"); you may not use this file except in compliance with
1278
+ * the License. You may obtain a copy of the License at
1279
+ * http://www.mozilla.org/MPL/
1280
+ *
1281
+ * Software distributed under the License is distributed on an "AS IS" basis,
1282
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1283
+ * for the specific language governing rights and limitations under the
1284
+ * License.
1285
+ *
1286
+ * The Original Code is Ajax.org Code Editor (ACE).
1287
+ *
1288
+ * The Initial Developer of the Original Code is
1289
+ * Ajax.org B.V.
1290
+ * Portions created by the Initial Developer are Copyright (C) 2010
1291
+ * the Initial Developer. All Rights Reserved.
1292
+ *
1293
+ * Contributor(s):
1294
+ * Fabian Jakobs <fabian AT ajax DOT org>
1295
+ *
1296
+ * Alternatively, the contents of this file may be used under the terms of
1297
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1298
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1299
+ * in which case the provisions of the GPL or the LGPL are applicable instead
1300
+ * of those above. If you wish to allow use of your version of this file only
1301
+ * under the terms of either the GPL or the LGPL, and not to allow others to
1302
+ * use your version of this file under the terms of the MPL, indicate your
1303
+ * decision by deleting the provisions above and replace them with the notice
1304
+ * and other provisions required by the GPL or the LGPL. If you do not delete
1305
+ * the provisions above, a recipient may use your version of this file under
1306
+ * the terms of any one of the MPL, the GPL or the LGPL.
1307
+ *
1308
+ * ***** END LICENSE BLOCK ***** */
1309
+
1310
+ ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
1311
+ "use strict";
1312
+
1313
+ var Range = require("../range").Range;
1314
+
1315
+ var MatchingBraceOutdent = function() {};
1316
+
1317
+ (function() {
1318
+
1319
+ this.checkOutdent = function(line, input) {
1320
+ if (! /^\s+$/.test(line))
1321
+ return false;
1322
+
1323
+ return /^\s*\}/.test(input);
1324
+ };
1325
+
1326
+ this.autoOutdent = function(doc, row) {
1327
+ var line = doc.getLine(row);
1328
+ var match = line.match(/^(\s*\})/);
1329
+
1330
+ if (!match) return 0;
1331
+
1332
+ var column = match[1].length;
1333
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
1334
+
1335
+ if (!openBracePos || openBracePos.row == row) return 0;
1336
+
1337
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
1338
+ doc.replace(new Range(row, 0, row, column-1), indent);
1339
+ };
1340
+
1341
+ this.$getIndent = function(line) {
1342
+ var match = line.match(/^(\s+)/);
1343
+ if (match) {
1344
+ return match[1];
1345
+ }
1346
+
1347
+ return "";
1348
+ };
1349
+
1350
+ }).call(MatchingBraceOutdent.prototype);
1351
+
1352
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1353
+ });