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/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}),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}),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}),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}),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}),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))}}),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 @@
1
+ ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/lua_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./lua_highlight_rules").LuaHighlightRules,h=function(){this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=["function","then","do","repeat"];if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);if(h)d+=c;else for(var i in f){var j=f[i];if(j.type!="keyword")continue;var k=g.indexOf(j.value);if(k!=-1){d+=c;break}}}return d}}.call(h.prototype),b.Mode=h}),ace.define("ace/mode/lua_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("break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not".split("|")),b=e.arrayToMap("true|false|nil|_G|_VERSION".split("|")),c=e.arrayToMap("string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running".split("|")),d=e.arrayToMap("string|package|os|io|math|debug|table|coroutine".split("|")),f=e.arrayToMap("__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber".split("|")),g=e.arrayToMap("".split("|")),h=e.arrayToMap("setn|foreach|foreachi|gcinfo|log10|maxn".split("|")),i="",j="(?:(?:[1-9]\\d*)|(?:0))",k="(?:0[xX][\\dA-Fa-f]+)",l="(?:"+j+"|"+k+")",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:"+o+")",q=[];this.$rules={start:[{token:"comment",regex:i+"\\-\\-\\[\\[.*\\]\\]"},{token:"comment",regex:i+"\\-\\-\\[\\=\\[.*\\]\\=\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]"},{token:"comment",regex:i+"\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]"},{token:"comment",regex:i+"\\-\\-\\[\\[.*$",merge:!0,next:"qcomment"},{token:"comment",regex:i+"\\-\\-\\[\\=\\[.*$",merge:!0,next:"qcomment1"},{token:"comment",regex:i+"\\-\\-\\[\\={2}\\[.*$",merge:!0,next:"qcomment2"},{token:"comment",regex:i+"\\-\\-\\[\\={3}\\[.*$",merge:!0,next:"qcomment3"},{token:"comment",regex:i+"\\-\\-\\[\\={4}\\[.*$",merge:!0,next:"qcomment4"},{token:function(a){var b=/\-\-\[(\=+)\[/,c;return(c=b.exec(a))!=null&&(c=c[1])!=undefined&&q.push(c.length),"comment"},regex:i+"\\-\\-\\[\\={5}\\=*\\[.*$",merge:!0,next:"qcomment5"},{token:"comment",regex:"\\-\\-.*$"},{token:"string",regex:i+"\\[\\[.*\\]\\]"},{token:"string",regex:i+"\\[\\=\\[.*\\]\\=\\]"},{token:"string",regex:i+"\\[\\={2}\\[.*\\]\\={2}\\]"},{token:"string",regex:i+"\\[\\={3}\\[.*\\]\\={3}\\]"},{token:"string",regex:i+"\\[\\={4}\\[.*\\]\\={4}\\]"},{token:"string",regex:i+"\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]"},{token:"string",regex:i+"\\[\\[.*$",merge:!0,next:"qstring"},{token:"string",regex:i+"\\[\\=\\[.*$",merge:!0,next:"qstring1"},{token:"string",regex:i+"\\[\\={2}\\[.*$",merge:!0,next:"qstring2"},{token:"string",regex:i+"\\[\\={3}\\[.*$",merge:!0,next:"qstring3"},{token:"string",regex:i+"\\[\\={4}\\[.*$",merge:!0,next:"qstring4"},{token:function(a){var b=/\[(\=+)\[/,c;return(c=b.exec(a))!=null&&(c=c[1])!=undefined&&q.push(c.length),"string"},regex:i+"\\[\\={5}\\=*\\[.*$",merge:!0,next:"qstring5"},{token:"string",regex:i+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:i+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:l+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":g.hasOwnProperty(e)?"invalid.illegal":d.hasOwnProperty(e)?"constant.library":h.hasOwnProperty(e)?"invalid.deprecated":c.hasOwnProperty(e)?"support.function":f.hasOwnProperty(e)?"support.function":"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+"}],qcomment:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment1:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\=\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment2:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment3:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment4:[{token:"comment",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qcomment5:[{token:function(a){var b=/\](\=+)\]/,c=this.rules.qcomment5[0],d;c.next="start";if((d=b.exec(a))!=null&&(d=d[1])!=undefined){var e=d.length,f;(f=q.pop())!=e&&(q.push(f),c.next="qcomment5")}return"comment"},regex:"(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",next:"start"},{token:"comment",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring1:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\=\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring2:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring3:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring4:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",next:"start"},{token:"string",merge:!0,regex:".+"}],qstring5:[{token:function(a){var b=/\](\=+)\]/,c=this.rules.qstring5[0],d;c.next="start";if((d=b.exec(a))!=null&&(d=d[1])!=undefined){var e=d.length,f;(f=q.pop())!=e&&(q.push(f),c.next="qstring5")}return"string"},regex:"(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.LuaHighlightRules=g})
@@ -0,0 +1,523 @@
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
+ * Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
24
+ * Lee Gao
25
+ *
26
+ * Alternatively, the contents of this file may be used under the terms of
27
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
28
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29
+ * in which case the provisions of the GPL or the LGPL are applicable instead
30
+ * of those above. If you wish to allow use of your version of this file only
31
+ * under the terms of either the GPL or the LGPL, and not to allow others to
32
+ * use your version of this file under the terms of the MPL, indicate your
33
+ * decision by deleting the provisions above and replace them with the notice
34
+ * and other provisions required by the GPL or the LGPL. If you do not delete
35
+ * the provisions above, a recipient may use your version of this file under
36
+ * the terms of any one of the MPL, the GPL or the LGPL.
37
+ *
38
+ * ***** END LICENSE BLOCK ***** */
39
+
40
+ ace.define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules'], function(require, exports, module) {
41
+ "use strict";
42
+
43
+ var oop = require("../lib/oop");
44
+ var TextMode = require("./text").Mode;
45
+ var Tokenizer = require("../tokenizer").Tokenizer;
46
+ var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
47
+
48
+ var Mode = function() {
49
+ this.$tokenizer = new Tokenizer(new LuaHighlightRules().getRules());
50
+ };
51
+ oop.inherits(Mode, TextMode);
52
+
53
+ (function() {
54
+ this.getNextLineIndent = function(state, line, tab) {
55
+ var indent = this.$getIndent(line);
56
+
57
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
58
+ var tokens = tokenizedLine.tokens;
59
+
60
+ var chunks = ["function", "then", "do", "repeat"];
61
+
62
+ if (state == "start") {
63
+ var match = line.match(/^.*[\{\(\[]\s*$/);
64
+ if (match) {
65
+ indent += tab;
66
+ } else {
67
+ for (var i in tokens){
68
+ var token = tokens[i];
69
+ if (token.type != "keyword") continue;
70
+ var chunk_i = chunks.indexOf(token.value);
71
+ if (chunk_i != -1){
72
+ indent += tab;
73
+ break;
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ return indent;
80
+ };
81
+
82
+ }).call(Mode.prototype);
83
+
84
+ exports.Mode = Mode;
85
+ });
86
+
87
+
88
+ /* ***** BEGIN LICENSE BLOCK *****
89
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
90
+ *
91
+ * The contents of this file are subject to the Mozilla Public License Version
92
+ * 1.1 (the "License"); you may not use this file except in compliance with
93
+ * the License. You may obtain a copy of the License at
94
+ * http://www.mozilla.org/MPL/
95
+ *
96
+ * Software distributed under the License is distributed on an "AS IS" basis,
97
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
98
+ * for the specific language governing rights and limitations under the
99
+ * License.
100
+ *
101
+ * The Original Code is Ajax.org Code Editor (ACE).
102
+ *
103
+ * The Initial Developer of the Original Code is
104
+ * Ajax.org B.V.
105
+ * Portions created by the Initial Developer are Copyright (C) 2010
106
+ * the Initial Developer. All Rights Reserved.
107
+ *
108
+ * Contributor(s):
109
+ * Fabian Jakobs <fabian AT ajax DOT org>
110
+ * Colin Gourlay <colin DOT j DOT gourlay AT gmail DOT com>
111
+ * Lee Gao
112
+ *
113
+ * Alternatively, the contents of this file may be used under the terms of
114
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
115
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
116
+ * in which case the provisions of the GPL or the LGPL are applicable instead
117
+ * of those above. If you wish to allow use of your version of this file only
118
+ * under the terms of either the GPL or the LGPL, and not to allow others to
119
+ * use your version of this file under the terms of the MPL, indicate your
120
+ * decision by deleting the provisions above and replace them with the notice
121
+ * and other provisions required by the GPL or the LGPL. If you do not delete
122
+ * the provisions above, a recipient may use your version of this file under
123
+ * the terms of any one of the MPL, the GPL or the LGPL.
124
+ *
125
+ * ***** END LICENSE BLOCK ***** */
126
+
127
+ ace.define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
128
+ "use strict";
129
+
130
+ var oop = require("../lib/oop");
131
+ var lang = require("../lib/lang");
132
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
133
+
134
+ var LuaHighlightRules = function() {
135
+
136
+ var keywords = lang.arrayToMap(
137
+ ("break|do|else|elseif|end|for|function|if|in|local|repeat|"+
138
+ "return|then|until|while|or|and|not").split("|")
139
+ );
140
+
141
+ var builtinConstants = lang.arrayToMap(
142
+ ("true|false|nil|_G|_VERSION").split("|")
143
+ );
144
+
145
+ var builtinFunctions = lang.arrayToMap(
146
+ ("string|xpcall|package|tostring|print|os|unpack|require|"+
147
+ "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
148
+ "collectgarbage|getmetatable|module|rawset|math|debug|"+
149
+ "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
150
+ "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
151
+ "load|error|loadfile|"+
152
+
153
+ "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
154
+ "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
155
+ "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
156
+ "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
157
+ "lines|write|close|flush|open|output|type|read|stderr|"+
158
+ "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
159
+ "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
160
+ "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
161
+ "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
162
+ "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
163
+ "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
164
+ "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
165
+ "status|wrap|create|running").split("|")
166
+ );
167
+
168
+ var stdLibaries = lang.arrayToMap(
169
+ ("string|package|os|io|math|debug|table|coroutine").split("|")
170
+ );
171
+
172
+ var metatableMethods = lang.arrayToMap(
173
+ ("__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
174
+ "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber").split("|")
175
+ );
176
+
177
+ var futureReserved = lang.arrayToMap(
178
+ ("").split("|")
179
+ );
180
+
181
+ var deprecatedIn5152 = lang.arrayToMap(
182
+ ("setn|foreach|foreachi|gcinfo|log10|maxn").split("|")
183
+ );
184
+
185
+ var strPre = "";
186
+
187
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
188
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
189
+ var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
190
+
191
+ var fraction = "(?:\\.\\d+)";
192
+ var intPart = "(?:\\d+)";
193
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
194
+ var floatNumber = "(?:" + pointFloat + ")";
195
+
196
+ var comment_stack = [];
197
+
198
+ this.$rules = {
199
+ "start" :
200
+
201
+
202
+ // bracketed comments
203
+ [{
204
+ token : "comment", // --[[ comment
205
+ regex : strPre + '\\-\\-\\[\\[.*\\]\\]'
206
+ }, {
207
+ token : "comment", // --[=[ comment
208
+ regex : strPre + '\\-\\-\\[\\=\\[.*\\]\\=\\]'
209
+ }, {
210
+ token : "comment", // --[==[ comment
211
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]'
212
+ }, {
213
+ token : "comment", // --[===[ comment
214
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]'
215
+ }, {
216
+ token : "comment", // --[====[ comment
217
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]'
218
+ }, {
219
+ token : "comment", // --[====+[ comment
220
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
221
+ },
222
+
223
+ // multiline bracketed comments
224
+ {
225
+ token : "comment", // --[[ comment
226
+ regex : strPre + '\\-\\-\\[\\[.*$',
227
+ merge : true,
228
+ next : "qcomment"
229
+ }, {
230
+ token : "comment", // --[=[ comment
231
+ regex : strPre + '\\-\\-\\[\\=\\[.*$',
232
+ merge : true,
233
+ next : "qcomment1"
234
+ }, {
235
+ token : "comment", // --[==[ comment
236
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*$',
237
+ merge : true,
238
+ next : "qcomment2"
239
+ }, {
240
+ token : "comment", // --[===[ comment
241
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*$',
242
+ merge : true,
243
+ next : "qcomment3"
244
+ }, {
245
+ token : "comment", // --[====[ comment
246
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*$',
247
+ merge : true,
248
+ next : "qcomment4"
249
+ }, {
250
+ token : function(value){ // --[====+[ comment
251
+ // WARNING: EXTREMELY SLOW, but this is the only way to circumvent the
252
+ // limits imposed by the current automaton.
253
+ // I've never personally seen any practical code where 5 or more '='s are
254
+ // used for string or commenting, so this will rarely be invoked.
255
+ var pattern = /\-\-\[(\=+)\[/, match;
256
+ // you can never be too paranoid ;)
257
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
258
+ comment_stack.push(match.length);
259
+
260
+ return "comment";
261
+ },
262
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$',
263
+ merge : true,
264
+ next : "qcomment5"
265
+ },
266
+
267
+ // single line comments
268
+ {
269
+ token : "comment",
270
+ regex : "\\-\\-.*$"
271
+ },
272
+
273
+ // bracketed strings
274
+ {
275
+ token : "string", // [[ string
276
+ regex : strPre + '\\[\\[.*\\]\\]'
277
+ }, {
278
+ token : "string", // [=[ string
279
+ regex : strPre + '\\[\\=\\[.*\\]\\=\\]'
280
+ }, {
281
+ token : "string", // [==[ string
282
+ regex : strPre + '\\[\\={2}\\[.*\\]\\={2}\\]'
283
+ }, {
284
+ token : "string", // [===[ string
285
+ regex : strPre + '\\[\\={3}\\[.*\\]\\={3}\\]'
286
+ }, {
287
+ token : "string", // [====[ string
288
+ regex : strPre + '\\[\\={4}\\[.*\\]\\={4}\\]'
289
+ }, {
290
+ token : "string", // [====+[ string
291
+ regex : strPre + '\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
292
+ },
293
+
294
+ // multiline bracketed strings
295
+ {
296
+ token : "string", // [[ string
297
+ regex : strPre + '\\[\\[.*$',
298
+ merge : true,
299
+ next : "qstring"
300
+ }, {
301
+ token : "string", // [=[ string
302
+ regex : strPre + '\\[\\=\\[.*$',
303
+ merge : true,
304
+ next : "qstring1"
305
+ }, {
306
+ token : "string", // [==[ string
307
+ regex : strPre + '\\[\\={2}\\[.*$',
308
+ merge : true,
309
+ next : "qstring2"
310
+ }, {
311
+ token : "string", // [===[ string
312
+ regex : strPre + '\\[\\={3}\\[.*$',
313
+ merge : true,
314
+ next : "qstring3"
315
+ }, {
316
+ token : "string", // [====[ string
317
+ regex : strPre + '\\[\\={4}\\[.*$',
318
+ merge : true,
319
+ next : "qstring4"
320
+ }, {
321
+ token : function(value){ // --[====+[ string
322
+ // WARNING: EXTREMELY SLOW, see above.
323
+ var pattern = /\[(\=+)\[/, match;
324
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
325
+ comment_stack.push(match.length);
326
+
327
+ return "string";
328
+ },
329
+ regex : strPre + '\\[\\={5}\\=*\\[.*$',
330
+ merge : true,
331
+ next : "qstring5"
332
+ },
333
+
334
+ {
335
+ token : "string", // " string
336
+ regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
337
+ }, {
338
+ token : "string", // ' string
339
+ regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
340
+ }, {
341
+ token : "constant.numeric", // float
342
+ regex : floatNumber
343
+ }, {
344
+ token : "constant.numeric", // integer
345
+ regex : integer + "\\b"
346
+ }, {
347
+ token : function(value) {
348
+ if (keywords.hasOwnProperty(value))
349
+ return "keyword";
350
+ else if (builtinConstants.hasOwnProperty(value))
351
+ return "constant.language";
352
+ else if (futureReserved.hasOwnProperty(value))
353
+ return "invalid.illegal";
354
+ else if (stdLibaries.hasOwnProperty(value))
355
+ return "constant.library";
356
+ else if (deprecatedIn5152.hasOwnProperty(value))
357
+ return "invalid.deprecated";
358
+ else if (builtinFunctions.hasOwnProperty(value))
359
+ return "support.function";
360
+ else if (metatableMethods.hasOwnProperty(value))
361
+ return "support.function";
362
+ else
363
+ return "identifier";
364
+ },
365
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
366
+ }, {
367
+ token : "keyword.operator",
368
+ regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
369
+ }, {
370
+ token : "paren.lparen",
371
+ regex : "[\\[\\(\\{]"
372
+ }, {
373
+ token : "paren.rparen",
374
+ regex : "[\\]\\)\\}]"
375
+ }, {
376
+ token : "text",
377
+ regex : "\\s+"
378
+ } ],
379
+
380
+ "qcomment": [ {
381
+ token : "comment",
382
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
383
+ next : "start"
384
+ }, {
385
+ token : "comment",
386
+ merge : true,
387
+ regex : '.+'
388
+ } ],
389
+ "qcomment1": [ {
390
+ token : "comment",
391
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
392
+ next : "start"
393
+ }, {
394
+ token : "comment",
395
+ merge : true,
396
+ regex : '.+'
397
+ } ],
398
+ "qcomment2": [ {
399
+ token : "comment",
400
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
401
+ next : "start"
402
+ }, {
403
+ token : "comment",
404
+ merge : true,
405
+ regex : '.+'
406
+ } ],
407
+ "qcomment3": [ {
408
+ token : "comment",
409
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
410
+ next : "start"
411
+ }, {
412
+ token : "comment",
413
+ merge : true,
414
+ regex : '.+'
415
+ } ],
416
+ "qcomment4": [ {
417
+ token : "comment",
418
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
419
+ next : "start"
420
+ }, {
421
+ token : "comment",
422
+ merge : true,
423
+ regex : '.+'
424
+ } ],
425
+ "qcomment5": [ {
426
+ token : function(value){
427
+ // very hackish, mutates the qcomment5 field on the fly.
428
+ var pattern = /\](\=+)\]/, rule = this.rules.qcomment5[0], match;
429
+ rule.next = "start";
430
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
431
+ var found = match.length, expected;
432
+ if ((expected = comment_stack.pop()) != found){
433
+ comment_stack.push(expected);
434
+ rule.next = "qcomment5";
435
+ }
436
+ }
437
+
438
+ return "comment";
439
+ },
440
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
441
+ next : "start"
442
+ }, {
443
+ token : "comment",
444
+ merge : true,
445
+ regex : '.+'
446
+ } ],
447
+
448
+ "qstring": [ {
449
+ token : "string",
450
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
451
+ next : "start"
452
+ }, {
453
+ token : "string",
454
+ merge : true,
455
+ regex : '.+'
456
+ } ],
457
+ "qstring1": [ {
458
+ token : "string",
459
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
460
+ next : "start"
461
+ }, {
462
+ token : "string",
463
+ merge : true,
464
+ regex : '.+'
465
+ } ],
466
+ "qstring2": [ {
467
+ token : "string",
468
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
469
+ next : "start"
470
+ }, {
471
+ token : "string",
472
+ merge : true,
473
+ regex : '.+'
474
+ } ],
475
+ "qstring3": [ {
476
+ token : "string",
477
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
478
+ next : "start"
479
+ }, {
480
+ token : "string",
481
+ merge : true,
482
+ regex : '.+'
483
+ } ],
484
+ "qstring4": [ {
485
+ token : "string",
486
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
487
+ next : "start"
488
+ }, {
489
+ token : "string",
490
+ merge : true,
491
+ regex : '.+'
492
+ } ],
493
+ "qstring5": [ {
494
+ token : function(value){
495
+ // very hackish, mutates the qstring5 field on the fly.
496
+ var pattern = /\](\=+)\]/, rule = this.rules.qstring5[0], match;
497
+ rule.next = "start";
498
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
499
+ var found = match.length, expected;
500
+ if ((expected = comment_stack.pop()) != found){
501
+ comment_stack.push(expected);
502
+ rule.next = "qstring5";
503
+ }
504
+ }
505
+
506
+ return "string";
507
+ },
508
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
509
+ next : "start"
510
+ }, {
511
+ token : "string",
512
+ merge : true,
513
+ regex : '.+'
514
+ } ]
515
+
516
+ };
517
+
518
+ }
519
+
520
+ oop.inherits(LuaHighlightRules, TextHighlightRules);
521
+
522
+ exports.LuaHighlightRules = LuaHighlightRules;
523
+ });