aced_rails 0.0.1

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