@openui5/sap.ui.codeeditor 1.133.1 → 1.135.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/.reuse/dep5 +0 -7
  2. package/THIRDPARTY.txt +2 -23
  3. package/package.json +2 -2
  4. package/src/sap/ui/codeeditor/.library +2 -2
  5. package/src/sap/ui/codeeditor/CodeEditor.js +4 -4
  6. package/src/sap/ui/codeeditor/js/ace/ace.js +6564 -6162
  7. package/src/sap/ui/codeeditor/js/ace/css/ace.css +55 -23
  8. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-1.png +0 -0
  9. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-2.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/main-10.svg +4 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/main-11.svg +5 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/main-12.svg +4 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/main-24.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/main-25.svg +1 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/main-26.png +0 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +8 -6
  28. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +4 -6
  29. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +8 -3
  30. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +5 -3
  31. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor.css +221 -0
  32. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor_dark.css +224 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/theme/github_light_default.css +164 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +2 -2
  35. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +0 -0
  36. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +1 -6
  37. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +4 -2
  38. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +0 -0
  39. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +24 -6
  40. package/src/sap/ui/codeeditor/js/ace/ext-error_marker.js +0 -0
  41. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +198 -87
  42. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +8 -5
  43. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +180 -79
  44. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +0 -0
  45. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +7 -3
  46. package/src/sap/ui/codeeditor/js/ace/ext-options.js +12 -5
  47. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +202 -116
  48. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +0 -0
  49. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +14 -12
  50. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +12 -5
  51. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +0 -0
  52. package/src/sap/ui/codeeditor/js/ace/ext-split.js +2 -1
  53. package/src/sap/ui/codeeditor/js/ace/ext-static_highlight.js +0 -0
  54. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +0 -0
  55. package/src/sap/ui/codeeditor/js/ace/ext-textarea.js +476 -3
  56. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +6 -2
  57. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +0 -0
  58. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +13 -6
  59. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +748 -373
  60. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +0 -0
  61. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +3 -3
  64. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +0 -0
  65. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +6 -6
  66. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +3 -3
  67. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +3 -3
  68. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +0 -0
  69. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +14 -14
  70. package/src/sap/ui/codeeditor/js/ace/mode-assembly_arm32.js +185 -0
  71. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +0 -0
  72. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +377 -317
  73. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +0 -0
  74. package/src/sap/ui/codeeditor/js/ace/mode-basic.js +201 -0
  75. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +0 -0
  76. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +1 -1
  77. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +13 -13
  78. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +0 -0
  79. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +13 -13
  80. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +3 -3
  81. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +0 -0
  82. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +377 -317
  83. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +6 -6
  84. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +9 -9
  85. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +75 -78
  86. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +22 -22
  87. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +0 -0
  88. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +0 -0
  89. package/src/sap/ui/codeeditor/js/ace/mode-css.js +6 -3
  90. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +377 -317
  91. package/src/sap/ui/codeeditor/js/ace/mode-d.js +12 -12
  92. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +17 -17
  93. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +0 -0
  94. package/src/sap/ui/codeeditor/js/ace/mode-django.js +377 -317
  95. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +3 -3
  96. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +6 -6
  97. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +18 -18
  98. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +4 -4
  99. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +4 -4
  100. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +402 -342
  101. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +0 -0
  102. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +0 -0
  103. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +15 -15
  104. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +7 -7
  105. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +0 -0
  106. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +12 -12
  107. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +0 -0
  108. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +54 -57
  109. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +4 -4
  110. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +3 -3
  111. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +1 -1
  112. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +13 -13
  113. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +371 -65
  114. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +10 -10
  115. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +0 -0
  116. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +381 -75
  117. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +84 -87
  118. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +379 -319
  119. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +0 -0
  120. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +1 -1
  121. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +10 -10
  122. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +0 -0
  123. package/src/sap/ui/codeeditor/js/ace/mode-html.js +377 -317
  124. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +472 -412
  125. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +484 -424
  126. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +0 -0
  127. package/src/sap/ui/codeeditor/js/ace/mode-io.js +0 -0
  128. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +2 -2
  129. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +67 -70
  130. package/src/sap/ui/codeeditor/js/ace/mode-java.js +383 -77
  131. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +371 -65
  132. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +7 -7
  133. package/src/sap/ui/codeeditor/js/ace/mode-json.js +8 -8
  134. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +8 -8
  135. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +4 -5
  136. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +67 -70
  137. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +0 -0
  138. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +960 -89
  139. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +0 -0
  140. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +0 -0
  141. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +0 -0
  142. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +381 -321
  143. package/src/sap/ui/codeeditor/js/ace/mode-less.js +12 -9
  144. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +385 -325
  145. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +2 -2
  146. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +0 -0
  147. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +0 -0
  148. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +6 -9
  149. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +0 -0
  150. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +5 -5
  151. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +382 -322
  152. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +0 -0
  153. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +3 -3
  154. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +474 -414
  155. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +53 -56
  156. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +1 -1
  157. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +0 -0
  158. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +0 -0
  159. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +1 -1
  160. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +0 -0
  161. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +7 -7
  162. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +7 -7
  163. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +16 -16
  164. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +0 -0
  165. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +379 -319
  166. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +15 -15
  167. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +7 -7
  168. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +10 -10
  169. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +0 -0
  170. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +6 -6
  171. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +98 -104
  172. package/src/sap/ui/codeeditor/js/ace/mode-php.js +797 -616
  173. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +797 -616
  174. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +0 -0
  175. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +0 -0
  176. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +3 -3
  177. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +6 -6
  178. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +0 -0
  179. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +0 -0
  180. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +0 -0
  181. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +18 -18
  182. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +7 -4
  183. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +0 -0
  184. package/src/sap/ui/codeeditor/js/ace/mode-python.js +17 -17
  185. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +5 -5
  186. package/src/sap/ui/codeeditor/js/ace/mode-r.js +13 -13
  187. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +8 -8
  188. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +386 -326
  189. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +6 -6
  190. package/src/sap/ui/codeeditor/js/ace/mode-red.js +0 -0
  191. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +32 -32
  192. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +390 -330
  193. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +0 -0
  194. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +25 -25
  195. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +39 -32
  196. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +13 -13
  197. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +14 -11
  198. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +14 -14
  199. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +381 -75
  200. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +2 -2
  201. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +10 -10
  202. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +14 -11
  203. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +3 -3
  204. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +371 -65
  205. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +521 -461
  206. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +377 -317
  207. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +0 -0
  208. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +377 -317
  209. package/src/sap/ui/codeeditor/js/ace/mode-space.js +0 -0
  210. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +0 -0
  211. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +12 -6
  212. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +5 -5
  213. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +10 -7
  214. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +132 -75
  215. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +5 -4
  216. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +7 -7
  217. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +0 -0
  218. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +6 -6
  219. package/src/sap/ui/codeeditor/js/ace/mode-text.js +0 -0
  220. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +0 -0
  221. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +0 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +492 -182
  223. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +0 -0
  224. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +379 -319
  225. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +371 -65
  226. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +0 -0
  227. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +0 -0
  228. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +387 -327
  229. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +1 -1
  230. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +4 -4
  231. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +377 -317
  232. package/src/sap/ui/codeeditor/js/ace/mode-vue.js +3834 -0
  233. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +382 -76
  234. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +18 -10
  235. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +4 -5
  236. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +5 -5
  237. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +2 -2
  238. package/src/sap/ui/codeeditor/js/ace/mode-zig.js +585 -0
  239. package/src/sap/ui/codeeditor/js/ace/snippets/abap.js +0 -0
  240. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +0 -0
  241. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +0 -0
  242. package/src/sap/ui/codeeditor/js/ace/snippets/ada.js +0 -0
  243. package/src/sap/ui/codeeditor/js/ace/snippets/apache_conf.js +0 -0
  244. package/src/sap/ui/codeeditor/js/ace/snippets/applescript.js +0 -0
  245. package/src/sap/ui/codeeditor/js/ace/snippets/asciidoc.js +0 -0
  246. package/src/sap/ui/codeeditor/js/ace/snippets/asl.js +0 -0
  247. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_arm32.js +9 -0
  248. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_x86.js +0 -0
  249. package/src/sap/ui/codeeditor/js/ace/snippets/autohotkey.js +0 -0
  250. package/src/sap/ui/codeeditor/js/ace/snippets/basic.js +9 -0
  251. package/src/sap/ui/codeeditor/js/ace/snippets/batchfile.js +0 -0
  252. package/src/sap/ui/codeeditor/js/ace/snippets/c9search.js +0 -0
  253. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +0 -0
  254. package/src/sap/ui/codeeditor/js/ace/snippets/cirru.js +0 -0
  255. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +0 -0
  256. package/src/sap/ui/codeeditor/js/ace/snippets/cobol.js +0 -0
  257. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +0 -0
  258. package/src/sap/ui/codeeditor/js/ace/snippets/coldfusion.js +0 -0
  259. package/src/sap/ui/codeeditor/js/ace/snippets/csharp.js +0 -0
  260. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +0 -0
  261. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +0 -0
  262. package/src/sap/ui/codeeditor/js/ace/snippets/csound_score.js +0 -0
  263. package/src/sap/ui/codeeditor/js/ace/snippets/csp.js +0 -0
  264. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +0 -0
  265. package/src/sap/ui/codeeditor/js/ace/snippets/curly.js +0 -0
  266. package/src/sap/ui/codeeditor/js/ace/snippets/d.js +0 -0
  267. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +0 -0
  268. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +0 -0
  269. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +0 -0
  270. package/src/sap/ui/codeeditor/js/ace/snippets/dockerfile.js +0 -0
  271. package/src/sap/ui/codeeditor/js/ace/snippets/dot.js +0 -0
  272. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +0 -0
  273. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +0 -0
  274. package/src/sap/ui/codeeditor/js/ace/snippets/eiffel.js +0 -0
  275. package/src/sap/ui/codeeditor/js/ace/snippets/ejs.js +0 -0
  276. package/src/sap/ui/codeeditor/js/ace/snippets/elixir.js +0 -0
  277. package/src/sap/ui/codeeditor/js/ace/snippets/elm.js +0 -0
  278. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +0 -0
  279. package/src/sap/ui/codeeditor/js/ace/snippets/forth.js +0 -0
  280. package/src/sap/ui/codeeditor/js/ace/snippets/fortran.js +0 -0
  281. package/src/sap/ui/codeeditor/js/ace/snippets/fsharp.js +0 -0
  282. package/src/sap/ui/codeeditor/js/ace/snippets/ftl.js +0 -0
  283. package/src/sap/ui/codeeditor/js/ace/snippets/gcode.js +0 -0
  284. package/src/sap/ui/codeeditor/js/ace/snippets/gherkin.js +0 -0
  285. package/src/sap/ui/codeeditor/js/ace/snippets/gitignore.js +0 -0
  286. package/src/sap/ui/codeeditor/js/ace/snippets/glsl.js +0 -0
  287. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +0 -0
  288. package/src/sap/ui/codeeditor/js/ace/snippets/golang.js +0 -0
  289. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +0 -0
  290. package/src/sap/ui/codeeditor/js/ace/snippets/groovy.js +0 -0
  291. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +0 -0
  292. package/src/sap/ui/codeeditor/js/ace/snippets/handlebars.js +0 -0
  293. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +0 -0
  294. package/src/sap/ui/codeeditor/js/ace/snippets/haskell_cabal.js +0 -0
  295. package/src/sap/ui/codeeditor/js/ace/snippets/haxe.js +0 -0
  296. package/src/sap/ui/codeeditor/js/ace/snippets/hjson.js +0 -0
  297. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +0 -0
  298. package/src/sap/ui/codeeditor/js/ace/snippets/html_elixir.js +0 -0
  299. package/src/sap/ui/codeeditor/js/ace/snippets/html_ruby.js +0 -0
  300. package/src/sap/ui/codeeditor/js/ace/snippets/ini.js +0 -0
  301. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +0 -0
  302. package/src/sap/ui/codeeditor/js/ace/snippets/jack.js +0 -0
  303. package/src/sap/ui/codeeditor/js/ace/snippets/jade.js +0 -0
  304. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +0 -0
  305. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +0 -0
  306. package/src/sap/ui/codeeditor/js/ace/snippets/json.js +0 -0
  307. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +0 -0
  308. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +0 -0
  309. package/src/sap/ui/codeeditor/js/ace/snippets/jssm.js +0 -0
  310. package/src/sap/ui/codeeditor/js/ace/snippets/jsx.js +0 -0
  311. package/src/sap/ui/codeeditor/js/ace/snippets/julia.js +0 -0
  312. package/src/sap/ui/codeeditor/js/ace/snippets/kotlin.js +0 -0
  313. package/src/sap/ui/codeeditor/js/ace/snippets/latex.js +0 -0
  314. package/src/sap/ui/codeeditor/js/ace/snippets/less.js +0 -0
  315. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +0 -0
  316. package/src/sap/ui/codeeditor/js/ace/snippets/lisp.js +0 -0
  317. package/src/sap/ui/codeeditor/js/ace/snippets/livescript.js +0 -0
  318. package/src/sap/ui/codeeditor/js/ace/snippets/logiql.js +0 -0
  319. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +0 -0
  320. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +0 -0
  321. package/src/sap/ui/codeeditor/js/ace/snippets/luapage.js +0 -0
  322. package/src/sap/ui/codeeditor/js/ace/snippets/lucene.js +0 -0
  323. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +0 -0
  324. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +0 -0
  325. package/src/sap/ui/codeeditor/js/ace/snippets/mask.js +0 -0
  326. package/src/sap/ui/codeeditor/js/ace/snippets/matlab.js +0 -0
  327. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +0 -0
  328. package/src/sap/ui/codeeditor/js/ace/snippets/mel.js +0 -0
  329. package/src/sap/ui/codeeditor/js/ace/snippets/mixal.js +0 -0
  330. package/src/sap/ui/codeeditor/js/ace/snippets/mushcode.js +0 -0
  331. package/src/sap/ui/codeeditor/js/ace/snippets/mysql.js +0 -0
  332. package/src/sap/ui/codeeditor/js/ace/snippets/nix.js +0 -0
  333. package/src/sap/ui/codeeditor/js/ace/snippets/nsis.js +0 -0
  334. package/src/sap/ui/codeeditor/js/ace/snippets/objectivec.js +0 -0
  335. package/src/sap/ui/codeeditor/js/ace/snippets/ocaml.js +0 -0
  336. package/src/sap/ui/codeeditor/js/ace/snippets/pascal.js +0 -0
  337. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +0 -0
  338. package/src/sap/ui/codeeditor/js/ace/snippets/pgsql.js +0 -0
  339. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +0 -0
  340. package/src/sap/ui/codeeditor/js/ace/snippets/php_laravel_blade.js +0 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/pig.js +0 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/plain_text.js +0 -0
  343. package/src/sap/ui/codeeditor/js/ace/snippets/powershell.js +0 -0
  344. package/src/sap/ui/codeeditor/js/ace/snippets/praat.js +0 -0
  345. package/src/sap/ui/codeeditor/js/ace/snippets/prolog.js +0 -0
  346. package/src/sap/ui/codeeditor/js/ace/snippets/properties.js +0 -0
  347. package/src/sap/ui/codeeditor/js/ace/snippets/protobuf.js +0 -0
  348. package/src/sap/ui/codeeditor/js/ace/snippets/puppet.js +0 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +0 -0
  350. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +0 -0
  351. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +0 -0
  352. package/src/sap/ui/codeeditor/js/ace/snippets/rdoc.js +0 -0
  353. package/src/sap/ui/codeeditor/js/ace/snippets/red.js +0 -0
  354. package/src/sap/ui/codeeditor/js/ace/snippets/redshift.js +0 -0
  355. package/src/sap/ui/codeeditor/js/ace/snippets/rhtml.js +0 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +0 -0
  357. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +0 -0
  358. package/src/sap/ui/codeeditor/js/ace/snippets/rust.js +0 -0
  359. package/src/sap/ui/codeeditor/js/ace/snippets/sass.js +0 -0
  360. package/src/sap/ui/codeeditor/js/ace/snippets/scad.js +0 -0
  361. package/src/sap/ui/codeeditor/js/ace/snippets/scala.js +0 -0
  362. package/src/sap/ui/codeeditor/js/ace/snippets/scheme.js +0 -0
  363. package/src/sap/ui/codeeditor/js/ace/snippets/scss.js +0 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +0 -0
  365. package/src/sap/ui/codeeditor/js/ace/snippets/sjs.js +0 -0
  366. package/src/sap/ui/codeeditor/js/ace/snippets/slim.js +0 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/smarty.js +0 -0
  368. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +0 -0
  369. package/src/sap/ui/codeeditor/js/ace/snippets/soy_template.js +0 -0
  370. package/src/sap/ui/codeeditor/js/ace/snippets/space.js +0 -0
  371. package/src/sap/ui/codeeditor/js/ace/snippets/sparql.js +0 -0
  372. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +0 -0
  373. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +0 -0
  374. package/src/sap/ui/codeeditor/js/ace/snippets/stylus.js +0 -0
  375. package/src/sap/ui/codeeditor/js/ace/snippets/svg.js +0 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/swift.js +0 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +0 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/terraform.js +0 -0
  379. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +0 -0
  380. package/src/sap/ui/codeeditor/js/ace/snippets/text.js +0 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +0 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/toml.js +0 -0
  383. package/src/sap/ui/codeeditor/js/ace/snippets/tsx.js +0 -0
  384. package/src/sap/ui/codeeditor/js/ace/snippets/turtle.js +0 -0
  385. package/src/sap/ui/codeeditor/js/ace/snippets/twig.js +0 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/typescript.js +0 -0
  387. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +0 -0
  388. package/src/sap/ui/codeeditor/js/ace/snippets/vbscript.js +0 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +0 -0
  390. package/src/sap/ui/codeeditor/js/ace/snippets/verilog.js +0 -0
  391. package/src/sap/ui/codeeditor/js/ace/snippets/vhdl.js +0 -0
  392. package/src/sap/ui/codeeditor/js/ace/snippets/vue.js +9 -0
  393. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +0 -0
  394. package/src/sap/ui/codeeditor/js/ace/snippets/xml.js +0 -0
  395. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +0 -0
  396. package/src/sap/ui/codeeditor/js/ace/snippets/yaml.js +0 -0
  397. package/src/sap/ui/codeeditor/js/ace/snippets/zig.js +9 -0
  398. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +0 -0
  399. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +0 -0
  400. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +0 -0
  401. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor.js +18 -0
  402. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor_dark.js +18 -0
  403. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +0 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +0 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +0 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +0 -0
  407. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +0 -0
  408. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +0 -0
  409. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +0 -0
  410. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +0 -0
  411. package/src/sap/ui/codeeditor/js/ace/theme-github.js +0 -0
  412. package/src/sap/ui/codeeditor/js/ace/theme-github_light_default.js +18 -0
  413. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +0 -0
  414. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +0 -0
  415. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +0 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +0 -0
  417. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +0 -0
  418. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +0 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +0 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +0 -0
  421. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +0 -0
  422. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +0 -0
  423. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +0 -0
  424. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +0 -0
  425. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +1 -1
  426. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +0 -0
  427. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +0 -0
  428. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +0 -0
  429. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +0 -0
  430. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +0 -0
  431. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +0 -0
  432. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +0 -0
  433. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +0 -0
  434. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +0 -0
  435. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +0 -0
  436. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +0 -0
  437. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +0 -0
  438. package/src/sap/ui/codeeditor/js/ace/worker-base.js +3 -13
  439. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +3 -13
  440. package/src/sap/ui/codeeditor/js/ace/worker-css.js +3 -13
  441. package/src/sap/ui/codeeditor/js/ace/worker-html.js +3 -13
  442. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +3 -13
  443. package/src/sap/ui/codeeditor/js/ace/worker-json.js +3 -13
  444. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +3 -13
  445. package/src/sap/ui/codeeditor/js/ace/worker-php.js +3 -13
  446. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +8 -15
  447. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +3 -13
  448. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +6 -16
  449. package/src/sap/ui/codeeditor/library.js +2 -2
  450. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
@@ -216,7 +216,7 @@ var JsDocCommentHighlightRules = function () {
216
216
  ]
217
217
  }, {
218
218
  token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
219
- regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
219
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
220
220
  next: "pop"
221
221
  }, {
222
222
  token: "rparen.doc",
@@ -276,7 +276,7 @@ var JsDocCommentHighlightRules = function () {
276
276
  },
277
277
  JsDocCommentHighlightRules.getTagRule(),
278
278
  {
279
- defaultToken: "comment.doc",
279
+ defaultToken: "comment.doc.body",
280
280
  caseInsensitive: true
281
281
  }
282
282
  ],
@@ -299,14 +299,14 @@ JsDocCommentHighlightRules.getTagRule = function (start) {
299
299
  };
300
300
  JsDocCommentHighlightRules.getStartRule = function (start) {
301
301
  return {
302
- token: "comment.doc",
303
- regex: "\\/\\*(?=\\*)",
302
+ token: "comment.doc", // doc comment
303
+ regex: /\/\*\*(?!\/)/,
304
304
  next: start
305
305
  };
306
306
  };
307
307
  JsDocCommentHighlightRules.getEndRule = function (start) {
308
308
  return {
309
- token: "comment.doc",
309
+ token: "comment.doc", // closing comment
310
310
  regex: "\\*\\/",
311
311
  next: start
312
312
  };
@@ -321,7 +321,7 @@ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocC
321
321
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
322
322
  var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
323
323
  var JavaScriptHighlightRules = function (options) {
324
- var keywordMapper = this.createKeywordMapper({
324
+ var keywords = {
325
325
  "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
326
326
  "Namespace|QName|XML|XMLList|" + // E4X
327
327
  "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
@@ -331,9 +331,9 @@ var JavaScriptHighlightRules = function (options) {
331
331
  "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
332
332
  "isNaN|parseFloat|parseInt|" +
333
333
  "JSON|Math|" + // Other
334
- "this|arguments|prototype|window|document",
334
+ "this|arguments|prototype|window|document", // Pseudo
335
335
  "keyword": "const|yield|import|get|set|async|await|" +
336
- "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
336
+ "break|case|catch|continue|default|delete|do|else|finally|for|" +
337
337
  "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
338
338
  "__parent__|__count__|escape|unescape|with|__proto__|" +
339
339
  "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
@@ -341,7 +341,8 @@ var JavaScriptHighlightRules = function (options) {
341
341
  "constant.language": "null|Infinity|NaN|undefined",
342
342
  "support.function": "alert",
343
343
  "constant.language.boolean": "true|false"
344
- }, "identifier");
344
+ };
345
+ var keywordMapper = this.createKeywordMapper(keywords, "identifier");
345
346
  var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
346
347
  var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
347
348
  "u[0-9a-fA-F]{4}|" + // unicode
@@ -350,10 +351,16 @@ var JavaScriptHighlightRules = function (options) {
350
351
  "3[0-7][0-7]?|" + // oct
351
352
  "[4-7][0-7]?|" + //oct
352
353
  ".)";
354
+ var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
355
+ var functionCallStartRule = {
356
+ token: ["identifier", "text", "paren.lparen"],
357
+ regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
358
+ };
353
359
  this.$rules = {
354
360
  "no_regex": [
355
361
  DocCommentHighlightRules.getStartRule("doc-start"),
356
362
  comments("no_regex"),
363
+ functionCallStartRule,
357
364
  {
358
365
  token: "string",
359
366
  regex: "'(?=.)",
@@ -363,58 +370,36 @@ var JavaScriptHighlightRules = function (options) {
363
370
  regex: '"(?=.)',
364
371
  next: "qqstring"
365
372
  }, {
366
- token: "constant.numeric",
373
+ token: "constant.numeric", // hexadecimal, octal and binary
367
374
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
368
375
  }, {
369
- token: "constant.numeric",
376
+ token: "constant.numeric", // decimal integers and floats
370
377
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
371
- }, {
372
- token: [
373
- "storage.type", "punctuation.operator", "support.function",
374
- "punctuation.operator", "entity.name.function", "text", "keyword.operator"
375
- ],
376
- regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
377
- next: "function_arguments"
378
- }, {
379
- token: [
380
- "storage.type", "punctuation.operator", "entity.name.function", "text",
381
- "keyword.operator", "text", "storage.type", "text", "paren.lparen"
382
- ],
383
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
384
- next: "function_arguments"
385
378
  }, {
386
379
  token: [
387
380
  "entity.name.function", "text", "keyword.operator", "text", "storage.type",
388
- "text", "paren.lparen"
389
- ],
390
- regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
391
- next: "function_arguments"
392
- }, {
393
- token: [
394
- "storage.type", "punctuation.operator", "entity.name.function", "text",
395
- "keyword.operator", "text",
396
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
381
+ "text", "storage.type", "text", "paren.lparen"
397
382
  ],
398
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
383
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
399
384
  next: "function_arguments"
400
385
  }, {
401
386
  token: [
402
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
387
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
403
388
  ],
404
- regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
389
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
405
390
  next: "function_arguments"
406
391
  }, {
407
392
  token: [
408
393
  "entity.name.function", "text", "punctuation.operator",
409
- "text", "storage.type", "text", "paren.lparen"
394
+ "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
410
395
  ],
411
- regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
396
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
412
397
  next: "function_arguments"
413
398
  }, {
414
399
  token: [
415
- "text", "text", "storage.type", "text", "paren.lparen"
400
+ "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
416
401
  ],
417
- regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
402
+ regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
418
403
  next: "function_arguments"
419
404
  }, {
420
405
  token: "keyword",
@@ -428,7 +413,7 @@ var JavaScriptHighlightRules = function (options) {
428
413
  regex: /that\b/
429
414
  }, {
430
415
  token: ["storage.type", "punctuation.operator", "support.function.firebug"],
431
- regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
416
+ regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
432
417
  }, {
433
418
  token: keywordMapper,
434
419
  regex: identifierRe
@@ -463,17 +448,27 @@ var JavaScriptHighlightRules = function (options) {
463
448
  property: [{
464
449
  token: "text",
465
450
  regex: "\\s+"
451
+ }, {
452
+ token: "keyword.operator",
453
+ regex: /=/
466
454
  }, {
467
455
  token: [
468
- "storage.type", "punctuation.operator", "entity.name.function", "text",
469
- "keyword.operator", "text",
470
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
456
+ "storage.type", "text", "storage.type", "text", "paren.lparen"
471
457
  ],
472
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
458
+ regex: anonymousFunctionRe + "(\\s*)(\\()",
459
+ next: "function_arguments"
460
+ }, {
461
+ token: [
462
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
463
+ ],
464
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
473
465
  next: "function_arguments"
474
466
  }, {
475
467
  token: "punctuation.operator",
476
468
  regex: /[.](?![.])/
469
+ }, {
470
+ token: "support.function",
471
+ regex: "prototype"
477
472
  }, {
478
473
  token: "support.function",
479
474
  regex: /(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|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|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(?=\()/
@@ -586,10 +581,10 @@ var JavaScriptHighlightRules = function (options) {
586
581
  token: "constant.language",
587
582
  regex: "null|Infinity|NaN|undefined"
588
583
  }, {
589
- token: "constant.numeric",
584
+ token: "constant.numeric", // hexadecimal, octal and binary
590
585
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
591
586
  }, {
592
- token: "constant.numeric",
587
+ token: "constant.numeric", // decimal integers and floats
593
588
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
594
589
  }, {
595
590
  token: "punctuation.operator",
@@ -698,7 +693,7 @@ var JavaScriptHighlightRules = function (options) {
698
693
  regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
699
694
  }, {
700
695
  token: "paren.lparen",
701
- regex: "(\\()(?=.+\\s*=>)",
696
+ regex: "(\\()(?=[^\\(]+\\s*=>)",
702
697
  next: "function_arguments"
703
698
  }, {
704
699
  token: "variable.language",
@@ -756,7 +751,7 @@ function JSX() {
756
751
  value: val.substr(offset)
757
752
  }];
758
753
  },
759
- regex: "</?" + tagRegex + "",
754
+ regex: "</?(?:" + tagRegex + "|(?=>))",
760
755
  next: "jsxAttributes",
761
756
  nextState: "jsx"
762
757
  };
@@ -769,8 +764,7 @@ function JSX() {
769
764
  this.$rules.jsx = [
770
765
  jsxJsRule,
771
766
  jsxTag,
772
- { include: "reference" },
773
- { defaultToken: "string" }
767
+ { include: "reference" }, { defaultToken: "string.xml" }
774
768
  ];
775
769
  this.$rules.jsxAttributes = [{
776
770
  token: "meta.tag.punctuation.tag-close.xml",
@@ -830,7 +824,7 @@ function JSX() {
830
824
  function comments(next) {
831
825
  return [
832
826
  {
833
- token: "comment",
827
+ token: "comment", // multi line comment
834
828
  regex: /\/\*/,
835
829
  next: [
836
830
  DocCommentHighlightRules.getTagRule(),
@@ -873,11 +867,298 @@ var MatchingBraceOutdent = function () { };
873
867
  var indent = this.$getIndent(doc.getLine(openBracePos.row));
874
868
  doc.replace(new Range(row, 0, row, column - 1), indent);
875
869
  };
876
- this.$getIndent = function (line) {
877
- return line.match(/^\s*/)[0];
870
+ this.$getIndent = function (line) {
871
+ return line.match(/^\s*/)[0];
872
+ };
873
+ }).call(MatchingBraceOutdent.prototype);
874
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
875
+
876
+ });
877
+
878
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
879
+ var oop = require("../../lib/oop");
880
+ var Behaviour = require("../behaviour").Behaviour;
881
+ var TokenIterator = require("../../token_iterator").TokenIterator;
882
+ function is(token, type) {
883
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
884
+ }
885
+ var XmlBehaviour = function () {
886
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
887
+ if (text == '"' || text == "'") {
888
+ var quote = text;
889
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
890
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
891
+ return {
892
+ text: quote + selected + quote,
893
+ selection: false
894
+ };
895
+ }
896
+ var cursor = editor.getCursorPosition();
897
+ var line = session.doc.getLine(cursor.row);
898
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
899
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
900
+ var token = iterator.getCurrentToken();
901
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
902
+ return {
903
+ text: "",
904
+ selection: [1, 1]
905
+ };
906
+ }
907
+ if (!token)
908
+ token = iterator.stepBackward();
909
+ if (!token)
910
+ return;
911
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
912
+ token = iterator.stepBackward();
913
+ }
914
+ var rightSpace = !rightChar || rightChar.match(/\s/);
915
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
916
+ return {
917
+ text: quote + quote,
918
+ selection: [1, 1]
919
+ };
920
+ }
921
+ }
922
+ });
923
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
924
+ var selected = session.doc.getTextRange(range);
925
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
926
+ var line = session.doc.getLine(range.start.row);
927
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
928
+ if (rightChar == selected) {
929
+ range.end.column++;
930
+ return range;
931
+ }
932
+ }
933
+ });
934
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
935
+ if (text == '>') {
936
+ var position = editor.getSelectionRange().start;
937
+ var iterator = new TokenIterator(session, position.row, position.column);
938
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
939
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
940
+ return;
941
+ if (is(token, "reference.attribute-value"))
942
+ return;
943
+ if (is(token, "attribute-value")) {
944
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
945
+ if (position.column < tokenEndColumn)
946
+ return;
947
+ if (position.column == tokenEndColumn) {
948
+ var nextToken = iterator.stepForward();
949
+ if (nextToken && is(nextToken, "attribute-value"))
950
+ return;
951
+ iterator.stepBackward();
952
+ }
953
+ }
954
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
955
+ return;
956
+ while (!is(token, "tag-name")) {
957
+ token = iterator.stepBackward();
958
+ if (token.value == "<") {
959
+ token = iterator.stepForward();
960
+ break;
961
+ }
962
+ }
963
+ var tokenRow = iterator.getCurrentTokenRow();
964
+ var tokenColumn = iterator.getCurrentTokenColumn();
965
+ if (is(iterator.stepBackward(), "end-tag-open"))
966
+ return;
967
+ var element = token.value;
968
+ if (tokenRow == position.row)
969
+ element = element.substring(0, position.column - tokenColumn);
970
+ if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
971
+ return;
972
+ return {
973
+ text: ">" + "</" + element + ">",
974
+ selection: [1, 1]
975
+ };
976
+ }
977
+ });
978
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
979
+ if (text == "\n") {
980
+ var cursor = editor.getCursorPosition();
981
+ var line = session.getLine(cursor.row);
982
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
983
+ var token = iterator.getCurrentToken();
984
+ if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
985
+ if (token.value == "/>")
986
+ return;
987
+ while (token && token.type.indexOf("tag-name") === -1) {
988
+ token = iterator.stepBackward();
989
+ }
990
+ if (!token) {
991
+ return;
992
+ }
993
+ var tag = token.value;
994
+ var row = iterator.getCurrentTokenRow();
995
+ token = iterator.stepBackward();
996
+ if (!token || token.type.indexOf("end-tag") !== -1) {
997
+ return;
998
+ }
999
+ if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
1000
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1001
+ var line = session.getLine(row);
1002
+ var nextIndent = this.$getIndent(line);
1003
+ var indent = nextIndent + session.getTabString();
1004
+ if (nextToken && nextToken.value === "</") {
1005
+ return {
1006
+ text: "\n" + indent + "\n" + nextIndent,
1007
+ selection: [1, indent.length, 1, indent.length]
1008
+ };
1009
+ }
1010
+ else {
1011
+ return {
1012
+ text: "\n" + indent
1013
+ };
1014
+ }
1015
+ }
1016
+ }
1017
+ }
1018
+ });
1019
+ };
1020
+ oop.inherits(XmlBehaviour, Behaviour);
1021
+ exports.XmlBehaviour = XmlBehaviour;
1022
+
1023
+ });
1024
+
1025
+ ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
1026
+ var oop = require("../../lib/oop");
1027
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1028
+ var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
1029
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
1030
+ var JavaScriptBehaviour = function () {
1031
+ var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
1032
+ this.addBehaviours(xmlBehaviours);
1033
+ this.inherit(CstyleBehaviour);
1034
+ this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
1035
+ if (text == '>') {
1036
+ var position = editor.getSelectionRange().start;
1037
+ var iterator = new TokenIterator(session, position.row, position.column);
1038
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1039
+ if (!token)
1040
+ return;
1041
+ if (token.value == '<') {
1042
+ return {
1043
+ text: "></>",
1044
+ selection: [1, 1]
1045
+ };
1046
+ }
1047
+ }
1048
+ });
1049
+ };
1050
+ oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
1051
+ exports.JavaScriptBehaviour = JavaScriptBehaviour;
1052
+
1053
+ });
1054
+
1055
+ ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1056
+ var oop = require("../../lib/oop");
1057
+ var Range = require("../../range").Range;
1058
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1059
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1060
+ BaseFoldMode.call(this);
1061
+ this.voidElements = voidElements || {};
1062
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1063
+ if (optionalEndTags)
1064
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1065
+ };
1066
+ oop.inherits(FoldMode, BaseFoldMode);
1067
+ var Tag = function () {
1068
+ this.tagName = "";
1069
+ this.closing = false;
1070
+ this.selfClosing = false;
1071
+ this.start = { row: 0, column: 0 };
1072
+ this.end = { row: 0, column: 0 };
1073
+ };
1074
+ function is(token, type) {
1075
+ return token.type.lastIndexOf(type + ".xml") > -1;
1076
+ }
1077
+ (function () {
1078
+ this.getFoldWidget = function (session, foldStyle, row) {
1079
+ var tag = this._getFirstTagInLine(session, row);
1080
+ if (!tag)
1081
+ return this.getCommentFoldWidget(session, row);
1082
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1083
+ return foldStyle === "markbeginend" ? "end" : "";
1084
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1085
+ return "";
1086
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1087
+ return "";
1088
+ return "start";
1089
+ };
1090
+ this.getCommentFoldWidget = function (session, row) {
1091
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1092
+ return "start";
1093
+ return "";
1094
+ };
1095
+ this._getFirstTagInLine = function (session, row) {
1096
+ var tokens = session.getTokens(row);
1097
+ var tag = new Tag();
1098
+ for (var i = 0; i < tokens.length; i++) {
1099
+ var token = tokens[i];
1100
+ if (is(token, "tag-open")) {
1101
+ tag.end.column = tag.start.column + token.value.length;
1102
+ tag.closing = is(token, "end-tag-open");
1103
+ token = tokens[++i];
1104
+ if (!token)
1105
+ return null;
1106
+ tag.tagName = token.value;
1107
+ if (token.value === "") { //skip empty tag name token for fragment
1108
+ token = tokens[++i];
1109
+ if (!token)
1110
+ return null;
1111
+ tag.tagName = token.value;
1112
+ }
1113
+ tag.end.column += token.value.length;
1114
+ for (i++; i < tokens.length; i++) {
1115
+ token = tokens[i];
1116
+ tag.end.column += token.value.length;
1117
+ if (is(token, "tag-close")) {
1118
+ tag.selfClosing = token.value == '/>';
1119
+ break;
1120
+ }
1121
+ }
1122
+ return tag;
1123
+ }
1124
+ else if (is(token, "tag-close")) {
1125
+ tag.selfClosing = token.value == '/>';
1126
+ return tag;
1127
+ }
1128
+ tag.start.column += token.value.length;
1129
+ }
1130
+ return null;
1131
+ };
1132
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
1133
+ var tokens = session.getTokens(row);
1134
+ var column = 0;
1135
+ for (var i = 0; i < tokens.length; i++) {
1136
+ var token = tokens[i];
1137
+ column += token.value.length;
1138
+ if (column < startColumn - 1)
1139
+ continue;
1140
+ if (is(token, "end-tag-open")) {
1141
+ token = tokens[i + 1];
1142
+ if (is(token, "tag-name") && token.value === "") {
1143
+ token = tokens[i + 2];
1144
+ }
1145
+ if (token && token.value == tagName)
1146
+ return true;
1147
+ }
1148
+ }
1149
+ return false;
1150
+ };
1151
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1152
+ var firstTag = this._getFirstTagInLine(session, row);
1153
+ if (!firstTag) {
1154
+ return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
1155
+ }
1156
+ var tags = session.getMatchingTags({ row: row, column: 0 });
1157
+ if (tags) {
1158
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
1159
+ }
878
1160
  };
879
- }).call(MatchingBraceOutdent.prototype);
880
- exports.MatchingBraceOutdent = MatchingBraceOutdent;
1161
+ }).call(FoldMode.prototype);
881
1162
 
882
1163
  });
883
1164
 
@@ -997,19 +1278,51 @@ oop.inherits(FoldMode, BaseFoldMode);
997
1278
 
998
1279
  });
999
1280
 
1000
- ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1281
+ ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1282
+ var oop = require("../../lib/oop");
1283
+ var XmlFoldMode = require("./xml").FoldMode;
1284
+ var CFoldMode = require("./cstyle").FoldMode;
1285
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1286
+ if (commentRegex) {
1287
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1288
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1289
+ }
1290
+ this.xmlFoldMode = new XmlFoldMode();
1291
+ };
1292
+ oop.inherits(FoldMode, CFoldMode);
1293
+ (function () {
1294
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
1295
+ this.getFoldWidgetBase = this.getFoldWidget;
1296
+ this.getFoldWidget = function (session, foldStyle, row) {
1297
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
1298
+ if (!fw) {
1299
+ return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
1300
+ }
1301
+ return fw;
1302
+ };
1303
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1304
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
1305
+ if (range)
1306
+ return range;
1307
+ return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
1308
+ };
1309
+ }).call(FoldMode.prototype);
1310
+
1311
+ });
1312
+
1313
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
1001
1314
  var oop = require("../lib/oop");
1002
1315
  var TextMode = require("./text").Mode;
1003
1316
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1004
1317
  var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1005
1318
  var WorkerClient = require("../worker/worker_client").WorkerClient;
1006
- var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1007
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1319
+ var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
1320
+ var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
1008
1321
  var Mode = function () {
1009
1322
  this.HighlightRules = JavaScriptHighlightRules;
1010
1323
  this.$outdent = new MatchingBraceOutdent();
1011
- this.$behaviour = new CstyleBehaviour();
1012
- this.foldingRules = new CStyleFoldMode();
1324
+ this.$behaviour = new JavaScriptBehaviour();
1325
+ this.foldingRules = new JavaScriptFoldMode();
1013
1326
  };
1014
1327
  oop.inherits(Mode, TextMode);
1015
1328
  (function () {
@@ -1037,13 +1350,6 @@ oop.inherits(Mode, TextMode);
1037
1350
  if (endState == "start" || endState == "no_regex") {
1038
1351
  return "";
1039
1352
  }
1040
- var match = line.match(/^\s*(\/?)\*/);
1041
- if (match) {
1042
- if (match[1]) {
1043
- indent += " ";
1044
- }
1045
- indent += "* ";
1046
- }
1047
1353
  }
1048
1354
  return indent;
1049
1355
  };
@@ -1147,7 +1453,7 @@ var CssHighlightRules = function () {
1147
1453
  + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
1148
1454
  }],
1149
1455
  "comments": [{
1150
- token: "comment",
1456
+ token: "comment", // multi line comment
1151
1457
  regex: "\\/\\*",
1152
1458
  push: [{
1153
1459
  token: "comment",
@@ -1176,10 +1482,10 @@ var CssHighlightRules = function () {
1176
1482
  token: "constant.numeric",
1177
1483
  regex: numRe
1178
1484
  }, {
1179
- token: "constant.numeric",
1485
+ token: "constant.numeric", // hex6 color
1180
1486
  regex: "#[a-f0-9]{6}"
1181
1487
  }, {
1182
- token: "constant.numeric",
1488
+ token: "constant.numeric", // hex3 color
1183
1489
  regex: "#[a-f0-9]{3}"
1184
1490
  }, {
1185
1491
  token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
@@ -1192,6 +1498,9 @@ var CssHighlightRules = function () {
1192
1498
  }, {
1193
1499
  token: keywordMapper,
1194
1500
  regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1501
+ }, {
1502
+ token: "paren.lparen",
1503
+ regex: "\\{"
1195
1504
  }, {
1196
1505
  caseInsensitive: true
1197
1506
  }],
@@ -1945,261 +2254,113 @@ var CssBehaviour = function () {
1945
2254
  }
1946
2255
  }
1947
2256
  }
1948
- });
1949
- this.add("colon", "deletion", function (state, action, editor, session, range) {
1950
- var selected = session.doc.getTextRange(range);
1951
- if (!range.isMultiLine() && selected === ':') {
1952
- var cursor = editor.getCursorPosition();
1953
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
1954
- var token = iterator.getCurrentToken();
1955
- if (token && token.value.match(/\s+/)) {
1956
- token = iterator.stepBackward();
1957
- }
1958
- if (token && token.type === 'support.type') {
1959
- var line = session.doc.getLine(range.start.row);
1960
- var rightChar = line.substring(range.end.column, range.end.column + 1);
1961
- if (rightChar === ';') {
1962
- range.end.column++;
1963
- return range;
1964
- }
1965
- }
1966
- }
1967
- });
1968
- this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1969
- if (text === ';' && editor.selection.isEmpty()) {
1970
- var cursor = editor.getCursorPosition();
1971
- var line = session.doc.getLine(cursor.row);
1972
- var rightChar = line.substring(cursor.column, cursor.column + 1);
1973
- if (rightChar === ';') {
1974
- return {
1975
- text: '',
1976
- selection: [1, 1]
1977
- };
1978
- }
1979
- }
1980
- });
1981
- this.add("!important", "insertion", function (state, action, editor, session, text) {
1982
- if (text === '!' && editor.selection.isEmpty()) {
1983
- var cursor = editor.getCursorPosition();
1984
- var line = session.doc.getLine(cursor.row);
1985
- if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1986
- return {
1987
- text: '!important',
1988
- selection: [10, 10]
1989
- };
1990
- }
1991
- }
1992
- });
1993
- };
1994
- oop.inherits(CssBehaviour, CstyleBehaviour);
1995
- exports.CssBehaviour = CssBehaviour;
1996
-
1997
- });
1998
-
1999
- ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
2000
- var oop = require("../lib/oop");
2001
- var TextMode = require("./text").Mode;
2002
- var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
2003
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
2004
- var WorkerClient = require("../worker/worker_client").WorkerClient;
2005
- var CssCompletions = require("./css_completions").CssCompletions;
2006
- var CssBehaviour = require("./behaviour/css").CssBehaviour;
2007
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
2008
- var Mode = function () {
2009
- this.HighlightRules = CssHighlightRules;
2010
- this.$outdent = new MatchingBraceOutdent();
2011
- this.$behaviour = new CssBehaviour();
2012
- this.$completer = new CssCompletions();
2013
- this.foldingRules = new CStyleFoldMode();
2014
- };
2015
- oop.inherits(Mode, TextMode);
2016
- (function () {
2017
- this.foldingRules = "cStyle";
2018
- this.blockComment = { start: "/*", end: "*/" };
2019
- this.getNextLineIndent = function (state, line, tab) {
2020
- var indent = this.$getIndent(line);
2021
- var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
2022
- if (tokens.length && tokens[tokens.length - 1].type == "comment") {
2023
- return indent;
2024
- }
2025
- var match = line.match(/^.*\{\s*$/);
2026
- if (match) {
2027
- indent += tab;
2028
- }
2029
- return indent;
2030
- };
2031
- this.checkOutdent = function (state, line, input) {
2032
- return this.$outdent.checkOutdent(line, input);
2033
- };
2034
- this.autoOutdent = function (state, doc, row) {
2035
- this.$outdent.autoOutdent(doc, row);
2036
- };
2037
- this.getCompletions = function (state, session, pos, prefix) {
2038
- return this.$completer.getCompletions(state, session, pos, prefix);
2039
- };
2040
- this.createWorker = function (session) {
2041
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
2042
- worker.attachToDocument(session.getDocument());
2043
- worker.on("annotate", function (e) {
2044
- session.setAnnotations(e.data);
2045
- });
2046
- worker.on("terminate", function () {
2047
- session.clearAnnotations();
2048
- });
2049
- return worker;
2050
- };
2051
- this.$id = "ace/mode/css";
2052
- this.snippetFileId = "ace/snippets/css";
2053
- }).call(Mode.prototype);
2054
- exports.Mode = Mode;
2055
-
2056
- });
2057
-
2058
- ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module){"use strict";
2059
- var oop = require("../../lib/oop");
2060
- var Behaviour = require("../behaviour").Behaviour;
2061
- var TokenIterator = require("../../token_iterator").TokenIterator;
2062
- var lang = require("../../lib/lang");
2063
- function is(token, type) {
2064
- return token && token.type.lastIndexOf(type + ".xml") > -1;
2065
- }
2066
- var XmlBehaviour = function () {
2067
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
2068
- if (text == '"' || text == "'") {
2069
- var quote = text;
2070
- var selected = session.doc.getTextRange(editor.getSelectionRange());
2071
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
2072
- return {
2073
- text: quote + selected + quote,
2074
- selection: false
2075
- };
2076
- }
2077
- var cursor = editor.getCursorPosition();
2078
- var line = session.doc.getLine(cursor.row);
2079
- var rightChar = line.substring(cursor.column, cursor.column + 1);
2080
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
2081
- var token = iterator.getCurrentToken();
2082
- if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
2083
- return {
2084
- text: "",
2085
- selection: [1, 1]
2086
- };
2087
- }
2088
- if (!token)
2089
- token = iterator.stepBackward();
2090
- if (!token)
2091
- return;
2092
- while (is(token, "tag-whitespace") || is(token, "whitespace")) {
2093
- token = iterator.stepBackward();
2094
- }
2095
- var rightSpace = !rightChar || rightChar.match(/\s/);
2096
- if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
2097
- return {
2098
- text: quote + quote,
2099
- selection: [1, 1]
2100
- };
2101
- }
2102
- }
2103
- });
2104
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
2105
- var selected = session.doc.getTextRange(range);
2106
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
2107
- var line = session.doc.getLine(range.start.row);
2108
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
2109
- if (rightChar == selected) {
2110
- range.end.column++;
2111
- return range;
2112
- }
2113
- }
2114
- });
2115
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
2116
- if (text == '>') {
2117
- var position = editor.getSelectionRange().start;
2118
- var iterator = new TokenIterator(session, position.row, position.column);
2119
- var token = iterator.getCurrentToken() || iterator.stepBackward();
2120
- if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
2121
- return;
2122
- if (is(token, "reference.attribute-value"))
2123
- return;
2124
- if (is(token, "attribute-value")) {
2125
- var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
2126
- if (position.column < tokenEndColumn)
2127
- return;
2128
- if (position.column == tokenEndColumn) {
2129
- var nextToken = iterator.stepForward();
2130
- if (nextToken && is(nextToken, "attribute-value"))
2131
- return;
2132
- iterator.stepBackward();
2133
- }
2134
- }
2135
- if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
2136
- return;
2137
- while (!is(token, "tag-name")) {
2138
- token = iterator.stepBackward();
2139
- if (token.value == "<") {
2140
- token = iterator.stepForward();
2141
- break;
2142
- }
2143
- }
2144
- var tokenRow = iterator.getCurrentTokenRow();
2145
- var tokenColumn = iterator.getCurrentTokenColumn();
2146
- if (is(iterator.stepBackward(), "end-tag-open"))
2147
- return;
2148
- var element = token.value;
2149
- if (tokenRow == position.row)
2150
- element = element.substring(0, position.column - tokenColumn);
2151
- if (this.voidElements.hasOwnProperty(element.toLowerCase()))
2152
- return;
2153
- return {
2154
- text: ">" + "</" + element + ">",
2155
- selection: [1, 1]
2156
- };
2157
- }
2158
- });
2159
- this.add("autoindent", "insertion", function (state, action, editor, session, text) {
2160
- if (text == "\n") {
2257
+ });
2258
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
2259
+ var selected = session.doc.getTextRange(range);
2260
+ if (!range.isMultiLine() && selected === ':') {
2161
2261
  var cursor = editor.getCursorPosition();
2162
- var line = session.getLine(cursor.row);
2163
2262
  var iterator = new TokenIterator(session, cursor.row, cursor.column);
2164
2263
  var token = iterator.getCurrentToken();
2165
- if (token && token.type.indexOf("tag-close") !== -1) {
2166
- if (token.value == "/>")
2167
- return;
2168
- while (token && token.type.indexOf("tag-name") === -1) {
2169
- token = iterator.stepBackward();
2170
- }
2171
- if (!token) {
2172
- return;
2173
- }
2174
- var tag = token.value;
2175
- var row = iterator.getCurrentTokenRow();
2264
+ if (token && token.value.match(/\s+/)) {
2176
2265
  token = iterator.stepBackward();
2177
- if (!token || token.type.indexOf("end-tag") !== -1) {
2178
- return;
2179
- }
2180
- if (this.voidElements && !this.voidElements[tag]) {
2181
- var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
2182
- var line = session.getLine(row);
2183
- var nextIndent = this.$getIndent(line);
2184
- var indent = nextIndent + session.getTabString();
2185
- if (nextToken && nextToken.value === "</") {
2186
- return {
2187
- text: "\n" + indent + "\n" + nextIndent,
2188
- selection: [1, indent.length, 1, indent.length]
2189
- };
2190
- }
2191
- else {
2192
- return {
2193
- text: "\n" + indent
2194
- };
2195
- }
2266
+ }
2267
+ if (token && token.type === 'support.type') {
2268
+ var line = session.doc.getLine(range.start.row);
2269
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
2270
+ if (rightChar === ';') {
2271
+ range.end.column++;
2272
+ return range;
2196
2273
  }
2197
2274
  }
2198
2275
  }
2199
2276
  });
2277
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
2278
+ if (text === ';' && editor.selection.isEmpty()) {
2279
+ var cursor = editor.getCursorPosition();
2280
+ var line = session.doc.getLine(cursor.row);
2281
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
2282
+ if (rightChar === ';') {
2283
+ return {
2284
+ text: '',
2285
+ selection: [1, 1]
2286
+ };
2287
+ }
2288
+ }
2289
+ });
2290
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
2291
+ if (text === '!' && editor.selection.isEmpty()) {
2292
+ var cursor = editor.getCursorPosition();
2293
+ var line = session.doc.getLine(cursor.row);
2294
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
2295
+ return {
2296
+ text: '!important',
2297
+ selection: [10, 10]
2298
+ };
2299
+ }
2300
+ }
2301
+ });
2200
2302
  };
2201
- oop.inherits(XmlBehaviour, Behaviour);
2202
- exports.XmlBehaviour = XmlBehaviour;
2303
+ oop.inherits(CssBehaviour, CstyleBehaviour);
2304
+ exports.CssBehaviour = CssBehaviour;
2305
+
2306
+ });
2307
+
2308
+ ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
2309
+ var oop = require("../lib/oop");
2310
+ var TextMode = require("./text").Mode;
2311
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
2312
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
2313
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2314
+ var CssCompletions = require("./css_completions").CssCompletions;
2315
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
2316
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
2317
+ var Mode = function () {
2318
+ this.HighlightRules = CssHighlightRules;
2319
+ this.$outdent = new MatchingBraceOutdent();
2320
+ this.$behaviour = new CssBehaviour();
2321
+ this.$completer = new CssCompletions();
2322
+ this.foldingRules = new CStyleFoldMode();
2323
+ };
2324
+ oop.inherits(Mode, TextMode);
2325
+ (function () {
2326
+ this.foldingRules = "cStyle";
2327
+ this.blockComment = { start: "/*", end: "*/" };
2328
+ this.getNextLineIndent = function (state, line, tab) {
2329
+ var indent = this.$getIndent(line);
2330
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
2331
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
2332
+ return indent;
2333
+ }
2334
+ var match = line.match(/^.*\{\s*$/);
2335
+ if (match) {
2336
+ indent += tab;
2337
+ }
2338
+ return indent;
2339
+ };
2340
+ this.checkOutdent = function (state, line, input) {
2341
+ return this.$outdent.checkOutdent(line, input);
2342
+ };
2343
+ this.autoOutdent = function (state, doc, row) {
2344
+ this.$outdent.autoOutdent(doc, row);
2345
+ };
2346
+ this.getCompletions = function (state, session, pos, prefix) {
2347
+ return this.$completer.getCompletions(state, session, pos, prefix);
2348
+ };
2349
+ this.createWorker = function (session) {
2350
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
2351
+ worker.attachToDocument(session.getDocument());
2352
+ worker.on("annotate", function (e) {
2353
+ session.setAnnotations(e.data);
2354
+ });
2355
+ worker.on("terminate", function () {
2356
+ session.clearAnnotations();
2357
+ });
2358
+ return worker;
2359
+ };
2360
+ this.$id = "ace/mode/css";
2361
+ this.snippetFileId = "ace/snippets/css";
2362
+ }).call(Mode.prototype);
2363
+ exports.Mode = Mode;
2203
2364
 
2204
2365
  });
2205
2366
 
@@ -2242,107 +2403,6 @@ oop.inherits(FoldMode, BaseFoldMode);
2242
2403
 
2243
2404
  });
2244
2405
 
2245
- ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
2246
- var oop = require("../../lib/oop");
2247
- var Range = require("../../range").Range;
2248
- var BaseFoldMode = require("./fold_mode").FoldMode;
2249
- var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
2250
- BaseFoldMode.call(this);
2251
- this.voidElements = voidElements || {};
2252
- this.optionalEndTags = oop.mixin({}, this.voidElements);
2253
- if (optionalEndTags)
2254
- oop.mixin(this.optionalEndTags, optionalEndTags);
2255
- };
2256
- oop.inherits(FoldMode, BaseFoldMode);
2257
- var Tag = function () {
2258
- this.tagName = "";
2259
- this.closing = false;
2260
- this.selfClosing = false;
2261
- this.start = { row: 0, column: 0 };
2262
- this.end = { row: 0, column: 0 };
2263
- };
2264
- function is(token, type) {
2265
- return token.type.lastIndexOf(type + ".xml") > -1;
2266
- }
2267
- (function () {
2268
- this.getFoldWidget = function (session, foldStyle, row) {
2269
- var tag = this._getFirstTagInLine(session, row);
2270
- if (!tag)
2271
- return this.getCommentFoldWidget(session, row);
2272
- if (tag.closing || (!tag.tagName && tag.selfClosing))
2273
- return foldStyle === "markbeginend" ? "end" : "";
2274
- if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
2275
- return "";
2276
- if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
2277
- return "";
2278
- return "start";
2279
- };
2280
- this.getCommentFoldWidget = function (session, row) {
2281
- if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
2282
- return "start";
2283
- return "";
2284
- };
2285
- this._getFirstTagInLine = function (session, row) {
2286
- var tokens = session.getTokens(row);
2287
- var tag = new Tag();
2288
- for (var i = 0; i < tokens.length; i++) {
2289
- var token = tokens[i];
2290
- if (is(token, "tag-open")) {
2291
- tag.end.column = tag.start.column + token.value.length;
2292
- tag.closing = is(token, "end-tag-open");
2293
- token = tokens[++i];
2294
- if (!token)
2295
- return null;
2296
- tag.tagName = token.value;
2297
- tag.end.column += token.value.length;
2298
- for (i++; i < tokens.length; i++) {
2299
- token = tokens[i];
2300
- tag.end.column += token.value.length;
2301
- if (is(token, "tag-close")) {
2302
- tag.selfClosing = token.value == '/>';
2303
- break;
2304
- }
2305
- }
2306
- return tag;
2307
- }
2308
- else if (is(token, "tag-close")) {
2309
- tag.selfClosing = token.value == '/>';
2310
- return tag;
2311
- }
2312
- tag.start.column += token.value.length;
2313
- }
2314
- return null;
2315
- };
2316
- this._findEndTagInLine = function (session, row, tagName, startColumn) {
2317
- var tokens = session.getTokens(row);
2318
- var column = 0;
2319
- for (var i = 0; i < tokens.length; i++) {
2320
- var token = tokens[i];
2321
- column += token.value.length;
2322
- if (column < startColumn)
2323
- continue;
2324
- if (is(token, "end-tag-open")) {
2325
- token = tokens[i + 1];
2326
- if (token && token.value == tagName)
2327
- return true;
2328
- }
2329
- }
2330
- return false;
2331
- };
2332
- this.getFoldWidgetRange = function (session, foldStyle, row) {
2333
- var tags = session.getMatchingTags({ row: row, column: 0 });
2334
- if (tags) {
2335
- return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
2336
- }
2337
- else {
2338
- return this.getCommentFoldWidget(session, row)
2339
- && session.getCommentFoldRange(row, session.getLine(row).length);
2340
- }
2341
- };
2342
- }).call(FoldMode.prototype);
2343
-
2344
- });
2345
-
2346
2406
  ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
2347
2407
  var oop = require("../../lib/oop");
2348
2408
  var MixedFoldMode = require("./mixed").FoldMode;
@@ -2864,13 +2924,13 @@ var ShHighlightRules = function () {
2864
2924
  token: "support.function",
2865
2925
  regex: fileDescriptor
2866
2926
  }, {
2867
- token: "string",
2927
+ token: "string", // ' string
2868
2928
  start: "'", end: "'"
2869
2929
  }, {
2870
- token: "constant.numeric",
2930
+ token: "constant.numeric", // float
2871
2931
  regex: floatNumber
2872
2932
  }, {
2873
- token: "constant.numeric",
2933
+ token: "constant.numeric", // integer
2874
2934
  regex: integer + "\\b"
2875
2935
  }, {
2876
2936
  token: keywordMapper,
@@ -3393,31 +3453,31 @@ var ScssHighlightRules = function () {
3393
3453
  regex: "\\/\\/.*$"
3394
3454
  },
3395
3455
  {
3396
- token: "comment",
3456
+ token: "comment", // multi line comment
3397
3457
  regex: "\\/\\*",
3398
3458
  next: "comment"
3399
3459
  }, {
3400
- token: "string",
3460
+ token: "string", // single line
3401
3461
  regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
3402
3462
  }, {
3403
- token: "string",
3463
+ token: "string", // multi line string start
3404
3464
  regex: '["].*\\\\$',
3405
3465
  next: "qqstring"
3406
3466
  }, {
3407
- token: "string",
3467
+ token: "string", // single line
3408
3468
  regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
3409
3469
  }, {
3410
- token: "string",
3470
+ token: "string", // multi line string start
3411
3471
  regex: "['].*\\\\$",
3412
3472
  next: "qstring"
3413
3473
  }, {
3414
3474
  token: "constant.numeric",
3415
3475
  regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
3416
3476
  }, {
3417
- token: "constant.numeric",
3477
+ token: "constant.numeric", // hex6 color
3418
3478
  regex: "#[a-f0-9]{6}"
3419
3479
  }, {
3420
- token: "constant.numeric",
3480
+ token: "constant.numeric", // hex3 color
3421
3481
  regex: "#[a-f0-9]{3}"
3422
3482
  }, {
3423
3483
  token: "constant.numeric",
@@ -3476,7 +3536,7 @@ var ScssHighlightRules = function () {
3476
3536
  ],
3477
3537
  "comment": [
3478
3538
  {
3479
- token: "comment",
3539
+ token: "comment", // closing comment
3480
3540
  regex: "\\*\\/",
3481
3541
  next: "start"
3482
3542
  }, {
@@ -3645,23 +3705,23 @@ var LessHighlightRules = function () {
3645
3705
  regex: "\\/\\/.*$"
3646
3706
  },
3647
3707
  {
3648
- token: "comment",
3708
+ token: "comment", // multi line comment
3649
3709
  regex: "\\/\\*",
3650
3710
  next: "comment"
3651
3711
  }, {
3652
- token: "string",
3712
+ token: "string", // single line
3653
3713
  regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
3654
3714
  }, {
3655
- token: "string",
3715
+ token: "string", // single line
3656
3716
  regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
3657
3717
  }, {
3658
3718
  token: ["constant.numeric", "keyword"],
3659
3719
  regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
3660
3720
  }, {
3661
- token: "constant.numeric",
3721
+ token: "constant.numeric", // hex6 color
3662
3722
  regex: "#[a-f0-9]{6}"
3663
3723
  }, {
3664
- token: "constant.numeric",
3724
+ token: "constant.numeric", // hex3 color
3665
3725
  regex: "#[a-f0-9]{3}"
3666
3726
  }, {
3667
3727
  token: "constant.numeric",
@@ -3729,7 +3789,7 @@ var LessHighlightRules = function () {
3729
3789
  ],
3730
3790
  "comment": [
3731
3791
  {
3732
- token: "comment",
3792
+ token: "comment", // closing comment
3733
3793
  regex: "\\*\\/",
3734
3794
  next: "start"
3735
3795
  }, {
@@ -3794,23 +3854,23 @@ ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/li
3794
3854
  var oop = require("../lib/oop");
3795
3855
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
3796
3856
  var constantOtherSymbol = exports.constantOtherSymbol = {
3797
- token: "constant.other.symbol.ruby",
3857
+ token: "constant.other.symbol.ruby", // symbol
3798
3858
  regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
3799
3859
  };
3800
3860
  exports.qString = {
3801
- token: "string",
3861
+ token: "string", // single line
3802
3862
  regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
3803
3863
  };
3804
3864
  exports.qqString = {
3805
- token: "string",
3865
+ token: "string", // single line
3806
3866
  regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
3807
3867
  };
3808
3868
  exports.tString = {
3809
- token: "string",
3869
+ token: "string", // backtick string
3810
3870
  regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
3811
3871
  };
3812
3872
  var constantNumericHex = exports.constantNumericHex = {
3813
- token: "constant.numeric",
3873
+ token: "constant.numeric", // hex
3814
3874
  regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
3815
3875
  };
3816
3876
  var constantNumericBinary = exports.constantNumericBinary = {
@@ -3821,24 +3881,24 @@ var constantNumericDecimal = exports.constantNumericDecimal = {
3821
3881
  token: "constant.numeric",
3822
3882
  regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/
3823
3883
  };
3824
- var constantNumericOctal = exports.constantNumericDecimal = {
3884
+ var constantNumericOctal = exports.constantNumericOctal = {
3825
3885
  token: "constant.numeric",
3826
3886
  regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/
3827
3887
  };
3828
3888
  var constantNumericRational = exports.constantNumericRational = {
3829
- token: "constant.numeric",
3889
+ token: "constant.numeric", //rational + complex
3830
3890
  regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/
3831
3891
  };
3832
3892
  var constantNumericComplex = exports.constantNumericComplex = {
3833
- token: "constant.numeric",
3893
+ token: "constant.numeric", //simple complex numbers
3834
3894
  regex: /\b([\d]i)\b/
3835
3895
  };
3836
3896
  var constantNumericFloat = exports.constantNumericFloat = {
3837
- token: "constant.numeric",
3897
+ token: "constant.numeric", // float + complex
3838
3898
  regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"
3839
3899
  };
3840
3900
  var instanceVariable = exports.instanceVariable = {
3841
- token: "variable.instance",
3901
+ token: "variable.instance", // instance variable
3842
3902
  regex: "@{1,2}[a-zA-Z_\\d]+"
3843
3903
  };
3844
3904
  var RubyHighlightRules = function () {
@@ -3903,7 +3963,7 @@ var RubyHighlightRules = function () {
3903
3963
  token: "comment",
3904
3964
  regex: "#.*$"
3905
3965
  }, {
3906
- token: "comment.multiline",
3966
+ token: "comment.multiline", // multi line comment
3907
3967
  regex: "^=begin(?=$|\\s.*$)",
3908
3968
  next: "comment"
3909
3969
  }, {
@@ -3959,7 +4019,7 @@ var RubyHighlightRules = function () {
3959
4019
  defaultToken: "string"
3960
4020
  }]
3961
4021
  }, {
3962
- token: "string.start",
4022
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
3963
4023
  regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) {
3964
4024
  if (stack.length)
3965
4025
  stack = [];
@@ -3969,7 +4029,7 @@ var RubyHighlightRules = function () {
3969
4029
  return this.token;
3970
4030
  }
3971
4031
  }, {
3972
- token: "string.start",
4032
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
3973
4033
  regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) {
3974
4034
  if (stack.length)
3975
4035
  stack = [];
@@ -3979,7 +4039,7 @@ var RubyHighlightRules = function () {
3979
4039
  return this.token;
3980
4040
  }
3981
4041
  }, {
3982
- token: "constant.other.symbol.ruby",
4042
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
3983
4043
  regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) {
3984
4044
  if (stack.length)
3985
4045
  stack = [];
@@ -3989,7 +4049,7 @@ var RubyHighlightRules = function () {
3989
4049
  return this.token;
3990
4050
  }
3991
4051
  }, {
3992
- token: "constant.other.symbol.ruby",
4052
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
3993
4053
  regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) {
3994
4054
  if (stack.length)
3995
4055
  stack = [];
@@ -4010,15 +4070,15 @@ var RubyHighlightRules = function () {
4010
4070
  }
4011
4071
  }],
4012
4072
  {
4013
- token: "punctuation",
4073
+ token: "punctuation", // namespaces aren't symbols
4014
4074
  regex: "::"
4015
4075
  },
4016
4076
  instanceVariable,
4017
4077
  {
4018
- token: "variable.global",
4078
+ token: "variable.global", // global variable
4019
4079
  regex: "[$][a-zA-Z_\\d]+"
4020
4080
  }, {
4021
- token: "support.class",
4081
+ token: "support.class", // class name
4022
4082
  regex: "[A-Z][a-zA-Z_\\d]*"
4023
4083
  }, {
4024
4084
  token: ["punctuation.operator", "support.function"],
@@ -4132,16 +4192,16 @@ var RubyHighlightRules = function () {
4132
4192
  ],
4133
4193
  "comment": [
4134
4194
  {
4135
- token: "comment.multiline",
4195
+ token: "comment.multiline", // closing comment
4136
4196
  regex: "^=end(?=$|\\s.*$)",
4137
4197
  next: "start"
4138
4198
  }, {
4139
- token: "comment",
4199
+ token: "comment", // comment spanning whole line
4140
4200
  regex: ".+"
4141
4201
  }
4142
4202
  ],
4143
4203
  "qStateWithInterpolation": [{
4144
- token: "string.start",
4204
+ token: "string.start", // excluded nested |^% due to difficulty in realization
4145
4205
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4146
4206
  if (stack.length && val === stack[0]) {
4147
4207
  stack.unshift(val, state);
@@ -4174,7 +4234,7 @@ var RubyHighlightRules = function () {
4174
4234
  defaultToken: "string"
4175
4235
  }],
4176
4236
  "qStateWithoutInterpolation": [{
4177
- token: "string.start",
4237
+ token: "string.start", // excluded nested |^% due to difficulty in realization
4178
4238
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4179
4239
  if (stack.length && val === stack[0]) {
4180
4240
  stack.unshift(val, state);
@@ -4203,7 +4263,7 @@ var RubyHighlightRules = function () {
4203
4263
  defaultToken: "string"
4204
4264
  }],
4205
4265
  "sStateWithoutInterpolation": [{
4206
- token: "constant.other.symbol.ruby",
4266
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
4207
4267
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4208
4268
  if (stack.length && val === stack[0]) {
4209
4269
  stack.unshift(val, state);
@@ -4226,7 +4286,7 @@ var RubyHighlightRules = function () {
4226
4286
  defaultToken: "constant.other.symbol.ruby"
4227
4287
  }],
4228
4288
  "sStateWithInterpolation": [{
4229
- token: "constant.other.symbol.ruby",
4289
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
4230
4290
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4231
4291
  if (stack.length && val === stack[0]) {
4232
4292
  stack.unshift(val, state);
@@ -4259,7 +4319,7 @@ var RubyHighlightRules = function () {
4259
4319
  defaultToken: "constant.other.symbol.ruby"
4260
4320
  }],
4261
4321
  "rState": [{
4262
- token: "string.regexp",
4322
+ token: "string.regexp", // excluded nested |^% due to difficulty in realization
4263
4323
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
4264
4324
  if (stack.length && val === stack[0]) {
4265
4325
  stack.unshift(val, state);