aced_rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. data/.gitignore +17 -0
  2. data/CHANGELOG.md +4 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +22 -0
  5. data/README.md +49 -0
  6. data/Rakefile +2 -0
  7. data/aced_rails.gemspec +19 -0
  8. data/lib/aced_rails.rb +7 -0
  9. data/lib/aced_rails/engine.rb +4 -0
  10. data/lib/aced_rails/version.rb +3 -0
  11. data/vendor/assets/javascripts/ace/ace-compat-noconflict.js +1 -0
  12. data/vendor/assets/javascripts/ace/ace-compat-uncompressed-noconflict.js +480 -0
  13. data/vendor/assets/javascripts/ace/ace-compat-uncompressed.js +480 -0
  14. data/vendor/assets/javascripts/ace/ace-compat.js +1 -0
  15. data/vendor/assets/javascripts/ace/ace-noconflict.js +10 -0
  16. data/vendor/assets/javascripts/ace/ace-uncompressed-noconflict.js +14649 -0
  17. data/vendor/assets/javascripts/ace/ace-uncompressed.js +14649 -0
  18. data/vendor/assets/javascripts/ace/ace.js +10 -0
  19. data/vendor/assets/javascripts/ace/keybinding-emacs-noconflict.js +1 -0
  20. data/vendor/assets/javascripts/ace/keybinding-emacs-uncompressed-noconflict.js +405 -0
  21. data/vendor/assets/javascripts/ace/keybinding-emacs-uncompressed.js +405 -0
  22. data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -0
  23. data/vendor/assets/javascripts/ace/keybinding-vim-noconflict.js +1 -0
  24. data/vendor/assets/javascripts/ace/keybinding-vim-uncompressed-noconflict.js +393 -0
  25. data/vendor/assets/javascripts/ace/keybinding-vim-uncompressed.js +393 -0
  26. data/vendor/assets/javascripts/ace/keybinding-vim.js +1 -0
  27. data/vendor/assets/javascripts/ace/mode-c_cpp-noconflict.js +1 -0
  28. data/vendor/assets/javascripts/ace/mode-c_cpp-uncompressed-noconflict.js +918 -0
  29. data/vendor/assets/javascripts/ace/mode-c_cpp-uncompressed.js +918 -0
  30. data/vendor/assets/javascripts/ace/mode-c_cpp.js +1 -0
  31. data/vendor/assets/javascripts/ace/mode-clojure-noconflict.js +1 -0
  32. data/vendor/assets/javascripts/ace/mode-clojure-uncompressed-noconflict.js +422 -0
  33. data/vendor/assets/javascripts/ace/mode-clojure-uncompressed.js +422 -0
  34. data/vendor/assets/javascripts/ace/mode-clojure.js +1 -0
  35. data/vendor/assets/javascripts/ace/mode-coffee-noconflict.js +1 -0
  36. data/vendor/assets/javascripts/ace/mode-coffee-uncompressed-noconflict.js +605 -0
  37. data/vendor/assets/javascripts/ace/mode-coffee-uncompressed.js +605 -0
  38. data/vendor/assets/javascripts/ace/mode-coffee.js +1 -0
  39. data/vendor/assets/javascripts/ace/mode-coldfusion-noconflict.js +1 -0
  40. data/vendor/assets/javascripts/ace/mode-coldfusion-uncompressed-noconflict.js +2361 -0
  41. data/vendor/assets/javascripts/ace/mode-coldfusion-uncompressed.js +2361 -0
  42. data/vendor/assets/javascripts/ace/mode-coldfusion.js +1 -0
  43. data/vendor/assets/javascripts/ace/mode-csharp-noconflict.js +1 -0
  44. data/vendor/assets/javascripts/ace/mode-csharp-uncompressed-noconflict.js +768 -0
  45. data/vendor/assets/javascripts/ace/mode-csharp-uncompressed.js +768 -0
  46. data/vendor/assets/javascripts/ace/mode-csharp.js +1 -0
  47. data/vendor/assets/javascripts/ace/mode-css-noconflict.js +1 -0
  48. data/vendor/assets/javascripts/ace/mode-css-uncompressed-noconflict.js +664 -0
  49. data/vendor/assets/javascripts/ace/mode-css-uncompressed.js +664 -0
  50. data/vendor/assets/javascripts/ace/mode-css.js +1 -0
  51. data/vendor/assets/javascripts/ace/mode-groovy-noconflict.js +1 -0
  52. data/vendor/assets/javascripts/ace/mode-groovy-uncompressed-noconflict.js +1280 -0
  53. data/vendor/assets/javascripts/ace/mode-groovy-uncompressed.js +1280 -0
  54. data/vendor/assets/javascripts/ace/mode-groovy.js +1 -0
  55. data/vendor/assets/javascripts/ace/mode-haxe-noconflict.js +1 -0
  56. data/vendor/assets/javascripts/ace/mode-haxe-uncompressed-noconflict.js +768 -0
  57. data/vendor/assets/javascripts/ace/mode-haxe-uncompressed.js +768 -0
  58. data/vendor/assets/javascripts/ace/mode-haxe.js +1 -0
  59. data/vendor/assets/javascripts/ace/mode-html-noconflict.js +1 -0
  60. data/vendor/assets/javascripts/ace/mode-html-uncompressed-noconflict.js +2377 -0
  61. data/vendor/assets/javascripts/ace/mode-html-uncompressed.js +2377 -0
  62. data/vendor/assets/javascripts/ace/mode-html.js +1 -0
  63. data/vendor/assets/javascripts/ace/mode-java-noconflict.js +1 -0
  64. data/vendor/assets/javascripts/ace/mode-java-uncompressed-noconflict.js +1282 -0
  65. data/vendor/assets/javascripts/ace/mode-java-uncompressed.js +1282 -0
  66. data/vendor/assets/javascripts/ace/mode-java.js +1 -0
  67. data/vendor/assets/javascripts/ace/mode-javascript-noconflict.js +1 -0
  68. data/vendor/assets/javascripts/ace/mode-javascript-uncompressed-noconflict.js +1113 -0
  69. data/vendor/assets/javascripts/ace/mode-javascript-uncompressed.js +1113 -0
  70. data/vendor/assets/javascripts/ace/mode-javascript.js +1 -0
  71. data/vendor/assets/javascripts/ace/mode-json-noconflict.js +1 -0
  72. data/vendor/assets/javascripts/ace/mode-json-uncompressed-noconflict.js +696 -0
  73. data/vendor/assets/javascripts/ace/mode-json-uncompressed.js +696 -0
  74. data/vendor/assets/javascripts/ace/mode-json.js +1 -0
  75. data/vendor/assets/javascripts/ace/mode-latex-noconflict.js +1 -0
  76. data/vendor/assets/javascripts/ace/mode-latex-uncompressed-noconflict.js +95 -0
  77. data/vendor/assets/javascripts/ace/mode-latex-uncompressed.js +95 -0
  78. data/vendor/assets/javascripts/ace/mode-latex.js +1 -0
  79. data/vendor/assets/javascripts/ace/mode-lua-noconflict.js +1 -0
  80. data/vendor/assets/javascripts/ace/mode-lua-uncompressed-noconflict.js +523 -0
  81. data/vendor/assets/javascripts/ace/mode-lua-uncompressed.js +523 -0
  82. data/vendor/assets/javascripts/ace/mode-lua.js +1 -0
  83. data/vendor/assets/javascripts/ace/mode-markdown-noconflict.js +1 -0
  84. data/vendor/assets/javascripts/ace/mode-markdown-uncompressed-noconflict.js +2819 -0
  85. data/vendor/assets/javascripts/ace/mode-markdown-uncompressed.js +2819 -0
  86. data/vendor/assets/javascripts/ace/mode-markdown.js +1 -0
  87. data/vendor/assets/javascripts/ace/mode-ocaml-noconflict.js +1 -0
  88. data/vendor/assets/javascripts/ace/mode-ocaml-uncompressed-noconflict.js +539 -0
  89. data/vendor/assets/javascripts/ace/mode-ocaml-uncompressed.js +539 -0
  90. data/vendor/assets/javascripts/ace/mode-ocaml.js +1 -0
  91. data/vendor/assets/javascripts/ace/mode-perl-noconflict.js +1 -0
  92. data/vendor/assets/javascripts/ace/mode-perl-uncompressed-noconflict.js +573 -0
  93. data/vendor/assets/javascripts/ace/mode-perl-uncompressed.js +573 -0
  94. data/vendor/assets/javascripts/ace/mode-perl.js +1 -0
  95. data/vendor/assets/javascripts/ace/mode-pgsql-noconflict.js +1 -0
  96. data/vendor/assets/javascripts/ace/mode-pgsql-uncompressed-noconflict.js +1107 -0
  97. data/vendor/assets/javascripts/ace/mode-pgsql-uncompressed.js +1107 -0
  98. data/vendor/assets/javascripts/ace/mode-pgsql.js +1 -0
  99. data/vendor/assets/javascripts/ace/mode-php-noconflict.js +1 -0
  100. data/vendor/assets/javascripts/ace/mode-php-uncompressed-noconflict.js +1884 -0
  101. data/vendor/assets/javascripts/ace/mode-php-uncompressed.js +1884 -0
  102. data/vendor/assets/javascripts/ace/mode-php.js +1 -0
  103. data/vendor/assets/javascripts/ace/mode-powershell-noconflict.js +1 -0
  104. data/vendor/assets/javascripts/ace/mode-powershell-uncompressed-noconflict.js +706 -0
  105. data/vendor/assets/javascripts/ace/mode-powershell-uncompressed.js +706 -0
  106. data/vendor/assets/javascripts/ace/mode-powershell.js +1 -0
  107. data/vendor/assets/javascripts/ace/mode-python-noconflict.js +1 -0
  108. data/vendor/assets/javascripts/ace/mode-python-uncompressed-noconflict.js +506 -0
  109. data/vendor/assets/javascripts/ace/mode-python-uncompressed.js +506 -0
  110. data/vendor/assets/javascripts/ace/mode-python.js +1 -0
  111. data/vendor/assets/javascripts/ace/mode-ruby-noconflict.js +1 -0
  112. data/vendor/assets/javascripts/ace/mode-ruby-uncompressed-noconflict.js +391 -0
  113. data/vendor/assets/javascripts/ace/mode-ruby-uncompressed.js +391 -0
  114. data/vendor/assets/javascripts/ace/mode-ruby.js +1 -0
  115. data/vendor/assets/javascripts/ace/mode-scad-noconflict.js +1 -0
  116. data/vendor/assets/javascripts/ace/mode-scad-uncompressed-noconflict.js +906 -0
  117. data/vendor/assets/javascripts/ace/mode-scad-uncompressed.js +906 -0
  118. data/vendor/assets/javascripts/ace/mode-scad.js +1 -0
  119. data/vendor/assets/javascripts/ace/mode-scala-noconflict.js +1 -0
  120. data/vendor/assets/javascripts/ace/mode-scala-uncompressed-noconflict.js +1282 -0
  121. data/vendor/assets/javascripts/ace/mode-scala-uncompressed.js +1282 -0
  122. data/vendor/assets/javascripts/ace/mode-scala.js +1 -0
  123. data/vendor/assets/javascripts/ace/mode-scss-noconflict.js +1 -0
  124. data/vendor/assets/javascripts/ace/mode-scss-uncompressed-noconflict.js +678 -0
  125. data/vendor/assets/javascripts/ace/mode-scss-uncompressed.js +678 -0
  126. data/vendor/assets/javascripts/ace/mode-scss.js +1 -0
  127. data/vendor/assets/javascripts/ace/mode-sh-noconflict.js +1 -0
  128. data/vendor/assets/javascripts/ace/mode-sh-uncompressed-noconflict.js +268 -0
  129. data/vendor/assets/javascripts/ace/mode-sh-uncompressed.js +268 -0
  130. data/vendor/assets/javascripts/ace/mode-sh.js +1 -0
  131. data/vendor/assets/javascripts/ace/mode-sql-noconflict.js +1 -0
  132. data/vendor/assets/javascripts/ace/mode-sql-uncompressed-noconflict.js +159 -0
  133. data/vendor/assets/javascripts/ace/mode-sql-uncompressed.js +159 -0
  134. data/vendor/assets/javascripts/ace/mode-sql.js +1 -0
  135. data/vendor/assets/javascripts/ace/mode-svg-noconflict.js +1 -0
  136. data/vendor/assets/javascripts/ace/mode-svg-uncompressed-noconflict.js +2016 -0
  137. data/vendor/assets/javascripts/ace/mode-svg-uncompressed.js +2016 -0
  138. data/vendor/assets/javascripts/ace/mode-svg.js +1 -0
  139. data/vendor/assets/javascripts/ace/mode-text-noconflict.js +0 -0
  140. data/vendor/assets/javascripts/ace/mode-text-uncompressed-noconflict.js +0 -0
  141. data/vendor/assets/javascripts/ace/mode-text-uncompressed.js +0 -0
  142. data/vendor/assets/javascripts/ace/mode-text.js +0 -0
  143. data/vendor/assets/javascripts/ace/mode-textile-noconflict.js +1 -0
  144. data/vendor/assets/javascripts/ace/mode-textile-uncompressed-noconflict.js +254 -0
  145. data/vendor/assets/javascripts/ace/mode-textile-uncompressed.js +254 -0
  146. data/vendor/assets/javascripts/ace/mode-textile.js +1 -0
  147. data/vendor/assets/javascripts/ace/mode-xml-noconflict.js +1 -0
  148. data/vendor/assets/javascripts/ace/mode-xml-uncompressed-noconflict.js +1001 -0
  149. data/vendor/assets/javascripts/ace/mode-xml-uncompressed.js +1001 -0
  150. data/vendor/assets/javascripts/ace/mode-xml.js +1 -0
  151. data/vendor/assets/javascripts/ace/theme-chrome-noconflict.js +1 -0
  152. data/vendor/assets/javascripts/ace/theme-chrome-uncompressed-noconflict.js +212 -0
  153. data/vendor/assets/javascripts/ace/theme-chrome-uncompressed.js +212 -0
  154. data/vendor/assets/javascripts/ace/theme-chrome.js +1 -0
  155. data/vendor/assets/javascripts/ace/theme-clouds-noconflict.js +1 -0
  156. data/vendor/assets/javascripts/ace/theme-clouds-uncompressed-noconflict.js +155 -0
  157. data/vendor/assets/javascripts/ace/theme-clouds-uncompressed.js +155 -0
  158. data/vendor/assets/javascripts/ace/theme-clouds.js +1 -0
  159. data/vendor/assets/javascripts/ace/theme-clouds_midnight-noconflict.js +1 -0
  160. data/vendor/assets/javascripts/ace/theme-clouds_midnight-uncompressed-noconflict.js +156 -0
  161. data/vendor/assets/javascripts/ace/theme-clouds_midnight-uncompressed.js +156 -0
  162. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +1 -0
  163. data/vendor/assets/javascripts/ace/theme-cobalt-noconflict.js +1 -0
  164. data/vendor/assets/javascripts/ace/theme-cobalt-uncompressed-noconflict.js +170 -0
  165. data/vendor/assets/javascripts/ace/theme-cobalt-uncompressed.js +170 -0
  166. data/vendor/assets/javascripts/ace/theme-cobalt.js +1 -0
  167. data/vendor/assets/javascripts/ace/theme-crimson_editor-noconflict.js +1 -0
  168. data/vendor/assets/javascripts/ace/theme-crimson_editor-uncompressed-noconflict.js +198 -0
  169. data/vendor/assets/javascripts/ace/theme-crimson_editor-uncompressed.js +198 -0
  170. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +1 -0
  171. data/vendor/assets/javascripts/ace/theme-dawn-noconflict.js +1 -0
  172. data/vendor/assets/javascripts/ace/theme-dawn-uncompressed-noconflict.js +174 -0
  173. data/vendor/assets/javascripts/ace/theme-dawn-uncompressed.js +174 -0
  174. data/vendor/assets/javascripts/ace/theme-dawn.js +1 -0
  175. data/vendor/assets/javascripts/ace/theme-dreamweaver-noconflict.js +1 -0
  176. data/vendor/assets/javascripts/ace/theme-dreamweaver-uncompressed-noconflict.js +227 -0
  177. data/vendor/assets/javascripts/ace/theme-dreamweaver-uncompressed.js +227 -0
  178. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +1 -0
  179. data/vendor/assets/javascripts/ace/theme-eclipse-noconflict.js +1 -0
  180. data/vendor/assets/javascripts/ace/theme-eclipse-uncompressed-noconflict.js +147 -0
  181. data/vendor/assets/javascripts/ace/theme-eclipse-uncompressed.js +147 -0
  182. data/vendor/assets/javascripts/ace/theme-eclipse.js +1 -0
  183. data/vendor/assets/javascripts/ace/theme-idle_fingers-noconflict.js +1 -0
  184. data/vendor/assets/javascripts/ace/theme-idle_fingers-uncompressed-noconflict.js +162 -0
  185. data/vendor/assets/javascripts/ace/theme-idle_fingers-uncompressed.js +162 -0
  186. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +1 -0
  187. data/vendor/assets/javascripts/ace/theme-kr_theme-noconflict.js +1 -0
  188. data/vendor/assets/javascripts/ace/theme-kr_theme-uncompressed-noconflict.js +165 -0
  189. data/vendor/assets/javascripts/ace/theme-kr_theme-uncompressed.js +165 -0
  190. data/vendor/assets/javascripts/ace/theme-kr_theme.js +1 -0
  191. data/vendor/assets/javascripts/ace/theme-merbivore-noconflict.js +1 -0
  192. data/vendor/assets/javascripts/ace/theme-merbivore-uncompressed-noconflict.js +165 -0
  193. data/vendor/assets/javascripts/ace/theme-merbivore-uncompressed.js +165 -0
  194. data/vendor/assets/javascripts/ace/theme-merbivore.js +1 -0
  195. data/vendor/assets/javascripts/ace/theme-merbivore_soft-noconflict.js +1 -0
  196. data/vendor/assets/javascripts/ace/theme-merbivore_soft-uncompressed-noconflict.js +171 -0
  197. data/vendor/assets/javascripts/ace/theme-merbivore_soft-uncompressed.js +171 -0
  198. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +1 -0
  199. data/vendor/assets/javascripts/ace/theme-mono_industrial-noconflict.js +1 -0
  200. data/vendor/assets/javascripts/ace/theme-mono_industrial-uncompressed-noconflict.js +169 -0
  201. data/vendor/assets/javascripts/ace/theme-mono_industrial-uncompressed.js +169 -0
  202. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +1 -0
  203. data/vendor/assets/javascripts/ace/theme-monokai-noconflict.js +1 -0
  204. data/vendor/assets/javascripts/ace/theme-monokai-uncompressed-noconflict.js +171 -0
  205. data/vendor/assets/javascripts/ace/theme-monokai-uncompressed.js +171 -0
  206. data/vendor/assets/javascripts/ace/theme-monokai.js +1 -0
  207. data/vendor/assets/javascripts/ace/theme-pastel_on_dark-noconflict.js +1 -0
  208. data/vendor/assets/javascripts/ace/theme-pastel_on_dark-uncompressed-noconflict.js +179 -0
  209. data/vendor/assets/javascripts/ace/theme-pastel_on_dark-uncompressed.js +179 -0
  210. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +1 -0
  211. data/vendor/assets/javascripts/ace/theme-solarized_dark-noconflict.js +1 -0
  212. data/vendor/assets/javascripts/ace/theme-solarized_dark-uncompressed-noconflict.js +160 -0
  213. data/vendor/assets/javascripts/ace/theme-solarized_dark-uncompressed.js +160 -0
  214. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +1 -0
  215. data/vendor/assets/javascripts/ace/theme-solarized_light-noconflict.js +1 -0
  216. data/vendor/assets/javascripts/ace/theme-solarized_light-uncompressed-noconflict.js +159 -0
  217. data/vendor/assets/javascripts/ace/theme-solarized_light-uncompressed.js +159 -0
  218. data/vendor/assets/javascripts/ace/theme-solarized_light.js +1 -0
  219. data/vendor/assets/javascripts/ace/theme-textmate-noconflict.js +0 -0
  220. data/vendor/assets/javascripts/ace/theme-textmate-uncompressed-noconflict.js +0 -0
  221. data/vendor/assets/javascripts/ace/theme-textmate-uncompressed.js +0 -0
  222. data/vendor/assets/javascripts/ace/theme-textmate.js +0 -0
  223. data/vendor/assets/javascripts/ace/theme-tomorrow-noconflict.js +1 -0
  224. data/vendor/assets/javascripts/ace/theme-tomorrow-uncompressed-noconflict.js +189 -0
  225. data/vendor/assets/javascripts/ace/theme-tomorrow-uncompressed.js +189 -0
  226. data/vendor/assets/javascripts/ace/theme-tomorrow.js +1 -0
  227. data/vendor/assets/javascripts/ace/theme-tomorrow_night-noconflict.js +1 -0
  228. data/vendor/assets/javascripts/ace/theme-tomorrow_night-uncompressed-noconflict.js +189 -0
  229. data/vendor/assets/javascripts/ace/theme-tomorrow_night-uncompressed.js +189 -0
  230. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +1 -0
  231. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-noconflict.js +1 -0
  232. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-uncompressed-noconflict.js +189 -0
  233. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-uncompressed.js +189 -0
  234. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +1 -0
  235. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-noconflict.js +1 -0
  236. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-uncompressed-noconflict.js +189 -0
  237. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-uncompressed.js +189 -0
  238. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +1 -0
  239. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-noconflict.js +1 -0
  240. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-uncompressed-noconflict.js +185 -0
  241. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-uncompressed.js +185 -0
  242. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +1 -0
  243. data/vendor/assets/javascripts/ace/theme-twilight-noconflict.js +1 -0
  244. data/vendor/assets/javascripts/ace/theme-twilight-uncompressed-noconflict.js +183 -0
  245. data/vendor/assets/javascripts/ace/theme-twilight-uncompressed.js +183 -0
  246. data/vendor/assets/javascripts/ace/theme-twilight.js +1 -0
  247. data/vendor/assets/javascripts/ace/theme-vibrant_ink-noconflict.js +1 -0
  248. data/vendor/assets/javascripts/ace/theme-vibrant_ink-uncompressed-noconflict.js +166 -0
  249. data/vendor/assets/javascripts/ace/theme-vibrant_ink-uncompressed.js +166 -0
  250. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +1 -0
  251. data/vendor/assets/javascripts/ace/worker-coffee.js +7456 -0
  252. data/vendor/assets/javascripts/ace/worker-css.js +11693 -0
  253. data/vendor/assets/javascripts/ace/worker-javascript.js +10305 -0
  254. data/vendor/assets/javascripts/ace/worker-json.js +3062 -0
  255. metadata +310 -0
@@ -0,0 +1 @@
1
+ define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","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("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",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)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),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("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|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|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|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|pointer-events|position|quotes|resize|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|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".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="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?: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: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":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.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:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=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/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/groovy_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./groovy_highlight_rules").GroovyHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","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("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[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"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}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)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),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:"\\/\\/.*$"},(new 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","text","entity.name.function","text","paren.lparen","variable.parameter","paren.rparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()(.*?)(\\))"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:"support.function",regex:"\\b(?:s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()"},{token:"support.function.dom",regex:"\\b(?: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:"support.function.constant",regex:"\\b(?: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:["punctuation.operator","support.function.firebug"],regex:"(\\.)(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:[{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}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"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}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",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:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"'",next:"start"}]},this.embedRules(g,"doc-",[(new 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),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),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}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.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)}),ace.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)}),ace.define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","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("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{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 e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.GroovyHighlightRules=h})
@@ -0,0 +1,1280 @@
1
+ ace.define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var JavaScriptMode = require("./javascript").Mode;
6
+ var Tokenizer = require("../tokenizer").Tokenizer;
7
+ var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
8
+
9
+ var Mode = function() {
10
+ JavaScriptMode.call(this);
11
+ this.$tokenizer = new Tokenizer(new GroovyHighlightRules().getRules());
12
+ };
13
+ oop.inherits(Mode, JavaScriptMode);
14
+
15
+ (function() {
16
+
17
+ this.createWorker = function(session) {
18
+ return null;
19
+ };
20
+
21
+ }).call(Mode.prototype);
22
+
23
+ exports.Mode = Mode;
24
+ });
25
+ /* ***** BEGIN LICENSE BLOCK *****
26
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
27
+ *
28
+ * The contents of this file are subject to the Mozilla Public License Version
29
+ * 1.1 (the "License"); you may not use this file except in compliance with
30
+ * the License. You may obtain a copy of the License at
31
+ * http://www.mozilla.org/MPL/
32
+ *
33
+ * Software distributed under the License is distributed on an "AS IS" basis,
34
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
35
+ * for the specific language governing rights and limitations under the
36
+ * License.
37
+ *
38
+ * The Original Code is Ajax.org Code Editor (ACE).
39
+ *
40
+ * The Initial Developer of the Original Code is
41
+ * Ajax.org B.V.
42
+ * Portions created by the Initial Developer are Copyright (C) 2010
43
+ * the Initial Developer. All Rights Reserved.
44
+ *
45
+ * Contributor(s):
46
+ * Fabian Jakobs <fabian AT ajax DOT org>
47
+ *
48
+ * Alternatively, the contents of this file may be used under the terms of
49
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
50
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
51
+ * in which case the provisions of the GPL or the LGPL are applicable instead
52
+ * of those above. If you wish to allow use of your version of this file only
53
+ * under the terms of either the GPL or the LGPL, and not to allow others to
54
+ * use your version of this file under the terms of the MPL, indicate your
55
+ * decision by deleting the provisions above and replace them with the notice
56
+ * and other provisions required by the GPL or the LGPL. If you do not delete
57
+ * the provisions above, a recipient may use your version of this file under
58
+ * the terms of any one of the MPL, the GPL or the LGPL.
59
+ *
60
+ * ***** END LICENSE BLOCK ***** */
61
+
62
+ ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
63
+ "use strict";
64
+
65
+ var oop = require("../lib/oop");
66
+ var TextMode = require("./text").Mode;
67
+ var Tokenizer = require("../tokenizer").Tokenizer;
68
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
69
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
70
+ var Range = require("../range").Range;
71
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
72
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
73
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
74
+
75
+ var Mode = function() {
76
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
77
+ this.$outdent = new MatchingBraceOutdent();
78
+ this.$behaviour = new CstyleBehaviour();
79
+ this.foldingRules = new CStyleFoldMode();
80
+ };
81
+ oop.inherits(Mode, TextMode);
82
+
83
+ (function() {
84
+
85
+
86
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
87
+ var outdent = true;
88
+ var re = /^(\s*)\/\//;
89
+
90
+ for (var i=startRow; i<= endRow; i++) {
91
+ if (!re.test(doc.getLine(i))) {
92
+ outdent = false;
93
+ break;
94
+ }
95
+ }
96
+
97
+ if (outdent) {
98
+ var deleteRange = new Range(0, 0, 0, 0);
99
+ for (var i=startRow; i<= endRow; i++)
100
+ {
101
+ var line = doc.getLine(i);
102
+ var m = line.match(re);
103
+ deleteRange.start.row = i;
104
+ deleteRange.end.row = i;
105
+ deleteRange.end.column = m[0].length;
106
+ doc.replace(deleteRange, m[1]);
107
+ }
108
+ }
109
+ else {
110
+ doc.indentRows(startRow, endRow, "//");
111
+ }
112
+ };
113
+
114
+ this.getNextLineIndent = function(state, line, tab) {
115
+ var indent = this.$getIndent(line);
116
+
117
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
118
+ var tokens = tokenizedLine.tokens;
119
+ var endState = tokenizedLine.state;
120
+
121
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
122
+ return indent;
123
+ }
124
+
125
+ if (state == "start" || state == "regex_allowed") {
126
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
127
+ if (match) {
128
+ indent += tab;
129
+ }
130
+ } else if (state == "doc-start") {
131
+ if (endState == "start" || state == "regex_allowed") {
132
+ return "";
133
+ }
134
+ var match = line.match(/^\s*(\/?)\*/);
135
+ if (match) {
136
+ if (match[1]) {
137
+ indent += " ";
138
+ }
139
+ indent += "* ";
140
+ }
141
+ }
142
+
143
+ return indent;
144
+ };
145
+
146
+ this.checkOutdent = function(state, line, input) {
147
+ return this.$outdent.checkOutdent(line, input);
148
+ };
149
+
150
+ this.autoOutdent = function(state, doc, row) {
151
+ this.$outdent.autoOutdent(doc, row);
152
+ };
153
+
154
+ this.createWorker = function(session) {
155
+ var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
156
+ worker.attachToDocument(session.getDocument());
157
+
158
+ worker.on("jslint", function(results) {
159
+ var errors = [];
160
+ for (var i=0; i<results.data.length; i++) {
161
+ var error = results.data[i];
162
+ if (error)
163
+ errors.push({
164
+ row: error.line-1,
165
+ column: error.character-1,
166
+ text: error.reason,
167
+ type: "warning",
168
+ lint: error
169
+ });
170
+ }
171
+ session.setAnnotations(errors);
172
+ });
173
+
174
+ worker.on("narcissus", function(e) {
175
+ session.setAnnotations([e.data]);
176
+ });
177
+
178
+ worker.on("terminate", function() {
179
+ session.clearAnnotations();
180
+ });
181
+
182
+ return worker;
183
+ };
184
+
185
+ }).call(Mode.prototype);
186
+
187
+ exports.Mode = Mode;
188
+ });
189
+ /* ***** BEGIN LICENSE BLOCK *****
190
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
191
+ *
192
+ * The contents of this file are subject to the Mozilla Public License Version
193
+ * 1.1 (the "License"); you may not use this file except in compliance with
194
+ * the License. You may obtain a copy of the License at
195
+ * http://www.mozilla.org/MPL/
196
+ *
197
+ * Software distributed under the License is distributed on an "AS IS" basis,
198
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
199
+ * for the specific language governing rights and limitations under the
200
+ * License.
201
+ *
202
+ * The Original Code is Ajax.org Code Editor (ACE).
203
+ *
204
+ * The Initial Developer of the Original Code is
205
+ * Ajax.org B.V.
206
+ * Portions created by the Initial Developer are Copyright (C) 2010
207
+ * the Initial Developer. All Rights Reserved.
208
+ *
209
+ * Contributor(s):
210
+ * Fabian Jakobs <fabian AT ajax DOT org>
211
+ * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
212
+ *
213
+ * Alternatively, the contents of this file may be used under the terms of
214
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
215
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
216
+ * in which case the provisions of the GPL or the LGPL are applicable instead
217
+ * of those above. If you wish to allow use of your version of this file only
218
+ * under the terms of either the GPL or the LGPL, and not to allow others to
219
+ * use your version of this file under the terms of the MPL, indicate your
220
+ * decision by deleting the provisions above and replace them with the notice
221
+ * and other provisions required by the GPL or the LGPL. If you do not delete
222
+ * the provisions above, a recipient may use your version of this file under
223
+ * the terms of any one of the MPL, the GPL or the LGPL.
224
+ *
225
+ * ***** END LICENSE BLOCK ***** */
226
+
227
+ 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) {
228
+ "use strict";
229
+
230
+ var oop = require("../lib/oop");
231
+ var lang = require("../lib/lang");
232
+ var unicode = require("../unicode");
233
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
234
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
235
+
236
+ var JavaScriptHighlightRules = function() {
237
+
238
+ // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
239
+ var globals = lang.arrayToMap(
240
+ // Constructors
241
+ ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
242
+ // E4X
243
+ "Namespace|QName|XML|XMLList|" +
244
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
245
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
246
+ // Errors
247
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
248
+ "SyntaxError|TypeError|URIError|" +
249
+ // Non-constructor functions
250
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
251
+ "isNaN|parseFloat|parseInt|" +
252
+ // Other
253
+ "JSON|Math|" +
254
+ // Pseudo
255
+ "this|arguments|prototype|window|document"
256
+ ).split("|")
257
+ );
258
+
259
+ var keywords = lang.arrayToMap(
260
+ ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
261
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
262
+ "const|yield|import|get|set").split("|")
263
+ );
264
+
265
+ // keywords which can be followed by regular expressions
266
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
267
+
268
+ var deprecated = lang.arrayToMap(
269
+ ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
270
+ );
271
+
272
+ var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
273
+
274
+ var buildinConstants = lang.arrayToMap(
275
+ ("null|Infinity|NaN|undefined").split("|")
276
+ );
277
+
278
+ var futureReserved = lang.arrayToMap(
279
+ ("class|enum|extends|super|export|implements|private|" +
280
+ "public|interface|package|protected|static").split("|")
281
+ );
282
+
283
+ // TODO: Unicode escape sequences
284
+ var identifierRe = "[" + unicode.packages.L + "\\$_]["
285
+ + unicode.packages.L
286
+ + unicode.packages.Mn + unicode.packages.Mc
287
+ + unicode.packages.Nd
288
+ + unicode.packages.Pc + "\\$_]*\\b";
289
+
290
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
291
+ "u[0-9a-fA-F]{4}|" + // unicode
292
+ "[0-2][0-7]{0,2}|" + // oct
293
+ "3[0-6][0-7]?|" + // oct
294
+ "37[0-7]?|" + // oct
295
+ "[4-7][0-7]?|" + //oct
296
+ ".)";
297
+
298
+ // regexp must not have capturing parentheses. Use (?:) instead.
299
+ // regexps are ordered -> the first match is used
300
+
301
+ this.$rules = {
302
+ "start" : [
303
+ {
304
+ token : "comment",
305
+ regex : "\\/\\/.*$"
306
+ },
307
+ new DocCommentHighlightRules().getStartRule("doc-start"),
308
+ {
309
+ token : "comment", // multi line comment
310
+ merge : true,
311
+ regex : "\\/\\*",
312
+ next : "comment"
313
+ }, {
314
+ token : "string",
315
+ regex : "'",
316
+ next : "qstring"
317
+ }, {
318
+ token : "string",
319
+ regex : '"',
320
+ next : "qqstring"
321
+ }, {
322
+ token : "constant.numeric", // hex
323
+ regex : "0[xX][0-9a-fA-F]+\\b"
324
+ }, {
325
+ token : "constant.numeric", // float
326
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
327
+ }, {
328
+ token : ["storage.type", "text", "entity.name.function", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
329
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()(.*?)(\\))"
330
+ }, {
331
+ token : "constant.language.boolean",
332
+ regex : "(?:true|false)\\b"
333
+ }, {
334
+ token : "keyword",
335
+ regex : "(?:" + kwBeforeRe + ")\\b",
336
+ next : "regex_allowed"
337
+ }, {
338
+ token : "support.function",
339
+ regex : "\\b(?:s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()"
340
+ }, {
341
+ token : "support.function.dom",
342
+ regex : "\\b(?: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(?=\\()"
343
+ }, {
344
+ token : "support.function.constant",
345
+ regex : "\\b(?: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"
346
+ }, {
347
+ token : ["punctuation.operator", "support.function.firebug"],
348
+ regex : "(\\.)(warn|info|log|error|time|timeEnd|assert)\\b"
349
+
350
+ }, {
351
+ token : function(value) {
352
+ if (globals.hasOwnProperty(value))
353
+ return "variable.language";
354
+ else if (deprecated.hasOwnProperty(value))
355
+ return "invalid.deprecated";
356
+ else if (definitions.hasOwnProperty(value))
357
+ return "storage.type";
358
+ else if (keywords.hasOwnProperty(value))
359
+ return "keyword";
360
+ else if (buildinConstants.hasOwnProperty(value))
361
+ return "constant.language";
362
+ else if (futureReserved.hasOwnProperty(value))
363
+ return "invalid.illegal";
364
+ else if (value == "debugger")
365
+ return "invalid.deprecated";
366
+ else
367
+ return "identifier";
368
+ },
369
+ regex : identifierRe
370
+ }, {
371
+ token : "keyword.operator",
372
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
373
+ next : "regex_allowed"
374
+ }, {
375
+ token : "punctuation.operator",
376
+ regex : "\\?|\\:|\\,|\\;|\\.",
377
+ next : "regex_allowed"
378
+ }, {
379
+ token : "paren.lparen",
380
+ regex : "[[({]",
381
+ next : "regex_allowed"
382
+ }, {
383
+ token : "paren.rparen",
384
+ regex : "[\\])}]"
385
+ }, {
386
+ token : "keyword.operator",
387
+ regex : "\\/=?",
388
+ next : "regex_allowed"
389
+ }, {
390
+ token: "comment",
391
+ regex: "^#!.*$"
392
+ }, {
393
+ token : "text",
394
+ regex : "\\s+"
395
+ }
396
+ ],
397
+ // regular expressions are only allowed after certain tokens. This
398
+ // makes sure we don't mix up regexps with the divison operator
399
+ "regex_allowed": [
400
+ {
401
+ token : "comment", // multi line comment
402
+ merge : true,
403
+ regex : "\\/\\*",
404
+ next : "comment_regex_allowed"
405
+ }, {
406
+ token : "comment",
407
+ regex : "\\/\\/.*$"
408
+ }, {
409
+ token: "string.regexp",
410
+ regex: "\\/",
411
+ next: "regex",
412
+ merge: true
413
+ }, {
414
+ token : "text",
415
+ regex : "\\s+"
416
+ }, {
417
+ // immediately return to the start mode without matching
418
+ // anything
419
+ token: "empty",
420
+ regex: "",
421
+ next: "start"
422
+ }
423
+ ],
424
+ "regex": [
425
+ {
426
+ token: "regexp.keyword.operator",
427
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
428
+ next: "regex"
429
+ }, {
430
+ // flag
431
+ token: "string.regexp",
432
+ regex: "/\\w*",
433
+ next: "start",
434
+ merge: true
435
+ }, {
436
+ token: "string.regexp",
437
+ regex: "[^\\\\/\\[]+",
438
+ next: "regex",
439
+ merge: true
440
+ }, {
441
+ token: "string.regexp.charachterclass",
442
+ regex: "\\[",
443
+ next: "regex_character_class",
444
+ merge: true
445
+ }, {
446
+ token: "empty",
447
+ regex: "",
448
+ next: "start"
449
+ }
450
+ ],
451
+ "regex_character_class": [
452
+ {
453
+ token: "regexp.keyword.operator",
454
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",
455
+ next: "regex_character_class"
456
+ }, {
457
+ token: "string.regexp.charachterclass",
458
+ regex: "]",
459
+ next: "regex",
460
+ merge: true
461
+ }, {
462
+ token: "string.regexp.charachterclass",
463
+ regex: "[^\\\\\\]]+",
464
+ next: "regex_character_class",
465
+ merge: true
466
+ }, {
467
+ token: "empty",
468
+ regex: "",
469
+ next: "start"
470
+ }
471
+ ],
472
+ "comment_regex_allowed" : [
473
+ {
474
+ token : "comment", // closing comment
475
+ regex : ".*?\\*\\/",
476
+ merge : true,
477
+ next : "regex_allowed"
478
+ }, {
479
+ token : "comment", // comment spanning whole line
480
+ merge : true,
481
+ regex : ".+"
482
+ }
483
+ ],
484
+ "comment" : [
485
+ {
486
+ token : "comment", // closing comment
487
+ regex : ".*?\\*\\/",
488
+ merge : true,
489
+ next : "start"
490
+ }, {
491
+ token : "comment", // comment spanning whole line
492
+ merge : true,
493
+ regex : ".+"
494
+ }
495
+ ],
496
+ "qqstring" : [
497
+ {
498
+ token : "constant.language.escape",
499
+ regex : escapedRe
500
+ }, {
501
+ token : "string",
502
+ regex : '[^"\\\\]+'
503
+ }, {
504
+ token : "string",
505
+ regex : '"',
506
+ next : "start"
507
+ }
508
+ ],
509
+ "qstring" : [
510
+ {
511
+ token : "constant.language.escape",
512
+ regex : escapedRe
513
+ }, {
514
+ token : "string",
515
+ regex : "[^'\\\\]+"
516
+ }, {
517
+ token : "string",
518
+ regex : "'",
519
+ next : "start"
520
+ }
521
+ ]
522
+ };
523
+
524
+ this.embedRules(DocCommentHighlightRules, "doc-",
525
+ [ new DocCommentHighlightRules().getEndRule("start") ]);
526
+ };
527
+
528
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
529
+
530
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
531
+ });
532
+ /* ***** BEGIN LICENSE BLOCK *****
533
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
534
+ *
535
+ * The contents of this file are subject to the Mozilla Public License Version
536
+ * 1.1 (the "License"); you may not use this file except in compliance with
537
+ * the License. You may obtain a copy of the License at
538
+ * http://www.mozilla.org/MPL/
539
+ *
540
+ * Software distributed under the License is distributed on an "AS IS" basis,
541
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
542
+ * for the specific language governing rights and limitations under the
543
+ * License.
544
+ *
545
+ * The Original Code is Ajax.org Code Editor (ACE).
546
+ *
547
+ * The Initial Developer of the Original Code is
548
+ * Ajax.org B.V.
549
+ * Portions created by the Initial Developer are Copyright (C) 2010
550
+ * the Initial Developer. All Rights Reserved.
551
+ *
552
+ * Contributor(s):
553
+ * Fabian Jakobs <fabian AT ajax DOT org>
554
+ *
555
+ * Alternatively, the contents of this file may be used under the terms of
556
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
557
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
558
+ * in which case the provisions of the GPL or the LGPL are applicable instead
559
+ * of those above. If you wish to allow use of your version of this file only
560
+ * under the terms of either the GPL or the LGPL, and not to allow others to
561
+ * use your version of this file under the terms of the MPL, indicate your
562
+ * decision by deleting the provisions above and replace them with the notice
563
+ * and other provisions required by the GPL or the LGPL. If you do not delete
564
+ * the provisions above, a recipient may use your version of this file under
565
+ * the terms of any one of the MPL, the GPL or the LGPL.
566
+ *
567
+ * ***** END LICENSE BLOCK ***** */
568
+
569
+ ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
570
+ "use strict";
571
+
572
+ var oop = require("../lib/oop");
573
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
574
+
575
+ var DocCommentHighlightRules = function() {
576
+
577
+ this.$rules = {
578
+ "start" : [ {
579
+ token : "comment.doc.tag",
580
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
581
+ }, {
582
+ token : "comment.doc",
583
+ merge : true,
584
+ regex : "\\s+"
585
+ }, {
586
+ token : "comment.doc",
587
+ merge : true,
588
+ regex : "TODO"
589
+ }, {
590
+ token : "comment.doc",
591
+ merge : true,
592
+ regex : "[^@\\*]+"
593
+ }, {
594
+ token : "comment.doc",
595
+ merge : true,
596
+ regex : "."
597
+ }]
598
+ };
599
+ };
600
+
601
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
602
+
603
+ (function() {
604
+
605
+ this.getStartRule = function(start) {
606
+ return {
607
+ token : "comment.doc", // doc comment
608
+ merge : true,
609
+ regex : "\\/\\*(?=\\*)",
610
+ next : start
611
+ };
612
+ };
613
+
614
+ this.getEndRule = function (start) {
615
+ return {
616
+ token : "comment.doc", // closing comment
617
+ merge : true,
618
+ regex : "\\*\\/",
619
+ next : start
620
+ };
621
+ };
622
+
623
+ }).call(DocCommentHighlightRules.prototype);
624
+
625
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
626
+
627
+ });
628
+ /* ***** BEGIN LICENSE BLOCK *****
629
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
630
+ *
631
+ * The contents of this file are subject to the Mozilla Public License Version
632
+ * 1.1 (the "License"); you may not use this file except in compliance with
633
+ * the License. You may obtain a copy of the License at
634
+ * http://www.mozilla.org/MPL/
635
+ *
636
+ * Software distributed under the License is distributed on an "AS IS" basis,
637
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
638
+ * for the specific language governing rights and limitations under the
639
+ * License.
640
+ *
641
+ * The Original Code is Ajax.org Code Editor (ACE).
642
+ *
643
+ * The Initial Developer of the Original Code is
644
+ * Ajax.org B.V.
645
+ * Portions created by the Initial Developer are Copyright (C) 2010
646
+ * the Initial Developer. All Rights Reserved.
647
+ *
648
+ * Contributor(s):
649
+ * Fabian Jakobs <fabian AT ajax DOT org>
650
+ *
651
+ * Alternatively, the contents of this file may be used under the terms of
652
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
653
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
654
+ * in which case the provisions of the GPL or the LGPL are applicable instead
655
+ * of those above. If you wish to allow use of your version of this file only
656
+ * under the terms of either the GPL or the LGPL, and not to allow others to
657
+ * use your version of this file under the terms of the MPL, indicate your
658
+ * decision by deleting the provisions above and replace them with the notice
659
+ * and other provisions required by the GPL or the LGPL. If you do not delete
660
+ * the provisions above, a recipient may use your version of this file under
661
+ * the terms of any one of the MPL, the GPL or the LGPL.
662
+ *
663
+ * ***** END LICENSE BLOCK ***** */
664
+
665
+ ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
666
+ "use strict";
667
+
668
+ var Range = require("../range").Range;
669
+
670
+ var MatchingBraceOutdent = function() {};
671
+
672
+ (function() {
673
+
674
+ this.checkOutdent = function(line, input) {
675
+ if (! /^\s+$/.test(line))
676
+ return false;
677
+
678
+ return /^\s*\}/.test(input);
679
+ };
680
+
681
+ this.autoOutdent = function(doc, row) {
682
+ var line = doc.getLine(row);
683
+ var match = line.match(/^(\s*\})/);
684
+
685
+ if (!match) return 0;
686
+
687
+ var column = match[1].length;
688
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
689
+
690
+ if (!openBracePos || openBracePos.row == row) return 0;
691
+
692
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
693
+ doc.replace(new Range(row, 0, row, column-1), indent);
694
+ };
695
+
696
+ this.$getIndent = function(line) {
697
+ var match = line.match(/^(\s+)/);
698
+ if (match) {
699
+ return match[1];
700
+ }
701
+
702
+ return "";
703
+ };
704
+
705
+ }).call(MatchingBraceOutdent.prototype);
706
+
707
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
708
+ });
709
+ /* vim:ts=4:sts=4:sw=4:
710
+ * ***** BEGIN LICENSE BLOCK *****
711
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
712
+ *
713
+ * The contents of this file are subject to the Mozilla Public License Version
714
+ * 1.1 (the "License"); you may not use this file except in compliance with
715
+ * the License. You may obtain a copy of the License at
716
+ * http://www.mozilla.org/MPL/
717
+ *
718
+ * Software distributed under the License is distributed on an "AS IS" basis,
719
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
720
+ * for the specific language governing rights and limitations under the
721
+ * License.
722
+ *
723
+ * The Original Code is Ajax.org Code Editor (ACE).
724
+ *
725
+ * The Initial Developer of the Original Code is
726
+ * Ajax.org B.V.
727
+ * Portions created by the Initial Developer are Copyright (C) 2010
728
+ * the Initial Developer. All Rights Reserved.
729
+ *
730
+ * Contributor(s):
731
+ * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
732
+ *
733
+ * Alternatively, the contents of this file may be used under the terms of
734
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
735
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
736
+ * in which case the provisions of the GPL or the LGPL are applicable instead
737
+ * of those above. If you wish to allow use of your version of this file only
738
+ * under the terms of either the GPL or the LGPL, and not to allow others to
739
+ * use your version of this file under the terms of the MPL, indicate your
740
+ * decision by deleting the provisions above and replace them with the notice
741
+ * and other provisions required by the GPL or the LGPL. If you do not delete
742
+ * the provisions above, a recipient may use your version of this file under
743
+ * the terms of any one of the MPL, the GPL or the LGPL.
744
+ *
745
+ * ***** END LICENSE BLOCK ***** */
746
+
747
+ ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
748
+ "use strict";
749
+
750
+ var oop = require("../../lib/oop");
751
+ var Behaviour = require('../behaviour').Behaviour;
752
+
753
+ var CstyleBehaviour = function () {
754
+
755
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
756
+ if (text == '{') {
757
+ var selection = editor.getSelectionRange();
758
+ var selected = session.doc.getTextRange(selection);
759
+ if (selected !== "") {
760
+ return {
761
+ text: '{' + selected + '}',
762
+ selection: false
763
+ }
764
+ } else {
765
+ return {
766
+ text: '{}',
767
+ selection: [1, 1]
768
+ }
769
+ }
770
+ } else if (text == '}') {
771
+ var cursor = editor.getCursorPosition();
772
+ var line = session.doc.getLine(cursor.row);
773
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
774
+ if (rightChar == '}') {
775
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
776
+ if (matching !== null) {
777
+ return {
778
+ text: '',
779
+ selection: [1, 1]
780
+ }
781
+ }
782
+ }
783
+ } else if (text == "\n") {
784
+ var cursor = editor.getCursorPosition();
785
+ var line = session.doc.getLine(cursor.row);
786
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
787
+ if (rightChar == '}') {
788
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
789
+ if (!openBracePos)
790
+ return null;
791
+
792
+ var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
793
+ var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
794
+
795
+ return {
796
+ text: '\n' + indent + '\n' + next_indent,
797
+ selection: [1, indent.length, 1, indent.length]
798
+ }
799
+ }
800
+ }
801
+ });
802
+
803
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
804
+ var selected = session.doc.getTextRange(range);
805
+ if (!range.isMultiLine() && selected == '{') {
806
+ var line = session.doc.getLine(range.start.row);
807
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
808
+ if (rightChar == '}') {
809
+ range.end.column++;
810
+ return range;
811
+ }
812
+ }
813
+ });
814
+
815
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
816
+ if (text == '(') {
817
+ var selection = editor.getSelectionRange();
818
+ var selected = session.doc.getTextRange(selection);
819
+ if (selected !== "") {
820
+ return {
821
+ text: '(' + selected + ')',
822
+ selection: false
823
+ }
824
+ } else {
825
+ return {
826
+ text: '()',
827
+ selection: [1, 1]
828
+ }
829
+ }
830
+ } else if (text == ')') {
831
+ var cursor = editor.getCursorPosition();
832
+ var line = session.doc.getLine(cursor.row);
833
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
834
+ if (rightChar == ')') {
835
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
836
+ if (matching !== null) {
837
+ return {
838
+ text: '',
839
+ selection: [1, 1]
840
+ }
841
+ }
842
+ }
843
+ }
844
+ });
845
+
846
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
847
+ var selected = session.doc.getTextRange(range);
848
+ if (!range.isMultiLine() && selected == '(') {
849
+ var line = session.doc.getLine(range.start.row);
850
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
851
+ if (rightChar == ')') {
852
+ range.end.column++;
853
+ return range;
854
+ }
855
+ }
856
+ });
857
+
858
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
859
+ if (text == '"') {
860
+ var selection = editor.getSelectionRange();
861
+ var selected = session.doc.getTextRange(selection);
862
+ if (selected !== "") {
863
+ return {
864
+ text: '"' + selected + '"',
865
+ selection: false
866
+ }
867
+ } else {
868
+ var cursor = editor.getCursorPosition();
869
+ var line = session.doc.getLine(cursor.row);
870
+ var leftChar = line.substring(cursor.column-1, cursor.column);
871
+
872
+ // We're escaped.
873
+ if (leftChar == '\\') {
874
+ return null;
875
+ }
876
+
877
+ // Find what token we're inside.
878
+ var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
879
+ var col = 0, token;
880
+ var quotepos = -1; // Track whether we're inside an open quote.
881
+
882
+ for (var x = 0; x < tokens.length; x++) {
883
+ token = tokens[x];
884
+ if (token.type == "string") {
885
+ quotepos = -1;
886
+ } else if (quotepos < 0) {
887
+ quotepos = token.value.indexOf('"');
888
+ }
889
+ if ((token.value.length + col) > selection.start.column) {
890
+ break;
891
+ }
892
+ col += tokens[x].value.length;
893
+ }
894
+
895
+ // Try and be smart about when we auto insert.
896
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf('"') === token.value.length-1)))) {
897
+ return {
898
+ text: '""',
899
+ selection: [1,1]
900
+ }
901
+ } else if (token && token.type === "string") {
902
+ // Ignore input and move right one if we're typing over the closing quote.
903
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
904
+ if (rightChar == '"') {
905
+ return {
906
+ text: '',
907
+ selection: [1, 1]
908
+ }
909
+ }
910
+ }
911
+ }
912
+ }
913
+ });
914
+
915
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
916
+ var selected = session.doc.getTextRange(range);
917
+ if (!range.isMultiLine() && selected == '"') {
918
+ var line = session.doc.getLine(range.start.row);
919
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
920
+ if (rightChar == '"') {
921
+ range.end.column++;
922
+ return range;
923
+ }
924
+ }
925
+ });
926
+
927
+ }
928
+ oop.inherits(CstyleBehaviour, Behaviour);
929
+
930
+ exports.CstyleBehaviour = CstyleBehaviour;
931
+ });/* ***** BEGIN LICENSE BLOCK *****
932
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
933
+ *
934
+ * The contents of this file are subject to the Mozilla Public License Version
935
+ * 1.1 (the "License"); you may not use this file except in compliance with
936
+ * the License. You may obtain a copy of the License at
937
+ * http://www.mozilla.org/MPL/
938
+ *
939
+ * Software distributed under the License is distributed on an "AS IS" basis,
940
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
941
+ * for the specific language governing rights and limitations under the
942
+ * License.
943
+ *
944
+ * The Original Code is Ajax.org Code Editor (ACE).
945
+ *
946
+ * The Initial Developer of the Original Code is
947
+ * Ajax.org B.V.
948
+ * Portions created by the Initial Developer are Copyright (C) 2010
949
+ * the Initial Developer. All Rights Reserved.
950
+ *
951
+ * Contributor(s):
952
+ * Fabian Jakobs <fabian AT ajax DOT org>
953
+ *
954
+ * Alternatively, the contents of this file may be used under the terms of
955
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
956
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
957
+ * in which case the provisions of the GPL or the LGPL are applicable instead
958
+ * of those above. If you wish to allow use of your version of this file only
959
+ * under the terms of either the GPL or the LGPL, and not to allow others to
960
+ * use your version of this file under the terms of the MPL, indicate your
961
+ * decision by deleting the provisions above and replace them with the notice
962
+ * and other provisions required by the GPL or the LGPL. If you do not delete
963
+ * the provisions above, a recipient may use your version of this file under
964
+ * the terms of any one of the MPL, the GPL or the LGPL.
965
+ *
966
+ * ***** END LICENSE BLOCK ***** */
967
+
968
+ ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
969
+ "use strict";
970
+
971
+ var oop = require("../../lib/oop");
972
+ var Range = require("../../range").Range;
973
+ var BaseFoldMode = require("./fold_mode").FoldMode;
974
+
975
+ var FoldMode = exports.FoldMode = function() {};
976
+ oop.inherits(FoldMode, BaseFoldMode);
977
+
978
+ (function() {
979
+
980
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
981
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
982
+
983
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
984
+ var line = session.getLine(row);
985
+ var match = line.match(this.foldingStartMarker);
986
+ if (match) {
987
+ var i = match.index;
988
+
989
+ if (match[1])
990
+ return this.openingBracketBlock(session, match[1], row, i);
991
+
992
+ var range = session.getCommentFoldRange(row, i + match[0].length);
993
+ range.end.column -= 2;
994
+ return range;
995
+ }
996
+
997
+ if (foldStyle !== "markbeginend")
998
+ return;
999
+
1000
+ var match = line.match(this.foldingStopMarker);
1001
+ if (match) {
1002
+ var i = match.index + match[0].length;
1003
+
1004
+ if (match[2]) {
1005
+ var range = session.getCommentFoldRange(row, i);
1006
+ range.end.column -= 2;
1007
+ return range;
1008
+ }
1009
+
1010
+ var end = {row: row, column: i};
1011
+ var start = session.$findOpeningBracket(match[1], end);
1012
+
1013
+ if (!start)
1014
+ return;
1015
+
1016
+ start.column++;
1017
+ end.column--;
1018
+
1019
+ return Range.fromPoints(start, end);
1020
+ }
1021
+ };
1022
+
1023
+ }).call(FoldMode.prototype);
1024
+
1025
+ });/* ***** BEGIN LICENSE BLOCK *****
1026
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1027
+ *
1028
+ * The contents of this file are subject to the Mozilla Public License Version
1029
+ * 1.1 (the "License"); you may not use this file except in compliance with
1030
+ * the License. You may obtain a copy of the License at
1031
+ * http://www.mozilla.org/MPL/
1032
+ *
1033
+ * Software distributed under the License is distributed on an "AS IS" basis,
1034
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1035
+ * for the specific language governing rights and limitations under the
1036
+ * License.
1037
+ *
1038
+ * The Original Code is Ajax.org Code Editor (ACE).
1039
+ *
1040
+ * The Initial Developer of the Original Code is
1041
+ * Ajax.org B.V.
1042
+ * Portions created by the Initial Developer are Copyright (C) 2010
1043
+ * the Initial Developer. All Rights Reserved.
1044
+ *
1045
+ * Contributor(s):
1046
+ * Fabian Jakobs <fabian AT ajax DOT org>
1047
+ *
1048
+ * Alternatively, the contents of this file may be used under the terms of
1049
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1050
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1051
+ * in which case the provisions of the GPL or the LGPL are applicable instead
1052
+ * of those above. If you wish to allow use of your version of this file only
1053
+ * under the terms of either the GPL or the LGPL, and not to allow others to
1054
+ * use your version of this file under the terms of the MPL, indicate your
1055
+ * decision by deleting the provisions above and replace them with the notice
1056
+ * and other provisions required by the GPL or the LGPL. If you do not delete
1057
+ * the provisions above, a recipient may use your version of this file under
1058
+ * the terms of any one of the MPL, the GPL or the LGPL.
1059
+ *
1060
+ * ***** END LICENSE BLOCK ***** */
1061
+
1062
+ ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
1063
+ "use strict";
1064
+
1065
+ var Range = require("../../range").Range;
1066
+
1067
+ var FoldMode = exports.FoldMode = function() {};
1068
+
1069
+ (function() {
1070
+
1071
+ this.foldingStartMarker = null;
1072
+ this.foldingStopMarker = null;
1073
+
1074
+ // must return "" if there's no fold, to enable caching
1075
+ this.getFoldWidget = function(session, foldStyle, row) {
1076
+ var line = session.getLine(row);
1077
+ if (this.foldingStartMarker.test(line))
1078
+ return "start";
1079
+ if (foldStyle == "markbeginend"
1080
+ && this.foldingStopMarker
1081
+ && this.foldingStopMarker.test(line))
1082
+ return "end";
1083
+ return "";
1084
+ };
1085
+
1086
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
1087
+ return null;
1088
+ };
1089
+
1090
+ this.indentationBlock = function(session, row, column) {
1091
+ var re = /^\s*/;
1092
+ var startRow = row;
1093
+ var endRow = row;
1094
+ var line = session.getLine(row);
1095
+ var startColumn = column || line.length;
1096
+ var startLevel = line.match(re)[0].length;
1097
+ var maxRow = session.getLength()
1098
+
1099
+ while (++row < maxRow) {
1100
+ line = session.getLine(row);
1101
+ var level = line.match(re)[0].length;
1102
+
1103
+ if (level == line.length)
1104
+ continue;
1105
+
1106
+ if (level <= startLevel)
1107
+ break;
1108
+
1109
+ endRow = row;
1110
+ }
1111
+
1112
+ if (endRow > startRow) {
1113
+ var endColumn = session.getLine(endRow).length;
1114
+ return new Range(startRow, startColumn, endRow, endColumn);
1115
+ }
1116
+ };
1117
+
1118
+ this.openingBracketBlock = function(session, bracket, row, column) {
1119
+ var start = {row: row, column: column + 1};
1120
+ var end = session.$findClosingBracket(bracket, start);
1121
+ if (!end)
1122
+ return;
1123
+
1124
+ var fw = session.foldWidgets[end.row];
1125
+ if (fw == null)
1126
+ fw = this.getFoldWidget(session, end.row);
1127
+
1128
+ if (fw == "start") {
1129
+ end.row --;
1130
+ end.column = session.getLine(end.row).length;
1131
+ }
1132
+ return Range.fromPoints(start, end);
1133
+ };
1134
+
1135
+ }).call(FoldMode.prototype);
1136
+
1137
+ });
1138
+ ace.define('ace/mode/groovy_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1139
+ "use strict";
1140
+
1141
+ var oop = require("../lib/oop");
1142
+ var lang = require("../lib/lang");
1143
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
1144
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1145
+
1146
+ var GroovyHighlightRules = function() {
1147
+
1148
+ var keywords = lang.arrayToMap(
1149
+ ("assert|with|abstract|continue|for|new|switch|" +
1150
+ "assert|default|goto|package|synchronized|" +
1151
+ "boolean|do|if|private|this|" +
1152
+ "break|double|implements|protected|throw|" +
1153
+ "byte|else|import|public|throws|" +
1154
+ "case|enum|instanceof|return|transient|" +
1155
+ "catch|extends|int|short|try|" +
1156
+ "char|final|interface|static|void|" +
1157
+ "class|finally|long|strictfp|volatile|" +
1158
+ "def|float|native|super|while").split("|")
1159
+ );
1160
+
1161
+ var buildinConstants = lang.arrayToMap(
1162
+ ("null|Infinity|NaN|undefined").split("|")
1163
+ );
1164
+
1165
+ var langClasses = lang.arrayToMap(
1166
+ ("AbstractMethodError|AssertionError|ClassCircularityError|"+
1167
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
1168
+ "ExceptionInInitializerError|IllegalAccessError|"+
1169
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
1170
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
1171
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
1172
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
1173
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
1174
+ "InstantiationException|IndexOutOfBoundsException|"+
1175
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
1176
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
1177
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
1178
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
1179
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
1180
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
1181
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
1182
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
1183
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
1184
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
1185
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
1186
+ "ArrayStoreException|ClassCastException|LinkageError|"+
1187
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
1188
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
1189
+ "Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
1190
+ );
1191
+
1192
+ var importClasses = lang.arrayToMap(
1193
+ ("").split("|")
1194
+ );
1195
+ // regexp must not have capturing parentheses. Use (?:) instead.
1196
+ // regexps are ordered -> the first match is used
1197
+
1198
+ this.$rules = {
1199
+ "start" : [
1200
+ {
1201
+ token : "comment",
1202
+ regex : "\\/\\/.*$"
1203
+ },
1204
+ new DocCommentHighlightRules().getStartRule("doc-start"),
1205
+ {
1206
+ token : "comment", // multi line comment
1207
+ merge : true,
1208
+ regex : "\\/\\*",
1209
+ next : "comment"
1210
+ }, {
1211
+ token : "string.regexp",
1212
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
1213
+ }, {
1214
+ token : "string", // single line
1215
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1216
+ }, {
1217
+ token : "string", // single line
1218
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1219
+ }, {
1220
+ token : "constant.numeric", // hex
1221
+ regex : "0[xX][0-9a-fA-F]+\\b"
1222
+ }, {
1223
+ token : "constant.numeric", // float
1224
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1225
+ }, {
1226
+ token : "constant.language.boolean",
1227
+ regex : "(?:true|false)\\b"
1228
+ }, {
1229
+ token : function(value) {
1230
+ if (value == "this")
1231
+ return "variable.language";
1232
+ else if (keywords.hasOwnProperty(value))
1233
+ return "keyword";
1234
+ else if (langClasses.hasOwnProperty(value))
1235
+ return "support.function";
1236
+ else if (importClasses.hasOwnProperty(value))
1237
+ return "support.function";
1238
+ else if (buildinConstants.hasOwnProperty(value))
1239
+ return "constant.language";
1240
+ else
1241
+ return "identifier";
1242
+ },
1243
+ // TODO: Unicode escape sequences
1244
+ // TODO: Unicode identifiers
1245
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
1246
+ }, {
1247
+ token : "keyword.operator",
1248
+ regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
1249
+ }, {
1250
+ token : "lparen",
1251
+ regex : "[[({]"
1252
+ }, {
1253
+ token : "rparen",
1254
+ regex : "[\\])}]"
1255
+ }, {
1256
+ token : "text",
1257
+ regex : "\\s+"
1258
+ }
1259
+ ],
1260
+ "comment" : [
1261
+ {
1262
+ token : "comment", // closing comment
1263
+ regex : ".*?\\*\\/",
1264
+ next : "start"
1265
+ }, {
1266
+ token : "comment", // comment spanning whole line
1267
+ merge : true,
1268
+ regex : ".+"
1269
+ }
1270
+ ]
1271
+ };
1272
+
1273
+ this.embedRules(DocCommentHighlightRules, "doc-",
1274
+ [ new DocCommentHighlightRules().getEndRule("start") ]);
1275
+ };
1276
+
1277
+ oop.inherits(GroovyHighlightRules, TextHighlightRules);
1278
+
1279
+ exports.GroovyHighlightRules = GroovyHighlightRules;
1280
+ });