aced_rails 0.1.2 → 0.2.0

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