@openui5/sap.ui.codeeditor 1.132.1 → 1.134.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 (452) hide show
  1. package/.reuse/dep5 +2 -9
  2. package/LICENSES/LicenseRef-Unicode-3.0.txt +39 -0
  3. package/THIRDPARTY.txt +45 -78
  4. package/package.json +2 -2
  5. package/src/sap/ui/codeeditor/.library +2 -2
  6. package/src/sap/ui/codeeditor/CodeEditor.js +4 -4
  7. package/src/sap/ui/codeeditor/js/ace/ace.js +6564 -6162
  8. package/src/sap/ui/codeeditor/js/ace/css/ace.css +55 -23
  9. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-1.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-2.png +0 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/main-10.svg +4 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/main-11.svg +5 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/main-12.svg +4 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/main-24.png +0 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/main-25.svg +1 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/main-26.png +0 -0
  28. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +8 -6
  29. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +4 -6
  30. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +8 -3
  31. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +5 -3
  32. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor.css +221 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor_dark.css +224 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/theme/github_light_default.css +164 -0
  35. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +2 -2
  36. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +0 -0
  37. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +1 -6
  38. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +4 -2
  39. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +0 -0
  40. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +24 -6
  41. package/src/sap/ui/codeeditor/js/ace/ext-error_marker.js +0 -0
  42. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +198 -87
  43. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +8 -5
  44. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +180 -79
  45. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +0 -0
  46. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +7 -3
  47. package/src/sap/ui/codeeditor/js/ace/ext-options.js +12 -5
  48. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +202 -116
  49. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +0 -0
  50. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +14 -12
  51. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +12 -5
  52. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +0 -0
  53. package/src/sap/ui/codeeditor/js/ace/ext-split.js +2 -1
  54. package/src/sap/ui/codeeditor/js/ace/ext-static_highlight.js +0 -0
  55. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +0 -0
  56. package/src/sap/ui/codeeditor/js/ace/ext-textarea.js +476 -3
  57. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +6 -2
  58. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +0 -0
  59. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +13 -6
  60. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +748 -373
  61. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +0 -0
  64. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +3 -3
  65. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +0 -0
  66. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +6 -6
  67. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +3 -3
  68. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +3 -3
  69. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +0 -0
  70. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +14 -14
  71. package/src/sap/ui/codeeditor/js/ace/mode-assembly_arm32.js +185 -0
  72. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +0 -0
  73. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +377 -317
  74. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +0 -0
  75. package/src/sap/ui/codeeditor/js/ace/mode-basic.js +201 -0
  76. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +0 -0
  77. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +1 -1
  78. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +13 -13
  79. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +0 -0
  80. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +13 -13
  81. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +3 -3
  82. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +0 -0
  83. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +377 -317
  84. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +6 -6
  85. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +9 -9
  86. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +75 -78
  87. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +22 -22
  88. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +0 -0
  89. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +0 -0
  90. package/src/sap/ui/codeeditor/js/ace/mode-css.js +6 -3
  91. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +377 -317
  92. package/src/sap/ui/codeeditor/js/ace/mode-d.js +12 -12
  93. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +17 -17
  94. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +0 -0
  95. package/src/sap/ui/codeeditor/js/ace/mode-django.js +377 -317
  96. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +3 -3
  97. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +6 -6
  98. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +18 -18
  99. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +4 -4
  100. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +4 -4
  101. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +402 -342
  102. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +0 -0
  103. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +0 -0
  104. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +15 -15
  105. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +7 -7
  106. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +0 -0
  107. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +12 -12
  108. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +0 -0
  109. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +54 -57
  110. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +4 -4
  111. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +3 -3
  112. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +1 -1
  113. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +13 -13
  114. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +371 -65
  115. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +10 -10
  116. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +0 -0
  117. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +381 -75
  118. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +84 -87
  119. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +379 -319
  120. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +0 -0
  121. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +1 -1
  122. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +10 -10
  123. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +0 -0
  124. package/src/sap/ui/codeeditor/js/ace/mode-html.js +377 -317
  125. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +472 -412
  126. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +484 -424
  127. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +0 -0
  128. package/src/sap/ui/codeeditor/js/ace/mode-io.js +0 -0
  129. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +2 -2
  130. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +67 -70
  131. package/src/sap/ui/codeeditor/js/ace/mode-java.js +383 -77
  132. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +371 -65
  133. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +7 -7
  134. package/src/sap/ui/codeeditor/js/ace/mode-json.js +8 -8
  135. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +8 -8
  136. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +4 -5
  137. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +67 -70
  138. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +0 -0
  139. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +960 -89
  140. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +0 -0
  141. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +0 -0
  142. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +0 -0
  143. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +381 -321
  144. package/src/sap/ui/codeeditor/js/ace/mode-less.js +12 -9
  145. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +385 -325
  146. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +2 -2
  147. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +0 -0
  148. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +0 -0
  149. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +6 -9
  150. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +0 -0
  151. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +5 -5
  152. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +382 -322
  153. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +0 -0
  154. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +3 -3
  155. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +474 -414
  156. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +53 -56
  157. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +1 -1
  158. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +0 -0
  159. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +0 -0
  160. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +1 -1
  161. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +0 -0
  162. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +7 -7
  163. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +7 -7
  164. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +16 -16
  165. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +0 -0
  166. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +379 -319
  167. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +15 -15
  168. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +7 -7
  169. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +10 -10
  170. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +0 -0
  171. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +6 -6
  172. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +98 -104
  173. package/src/sap/ui/codeeditor/js/ace/mode-php.js +797 -616
  174. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +797 -616
  175. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +0 -0
  176. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +0 -0
  177. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +3 -3
  178. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +6 -6
  179. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +0 -0
  180. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +0 -0
  181. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +0 -0
  182. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +18 -18
  183. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +7 -4
  184. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +0 -0
  185. package/src/sap/ui/codeeditor/js/ace/mode-python.js +17 -17
  186. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +5 -5
  187. package/src/sap/ui/codeeditor/js/ace/mode-r.js +13 -13
  188. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +8 -8
  189. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +386 -326
  190. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +6 -6
  191. package/src/sap/ui/codeeditor/js/ace/mode-red.js +0 -0
  192. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +32 -32
  193. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +390 -330
  194. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +0 -0
  195. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +25 -25
  196. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +39 -32
  197. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +13 -13
  198. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +14 -11
  199. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +14 -14
  200. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +381 -75
  201. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +2 -2
  202. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +10 -10
  203. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +14 -11
  204. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +3 -3
  205. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +371 -65
  206. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +521 -461
  207. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +377 -317
  208. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +0 -0
  209. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +377 -317
  210. package/src/sap/ui/codeeditor/js/ace/mode-space.js +0 -0
  211. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +0 -0
  212. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +12 -6
  213. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +5 -5
  214. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +10 -7
  215. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +132 -75
  216. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +5 -4
  217. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +7 -7
  218. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +0 -0
  219. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +6 -6
  220. package/src/sap/ui/codeeditor/js/ace/mode-text.js +0 -0
  221. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +0 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +0 -0
  223. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +492 -182
  224. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +0 -0
  225. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +379 -319
  226. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +371 -65
  227. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +0 -0
  228. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +0 -0
  229. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +387 -327
  230. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +1 -1
  231. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +4 -4
  232. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +377 -317
  233. package/src/sap/ui/codeeditor/js/ace/mode-vue.js +3834 -0
  234. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +382 -76
  235. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +18 -10
  236. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +4 -5
  237. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +5 -5
  238. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +2 -2
  239. package/src/sap/ui/codeeditor/js/ace/mode-zig.js +585 -0
  240. package/src/sap/ui/codeeditor/js/ace/snippets/abap.js +0 -0
  241. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +0 -0
  242. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +0 -0
  243. package/src/sap/ui/codeeditor/js/ace/snippets/ada.js +0 -0
  244. package/src/sap/ui/codeeditor/js/ace/snippets/apache_conf.js +0 -0
  245. package/src/sap/ui/codeeditor/js/ace/snippets/applescript.js +0 -0
  246. package/src/sap/ui/codeeditor/js/ace/snippets/asciidoc.js +0 -0
  247. package/src/sap/ui/codeeditor/js/ace/snippets/asl.js +0 -0
  248. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_arm32.js +9 -0
  249. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_x86.js +0 -0
  250. package/src/sap/ui/codeeditor/js/ace/snippets/autohotkey.js +0 -0
  251. package/src/sap/ui/codeeditor/js/ace/snippets/basic.js +9 -0
  252. package/src/sap/ui/codeeditor/js/ace/snippets/batchfile.js +0 -0
  253. package/src/sap/ui/codeeditor/js/ace/snippets/c9search.js +0 -0
  254. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +0 -0
  255. package/src/sap/ui/codeeditor/js/ace/snippets/cirru.js +0 -0
  256. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +0 -0
  257. package/src/sap/ui/codeeditor/js/ace/snippets/cobol.js +0 -0
  258. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +0 -0
  259. package/src/sap/ui/codeeditor/js/ace/snippets/coldfusion.js +0 -0
  260. package/src/sap/ui/codeeditor/js/ace/snippets/csharp.js +0 -0
  261. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +0 -0
  262. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +0 -0
  263. package/src/sap/ui/codeeditor/js/ace/snippets/csound_score.js +0 -0
  264. package/src/sap/ui/codeeditor/js/ace/snippets/csp.js +0 -0
  265. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +0 -0
  266. package/src/sap/ui/codeeditor/js/ace/snippets/curly.js +0 -0
  267. package/src/sap/ui/codeeditor/js/ace/snippets/d.js +0 -0
  268. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +0 -0
  269. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +0 -0
  270. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +0 -0
  271. package/src/sap/ui/codeeditor/js/ace/snippets/dockerfile.js +0 -0
  272. package/src/sap/ui/codeeditor/js/ace/snippets/dot.js +0 -0
  273. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +0 -0
  274. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +0 -0
  275. package/src/sap/ui/codeeditor/js/ace/snippets/eiffel.js +0 -0
  276. package/src/sap/ui/codeeditor/js/ace/snippets/ejs.js +0 -0
  277. package/src/sap/ui/codeeditor/js/ace/snippets/elixir.js +0 -0
  278. package/src/sap/ui/codeeditor/js/ace/snippets/elm.js +0 -0
  279. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +0 -0
  280. package/src/sap/ui/codeeditor/js/ace/snippets/forth.js +0 -0
  281. package/src/sap/ui/codeeditor/js/ace/snippets/fortran.js +0 -0
  282. package/src/sap/ui/codeeditor/js/ace/snippets/fsharp.js +0 -0
  283. package/src/sap/ui/codeeditor/js/ace/snippets/ftl.js +0 -0
  284. package/src/sap/ui/codeeditor/js/ace/snippets/gcode.js +0 -0
  285. package/src/sap/ui/codeeditor/js/ace/snippets/gherkin.js +0 -0
  286. package/src/sap/ui/codeeditor/js/ace/snippets/gitignore.js +0 -0
  287. package/src/sap/ui/codeeditor/js/ace/snippets/glsl.js +0 -0
  288. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +0 -0
  289. package/src/sap/ui/codeeditor/js/ace/snippets/golang.js +0 -0
  290. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +0 -0
  291. package/src/sap/ui/codeeditor/js/ace/snippets/groovy.js +0 -0
  292. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +0 -0
  293. package/src/sap/ui/codeeditor/js/ace/snippets/handlebars.js +0 -0
  294. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +0 -0
  295. package/src/sap/ui/codeeditor/js/ace/snippets/haskell_cabal.js +0 -0
  296. package/src/sap/ui/codeeditor/js/ace/snippets/haxe.js +0 -0
  297. package/src/sap/ui/codeeditor/js/ace/snippets/hjson.js +0 -0
  298. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +0 -0
  299. package/src/sap/ui/codeeditor/js/ace/snippets/html_elixir.js +0 -0
  300. package/src/sap/ui/codeeditor/js/ace/snippets/html_ruby.js +0 -0
  301. package/src/sap/ui/codeeditor/js/ace/snippets/ini.js +0 -0
  302. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +0 -0
  303. package/src/sap/ui/codeeditor/js/ace/snippets/jack.js +0 -0
  304. package/src/sap/ui/codeeditor/js/ace/snippets/jade.js +0 -0
  305. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +0 -0
  306. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +0 -0
  307. package/src/sap/ui/codeeditor/js/ace/snippets/json.js +0 -0
  308. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +0 -0
  309. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +0 -0
  310. package/src/sap/ui/codeeditor/js/ace/snippets/jssm.js +0 -0
  311. package/src/sap/ui/codeeditor/js/ace/snippets/jsx.js +0 -0
  312. package/src/sap/ui/codeeditor/js/ace/snippets/julia.js +0 -0
  313. package/src/sap/ui/codeeditor/js/ace/snippets/kotlin.js +0 -0
  314. package/src/sap/ui/codeeditor/js/ace/snippets/latex.js +0 -0
  315. package/src/sap/ui/codeeditor/js/ace/snippets/less.js +0 -0
  316. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +0 -0
  317. package/src/sap/ui/codeeditor/js/ace/snippets/lisp.js +0 -0
  318. package/src/sap/ui/codeeditor/js/ace/snippets/livescript.js +0 -0
  319. package/src/sap/ui/codeeditor/js/ace/snippets/logiql.js +0 -0
  320. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +0 -0
  321. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +0 -0
  322. package/src/sap/ui/codeeditor/js/ace/snippets/luapage.js +0 -0
  323. package/src/sap/ui/codeeditor/js/ace/snippets/lucene.js +0 -0
  324. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +0 -0
  325. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +0 -0
  326. package/src/sap/ui/codeeditor/js/ace/snippets/mask.js +0 -0
  327. package/src/sap/ui/codeeditor/js/ace/snippets/matlab.js +0 -0
  328. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +0 -0
  329. package/src/sap/ui/codeeditor/js/ace/snippets/mel.js +0 -0
  330. package/src/sap/ui/codeeditor/js/ace/snippets/mixal.js +0 -0
  331. package/src/sap/ui/codeeditor/js/ace/snippets/mushcode.js +0 -0
  332. package/src/sap/ui/codeeditor/js/ace/snippets/mysql.js +0 -0
  333. package/src/sap/ui/codeeditor/js/ace/snippets/nix.js +0 -0
  334. package/src/sap/ui/codeeditor/js/ace/snippets/nsis.js +0 -0
  335. package/src/sap/ui/codeeditor/js/ace/snippets/objectivec.js +0 -0
  336. package/src/sap/ui/codeeditor/js/ace/snippets/ocaml.js +0 -0
  337. package/src/sap/ui/codeeditor/js/ace/snippets/pascal.js +0 -0
  338. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +0 -0
  339. package/src/sap/ui/codeeditor/js/ace/snippets/pgsql.js +0 -0
  340. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +0 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/php_laravel_blade.js +0 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/pig.js +0 -0
  343. package/src/sap/ui/codeeditor/js/ace/snippets/plain_text.js +0 -0
  344. package/src/sap/ui/codeeditor/js/ace/snippets/powershell.js +0 -0
  345. package/src/sap/ui/codeeditor/js/ace/snippets/praat.js +0 -0
  346. package/src/sap/ui/codeeditor/js/ace/snippets/prolog.js +0 -0
  347. package/src/sap/ui/codeeditor/js/ace/snippets/properties.js +0 -0
  348. package/src/sap/ui/codeeditor/js/ace/snippets/protobuf.js +0 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/puppet.js +0 -0
  350. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +0 -0
  351. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +0 -0
  352. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +0 -0
  353. package/src/sap/ui/codeeditor/js/ace/snippets/rdoc.js +0 -0
  354. package/src/sap/ui/codeeditor/js/ace/snippets/red.js +0 -0
  355. package/src/sap/ui/codeeditor/js/ace/snippets/redshift.js +0 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/rhtml.js +0 -0
  357. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +0 -0
  358. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +0 -0
  359. package/src/sap/ui/codeeditor/js/ace/snippets/rust.js +0 -0
  360. package/src/sap/ui/codeeditor/js/ace/snippets/sass.js +0 -0
  361. package/src/sap/ui/codeeditor/js/ace/snippets/scad.js +0 -0
  362. package/src/sap/ui/codeeditor/js/ace/snippets/scala.js +0 -0
  363. package/src/sap/ui/codeeditor/js/ace/snippets/scheme.js +0 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/scss.js +0 -0
  365. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +0 -0
  366. package/src/sap/ui/codeeditor/js/ace/snippets/sjs.js +0 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/slim.js +0 -0
  368. package/src/sap/ui/codeeditor/js/ace/snippets/smarty.js +0 -0
  369. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +0 -0
  370. package/src/sap/ui/codeeditor/js/ace/snippets/soy_template.js +0 -0
  371. package/src/sap/ui/codeeditor/js/ace/snippets/space.js +0 -0
  372. package/src/sap/ui/codeeditor/js/ace/snippets/sparql.js +0 -0
  373. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +0 -0
  374. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +0 -0
  375. package/src/sap/ui/codeeditor/js/ace/snippets/stylus.js +0 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/svg.js +0 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/swift.js +0 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +0 -0
  379. package/src/sap/ui/codeeditor/js/ace/snippets/terraform.js +0 -0
  380. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +0 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/text.js +0 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +0 -0
  383. package/src/sap/ui/codeeditor/js/ace/snippets/toml.js +0 -0
  384. package/src/sap/ui/codeeditor/js/ace/snippets/tsx.js +0 -0
  385. package/src/sap/ui/codeeditor/js/ace/snippets/turtle.js +0 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/twig.js +0 -0
  387. package/src/sap/ui/codeeditor/js/ace/snippets/typescript.js +0 -0
  388. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +0 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/vbscript.js +0 -0
  390. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +0 -0
  391. package/src/sap/ui/codeeditor/js/ace/snippets/verilog.js +0 -0
  392. package/src/sap/ui/codeeditor/js/ace/snippets/vhdl.js +0 -0
  393. package/src/sap/ui/codeeditor/js/ace/snippets/vue.js +9 -0
  394. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +0 -0
  395. package/src/sap/ui/codeeditor/js/ace/snippets/xml.js +0 -0
  396. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +0 -0
  397. package/src/sap/ui/codeeditor/js/ace/snippets/yaml.js +0 -0
  398. package/src/sap/ui/codeeditor/js/ace/snippets/zig.js +9 -0
  399. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +0 -0
  400. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +0 -0
  401. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +0 -0
  402. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor.js +18 -0
  403. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor_dark.js +18 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +0 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +0 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +0 -0
  407. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +0 -0
  408. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +0 -0
  409. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +0 -0
  410. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +0 -0
  411. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +0 -0
  412. package/src/sap/ui/codeeditor/js/ace/theme-github.js +0 -0
  413. package/src/sap/ui/codeeditor/js/ace/theme-github_light_default.js +18 -0
  414. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +0 -0
  415. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +0 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +0 -0
  417. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +0 -0
  418. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +0 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +0 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +0 -0
  421. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +0 -0
  422. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +0 -0
  423. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +0 -0
  424. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +0 -0
  425. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +0 -0
  426. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +1 -1
  427. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +0 -0
  428. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +0 -0
  429. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +0 -0
  430. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +0 -0
  431. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +0 -0
  432. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +0 -0
  433. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +0 -0
  434. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +0 -0
  435. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +0 -0
  436. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +0 -0
  437. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +0 -0
  438. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +0 -0
  439. package/src/sap/ui/codeeditor/js/ace/worker-base.js +3 -13
  440. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +3 -13
  441. package/src/sap/ui/codeeditor/js/ace/worker-css.js +3 -13
  442. package/src/sap/ui/codeeditor/js/ace/worker-html.js +3 -13
  443. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +3 -13
  444. package/src/sap/ui/codeeditor/js/ace/worker-json.js +3 -13
  445. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +3 -13
  446. package/src/sap/ui/codeeditor/js/ace/worker-php.js +3 -13
  447. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +8 -15
  448. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +3 -13
  449. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +6 -16
  450. package/src/sap/ui/codeeditor/library.js +2 -2
  451. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
  452. package/LICENSES/Unicode-DFS-2015.txt +0 -51
@@ -74,7 +74,7 @@ var CssHighlightRules = function () {
74
74
  + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
75
75
  }],
76
76
  "comments": [{
77
- token: "comment",
77
+ token: "comment", // multi line comment
78
78
  regex: "\\/\\*",
79
79
  push: [{
80
80
  token: "comment",
@@ -103,10 +103,10 @@ var CssHighlightRules = function () {
103
103
  token: "constant.numeric",
104
104
  regex: numRe
105
105
  }, {
106
- token: "constant.numeric",
106
+ token: "constant.numeric", // hex6 color
107
107
  regex: "#[a-f0-9]{6}"
108
108
  }, {
109
- token: "constant.numeric",
109
+ token: "constant.numeric", // hex3 color
110
110
  regex: "#[a-f0-9]{3}"
111
111
  }, {
112
112
  token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
@@ -119,6 +119,9 @@ var CssHighlightRules = function () {
119
119
  }, {
120
120
  token: keywordMapper,
121
121
  regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
122
+ }, {
123
+ token: "paren.lparen",
124
+ regex: "\\{"
122
125
  }, {
123
126
  caseInsensitive: true
124
127
  }],
@@ -202,7 +205,7 @@ var JsDocCommentHighlightRules = function () {
202
205
  ]
203
206
  }, {
204
207
  token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
205
- regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
208
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
206
209
  next: "pop"
207
210
  }, {
208
211
  token: "rparen.doc",
@@ -262,7 +265,7 @@ var JsDocCommentHighlightRules = function () {
262
265
  },
263
266
  JsDocCommentHighlightRules.getTagRule(),
264
267
  {
265
- defaultToken: "comment.doc",
268
+ defaultToken: "comment.doc.body",
266
269
  caseInsensitive: true
267
270
  }
268
271
  ],
@@ -285,14 +288,14 @@ JsDocCommentHighlightRules.getTagRule = function (start) {
285
288
  };
286
289
  JsDocCommentHighlightRules.getStartRule = function (start) {
287
290
  return {
288
- token: "comment.doc",
289
- regex: "\\/\\*(?=\\*)",
291
+ token: "comment.doc", // doc comment
292
+ regex: /\/\*\*(?!\/)/,
290
293
  next: start
291
294
  };
292
295
  };
293
296
  JsDocCommentHighlightRules.getEndRule = function (start) {
294
297
  return {
295
- token: "comment.doc",
298
+ token: "comment.doc", // closing comment
296
299
  regex: "\\*\\/",
297
300
  next: start
298
301
  };
@@ -307,7 +310,7 @@ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocC
307
310
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
308
311
  var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
309
312
  var JavaScriptHighlightRules = function (options) {
310
- var keywordMapper = this.createKeywordMapper({
313
+ var keywords = {
311
314
  "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
312
315
  "Namespace|QName|XML|XMLList|" + // E4X
313
316
  "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
@@ -317,9 +320,9 @@ var JavaScriptHighlightRules = function (options) {
317
320
  "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
318
321
  "isNaN|parseFloat|parseInt|" +
319
322
  "JSON|Math|" + // Other
320
- "this|arguments|prototype|window|document",
323
+ "this|arguments|prototype|window|document", // Pseudo
321
324
  "keyword": "const|yield|import|get|set|async|await|" +
322
- "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
325
+ "break|case|catch|continue|default|delete|do|else|finally|for|" +
323
326
  "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
324
327
  "__parent__|__count__|escape|unescape|with|__proto__|" +
325
328
  "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
@@ -327,7 +330,8 @@ var JavaScriptHighlightRules = function (options) {
327
330
  "constant.language": "null|Infinity|NaN|undefined",
328
331
  "support.function": "alert",
329
332
  "constant.language.boolean": "true|false"
330
- }, "identifier");
333
+ };
334
+ var keywordMapper = this.createKeywordMapper(keywords, "identifier");
331
335
  var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
332
336
  var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
333
337
  "u[0-9a-fA-F]{4}|" + // unicode
@@ -336,10 +340,16 @@ var JavaScriptHighlightRules = function (options) {
336
340
  "3[0-7][0-7]?|" + // oct
337
341
  "[4-7][0-7]?|" + //oct
338
342
  ".)";
343
+ var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
344
+ var functionCallStartRule = {
345
+ token: ["identifier", "text", "paren.lparen"],
346
+ regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
347
+ };
339
348
  this.$rules = {
340
349
  "no_regex": [
341
350
  DocCommentHighlightRules.getStartRule("doc-start"),
342
351
  comments("no_regex"),
352
+ functionCallStartRule,
343
353
  {
344
354
  token: "string",
345
355
  regex: "'(?=.)",
@@ -349,58 +359,36 @@ var JavaScriptHighlightRules = function (options) {
349
359
  regex: '"(?=.)',
350
360
  next: "qqstring"
351
361
  }, {
352
- token: "constant.numeric",
362
+ token: "constant.numeric", // hexadecimal, octal and binary
353
363
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
354
364
  }, {
355
- token: "constant.numeric",
365
+ token: "constant.numeric", // decimal integers and floats
356
366
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
357
- }, {
358
- token: [
359
- "storage.type", "punctuation.operator", "support.function",
360
- "punctuation.operator", "entity.name.function", "text", "keyword.operator"
361
- ],
362
- regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
363
- next: "function_arguments"
364
- }, {
365
- token: [
366
- "storage.type", "punctuation.operator", "entity.name.function", "text",
367
- "keyword.operator", "text", "storage.type", "text", "paren.lparen"
368
- ],
369
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
370
- next: "function_arguments"
371
367
  }, {
372
368
  token: [
373
369
  "entity.name.function", "text", "keyword.operator", "text", "storage.type",
374
- "text", "paren.lparen"
375
- ],
376
- regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
377
- next: "function_arguments"
378
- }, {
379
- token: [
380
- "storage.type", "punctuation.operator", "entity.name.function", "text",
381
- "keyword.operator", "text",
382
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
370
+ "text", "storage.type", "text", "paren.lparen"
383
371
  ],
384
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
372
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
385
373
  next: "function_arguments"
386
374
  }, {
387
375
  token: [
388
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
376
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
389
377
  ],
390
- regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
378
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
391
379
  next: "function_arguments"
392
380
  }, {
393
381
  token: [
394
382
  "entity.name.function", "text", "punctuation.operator",
395
- "text", "storage.type", "text", "paren.lparen"
383
+ "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
396
384
  ],
397
- regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
385
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
398
386
  next: "function_arguments"
399
387
  }, {
400
388
  token: [
401
- "text", "text", "storage.type", "text", "paren.lparen"
389
+ "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
402
390
  ],
403
- regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
391
+ regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
404
392
  next: "function_arguments"
405
393
  }, {
406
394
  token: "keyword",
@@ -414,7 +402,7 @@ var JavaScriptHighlightRules = function (options) {
414
402
  regex: /that\b/
415
403
  }, {
416
404
  token: ["storage.type", "punctuation.operator", "support.function.firebug"],
417
- regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
405
+ regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
418
406
  }, {
419
407
  token: keywordMapper,
420
408
  regex: identifierRe
@@ -449,17 +437,27 @@ var JavaScriptHighlightRules = function (options) {
449
437
  property: [{
450
438
  token: "text",
451
439
  regex: "\\s+"
440
+ }, {
441
+ token: "keyword.operator",
442
+ regex: /=/
443
+ }, {
444
+ token: [
445
+ "storage.type", "text", "storage.type", "text", "paren.lparen"
446
+ ],
447
+ regex: anonymousFunctionRe + "(\\s*)(\\()",
448
+ next: "function_arguments"
452
449
  }, {
453
450
  token: [
454
- "storage.type", "punctuation.operator", "entity.name.function", "text",
455
- "keyword.operator", "text",
456
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
451
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
457
452
  ],
458
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
453
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
459
454
  next: "function_arguments"
460
455
  }, {
461
456
  token: "punctuation.operator",
462
457
  regex: /[.](?![.])/
458
+ }, {
459
+ token: "support.function",
460
+ regex: "prototype"
463
461
  }, {
464
462
  token: "support.function",
465
463
  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(?=\()/
@@ -572,10 +570,10 @@ var JavaScriptHighlightRules = function (options) {
572
570
  token: "constant.language",
573
571
  regex: "null|Infinity|NaN|undefined"
574
572
  }, {
575
- token: "constant.numeric",
573
+ token: "constant.numeric", // hexadecimal, octal and binary
576
574
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
577
575
  }, {
578
- token: "constant.numeric",
576
+ token: "constant.numeric", // decimal integers and floats
579
577
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
580
578
  }, {
581
579
  token: "punctuation.operator",
@@ -684,7 +682,7 @@ var JavaScriptHighlightRules = function (options) {
684
682
  regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
685
683
  }, {
686
684
  token: "paren.lparen",
687
- regex: "(\\()(?=.+\\s*=>)",
685
+ regex: "(\\()(?=[^\\(]+\\s*=>)",
688
686
  next: "function_arguments"
689
687
  }, {
690
688
  token: "variable.language",
@@ -742,7 +740,7 @@ function JSX() {
742
740
  value: val.substr(offset)
743
741
  }];
744
742
  },
745
- regex: "</?" + tagRegex + "",
743
+ regex: "</?(?:" + tagRegex + "|(?=>))",
746
744
  next: "jsxAttributes",
747
745
  nextState: "jsx"
748
746
  };
@@ -755,8 +753,7 @@ function JSX() {
755
753
  this.$rules.jsx = [
756
754
  jsxJsRule,
757
755
  jsxTag,
758
- { include: "reference" },
759
- { defaultToken: "string" }
756
+ { include: "reference" }, { defaultToken: "string.xml" }
760
757
  ];
761
758
  this.$rules.jsxAttributes = [{
762
759
  token: "meta.tag.punctuation.tag-close.xml",
@@ -816,7 +813,7 @@ function JSX() {
816
813
  function comments(next) {
817
814
  return [
818
815
  {
819
- token: "comment",
816
+ token: "comment", // multi line comment
820
817
  regex: /\/\*/,
821
818
  next: [
822
819
  DocCommentHighlightRules.getTagRule(),
@@ -1504,111 +1501,398 @@ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1504
1501
 
1505
1502
  });
1506
1503
 
1507
- ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1504
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
1508
1505
  var oop = require("../../lib/oop");
1509
- var Range = require("../../range").Range;
1510
- var BaseFoldMode = require("./fold_mode").FoldMode;
1511
- var FoldMode = exports.FoldMode = function (commentRegex) {
1512
- if (commentRegex) {
1513
- this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1514
- this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1515
- }
1516
- };
1517
- oop.inherits(FoldMode, BaseFoldMode);
1518
- (function () {
1519
- this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1520
- this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1521
- this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
1522
- this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1523
- this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1524
- this._getFoldWidgetBase = this.getFoldWidget;
1525
- this.getFoldWidget = function (session, foldStyle, row) {
1526
- var line = session.getLine(row);
1527
- if (this.singleLineBlockCommentRe.test(line)) {
1528
- if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1529
- return "";
1530
- }
1531
- var fw = this._getFoldWidgetBase(session, foldStyle, row);
1532
- if (!fw && this.startRegionRe.test(line))
1533
- return "start"; // lineCommentRegionStart
1534
- return fw;
1535
- };
1536
- this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1537
- var line = session.getLine(row);
1538
- if (this.startRegionRe.test(line))
1539
- return this.getCommentRegionBlock(session, line, row);
1540
- var match = line.match(this.foldingStartMarker);
1541
- if (match) {
1542
- var i = match.index;
1543
- if (match[1])
1544
- return this.openingBracketBlock(session, match[1], row, i);
1545
- var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1546
- if (range && !range.isMultiLine()) {
1547
- if (forceMultiline) {
1548
- range = this.getSectionRange(session, row);
1549
- }
1550
- else if (foldStyle != "all")
1551
- range = null;
1506
+ var Behaviour = require("../behaviour").Behaviour;
1507
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1508
+ function is(token, type) {
1509
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
1510
+ }
1511
+ var XmlBehaviour = function () {
1512
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1513
+ if (text == '"' || text == "'") {
1514
+ var quote = text;
1515
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
1516
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1517
+ return {
1518
+ text: quote + selected + quote,
1519
+ selection: false
1520
+ };
1521
+ }
1522
+ var cursor = editor.getCursorPosition();
1523
+ var line = session.doc.getLine(cursor.row);
1524
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1525
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1526
+ var token = iterator.getCurrentToken();
1527
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1528
+ return {
1529
+ text: "",
1530
+ selection: [1, 1]
1531
+ };
1532
+ }
1533
+ if (!token)
1534
+ token = iterator.stepBackward();
1535
+ if (!token)
1536
+ return;
1537
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1538
+ token = iterator.stepBackward();
1539
+ }
1540
+ var rightSpace = !rightChar || rightChar.match(/\s/);
1541
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1542
+ return {
1543
+ text: quote + quote,
1544
+ selection: [1, 1]
1545
+ };
1552
1546
  }
1553
- return range;
1554
1547
  }
1555
- if (foldStyle === "markbegin")
1556
- return;
1557
- var match = line.match(this.foldingStopMarker);
1558
- if (match) {
1559
- var i = match.index + match[0].length;
1560
- if (match[1])
1561
- return this.closingBracketBlock(session, match[1], row, i);
1562
- return session.getCommentFoldRange(row, i, -1);
1548
+ });
1549
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
1550
+ var selected = session.doc.getTextRange(range);
1551
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1552
+ var line = session.doc.getLine(range.start.row);
1553
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1554
+ if (rightChar == selected) {
1555
+ range.end.column++;
1556
+ return range;
1557
+ }
1563
1558
  }
1564
- };
1565
- this.getSectionRange = function (session, row) {
1566
- var line = session.getLine(row);
1567
- var startIndent = line.search(/\S/);
1568
- var startRow = row;
1569
- var startColumn = line.length;
1570
- row = row + 1;
1571
- var endRow = row;
1572
- var maxRow = session.getLength();
1573
- while (++row < maxRow) {
1574
- line = session.getLine(row);
1575
- var indent = line.search(/\S/);
1576
- if (indent === -1)
1577
- continue;
1578
- if (startIndent > indent)
1579
- break;
1580
- var subRange = this.getFoldWidgetRange(session, "all", row);
1581
- if (subRange) {
1582
- if (subRange.start.row <= startRow) {
1559
+ });
1560
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1561
+ if (text == '>') {
1562
+ var position = editor.getSelectionRange().start;
1563
+ var iterator = new TokenIterator(session, position.row, position.column);
1564
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1565
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1566
+ return;
1567
+ if (is(token, "reference.attribute-value"))
1568
+ return;
1569
+ if (is(token, "attribute-value")) {
1570
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
1571
+ if (position.column < tokenEndColumn)
1572
+ return;
1573
+ if (position.column == tokenEndColumn) {
1574
+ var nextToken = iterator.stepForward();
1575
+ if (nextToken && is(nextToken, "attribute-value"))
1576
+ return;
1577
+ iterator.stepBackward();
1578
+ }
1579
+ }
1580
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1581
+ return;
1582
+ while (!is(token, "tag-name")) {
1583
+ token = iterator.stepBackward();
1584
+ if (token.value == "<") {
1585
+ token = iterator.stepForward();
1583
1586
  break;
1584
1587
  }
1585
- else if (subRange.isMultiLine()) {
1586
- row = subRange.end.row;
1588
+ }
1589
+ var tokenRow = iterator.getCurrentTokenRow();
1590
+ var tokenColumn = iterator.getCurrentTokenColumn();
1591
+ if (is(iterator.stepBackward(), "end-tag-open"))
1592
+ return;
1593
+ var element = token.value;
1594
+ if (tokenRow == position.row)
1595
+ element = element.substring(0, position.column - tokenColumn);
1596
+ if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
1597
+ return;
1598
+ return {
1599
+ text: ">" + "</" + element + ">",
1600
+ selection: [1, 1]
1601
+ };
1602
+ }
1603
+ });
1604
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1605
+ if (text == "\n") {
1606
+ var cursor = editor.getCursorPosition();
1607
+ var line = session.getLine(cursor.row);
1608
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1609
+ var token = iterator.getCurrentToken();
1610
+ if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
1611
+ if (token.value == "/>")
1612
+ return;
1613
+ while (token && token.type.indexOf("tag-name") === -1) {
1614
+ token = iterator.stepBackward();
1587
1615
  }
1588
- else if (startIndent == indent) {
1589
- break;
1616
+ if (!token) {
1617
+ return;
1618
+ }
1619
+ var tag = token.value;
1620
+ var row = iterator.getCurrentTokenRow();
1621
+ token = iterator.stepBackward();
1622
+ if (!token || token.type.indexOf("end-tag") !== -1) {
1623
+ return;
1624
+ }
1625
+ if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
1626
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1627
+ var line = session.getLine(row);
1628
+ var nextIndent = this.$getIndent(line);
1629
+ var indent = nextIndent + session.getTabString();
1630
+ if (nextToken && nextToken.value === "</") {
1631
+ return {
1632
+ text: "\n" + indent + "\n" + nextIndent,
1633
+ selection: [1, indent.length, 1, indent.length]
1634
+ };
1635
+ }
1636
+ else {
1637
+ return {
1638
+ text: "\n" + indent
1639
+ };
1640
+ }
1590
1641
  }
1591
1642
  }
1592
- endRow = row;
1593
1643
  }
1594
- return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1595
- };
1596
- this.getCommentRegionBlock = function (session, line, row) {
1597
- var startColumn = line.search(/\s*$/);
1598
- var maxRow = session.getLength();
1599
- var startRow = row;
1600
- var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1601
- var depth = 1;
1602
- while (++row < maxRow) {
1603
- line = session.getLine(row);
1604
- var m = re.exec(line);
1605
- if (!m)
1606
- continue;
1607
- if (m[1])
1608
- depth--;
1609
- else
1610
- depth++;
1611
- if (!depth)
1644
+ });
1645
+ };
1646
+ oop.inherits(XmlBehaviour, Behaviour);
1647
+ exports.XmlBehaviour = XmlBehaviour;
1648
+
1649
+ });
1650
+
1651
+ 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";
1652
+ var oop = require("../../lib/oop");
1653
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1654
+ var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
1655
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
1656
+ var JavaScriptBehaviour = function () {
1657
+ var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
1658
+ this.addBehaviours(xmlBehaviours);
1659
+ this.inherit(CstyleBehaviour);
1660
+ this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
1661
+ if (text == '>') {
1662
+ var position = editor.getSelectionRange().start;
1663
+ var iterator = new TokenIterator(session, position.row, position.column);
1664
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1665
+ if (!token)
1666
+ return;
1667
+ if (token.value == '<') {
1668
+ return {
1669
+ text: "></>",
1670
+ selection: [1, 1]
1671
+ };
1672
+ }
1673
+ }
1674
+ });
1675
+ };
1676
+ oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
1677
+ exports.JavaScriptBehaviour = JavaScriptBehaviour;
1678
+
1679
+ });
1680
+
1681
+ 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";
1682
+ var oop = require("../../lib/oop");
1683
+ var Range = require("../../range").Range;
1684
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1685
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1686
+ BaseFoldMode.call(this);
1687
+ this.voidElements = voidElements || {};
1688
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1689
+ if (optionalEndTags)
1690
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1691
+ };
1692
+ oop.inherits(FoldMode, BaseFoldMode);
1693
+ var Tag = function () {
1694
+ this.tagName = "";
1695
+ this.closing = false;
1696
+ this.selfClosing = false;
1697
+ this.start = { row: 0, column: 0 };
1698
+ this.end = { row: 0, column: 0 };
1699
+ };
1700
+ function is(token, type) {
1701
+ return token.type.lastIndexOf(type + ".xml") > -1;
1702
+ }
1703
+ (function () {
1704
+ this.getFoldWidget = function (session, foldStyle, row) {
1705
+ var tag = this._getFirstTagInLine(session, row);
1706
+ if (!tag)
1707
+ return this.getCommentFoldWidget(session, row);
1708
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1709
+ return foldStyle === "markbeginend" ? "end" : "";
1710
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1711
+ return "";
1712
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1713
+ return "";
1714
+ return "start";
1715
+ };
1716
+ this.getCommentFoldWidget = function (session, row) {
1717
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1718
+ return "start";
1719
+ return "";
1720
+ };
1721
+ this._getFirstTagInLine = function (session, row) {
1722
+ var tokens = session.getTokens(row);
1723
+ var tag = new Tag();
1724
+ for (var i = 0; i < tokens.length; i++) {
1725
+ var token = tokens[i];
1726
+ if (is(token, "tag-open")) {
1727
+ tag.end.column = tag.start.column + token.value.length;
1728
+ tag.closing = is(token, "end-tag-open");
1729
+ token = tokens[++i];
1730
+ if (!token)
1731
+ return null;
1732
+ tag.tagName = token.value;
1733
+ if (token.value === "") { //skip empty tag name token for fragment
1734
+ token = tokens[++i];
1735
+ if (!token)
1736
+ return null;
1737
+ tag.tagName = token.value;
1738
+ }
1739
+ tag.end.column += token.value.length;
1740
+ for (i++; i < tokens.length; i++) {
1741
+ token = tokens[i];
1742
+ tag.end.column += token.value.length;
1743
+ if (is(token, "tag-close")) {
1744
+ tag.selfClosing = token.value == '/>';
1745
+ break;
1746
+ }
1747
+ }
1748
+ return tag;
1749
+ }
1750
+ else if (is(token, "tag-close")) {
1751
+ tag.selfClosing = token.value == '/>';
1752
+ return tag;
1753
+ }
1754
+ tag.start.column += token.value.length;
1755
+ }
1756
+ return null;
1757
+ };
1758
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
1759
+ var tokens = session.getTokens(row);
1760
+ var column = 0;
1761
+ for (var i = 0; i < tokens.length; i++) {
1762
+ var token = tokens[i];
1763
+ column += token.value.length;
1764
+ if (column < startColumn - 1)
1765
+ continue;
1766
+ if (is(token, "end-tag-open")) {
1767
+ token = tokens[i + 1];
1768
+ if (is(token, "tag-name") && token.value === "") {
1769
+ token = tokens[i + 2];
1770
+ }
1771
+ if (token && token.value == tagName)
1772
+ return true;
1773
+ }
1774
+ }
1775
+ return false;
1776
+ };
1777
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1778
+ var firstTag = this._getFirstTagInLine(session, row);
1779
+ if (!firstTag) {
1780
+ return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
1781
+ }
1782
+ var tags = session.getMatchingTags({ row: row, column: 0 });
1783
+ if (tags) {
1784
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
1785
+ }
1786
+ };
1787
+ }).call(FoldMode.prototype);
1788
+
1789
+ });
1790
+
1791
+ ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1792
+ var oop = require("../../lib/oop");
1793
+ var Range = require("../../range").Range;
1794
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1795
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1796
+ if (commentRegex) {
1797
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1798
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1799
+ }
1800
+ };
1801
+ oop.inherits(FoldMode, BaseFoldMode);
1802
+ (function () {
1803
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1804
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1805
+ this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
1806
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1807
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1808
+ this._getFoldWidgetBase = this.getFoldWidget;
1809
+ this.getFoldWidget = function (session, foldStyle, row) {
1810
+ var line = session.getLine(row);
1811
+ if (this.singleLineBlockCommentRe.test(line)) {
1812
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1813
+ return "";
1814
+ }
1815
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
1816
+ if (!fw && this.startRegionRe.test(line))
1817
+ return "start"; // lineCommentRegionStart
1818
+ return fw;
1819
+ };
1820
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1821
+ var line = session.getLine(row);
1822
+ if (this.startRegionRe.test(line))
1823
+ return this.getCommentRegionBlock(session, line, row);
1824
+ var match = line.match(this.foldingStartMarker);
1825
+ if (match) {
1826
+ var i = match.index;
1827
+ if (match[1])
1828
+ return this.openingBracketBlock(session, match[1], row, i);
1829
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1830
+ if (range && !range.isMultiLine()) {
1831
+ if (forceMultiline) {
1832
+ range = this.getSectionRange(session, row);
1833
+ }
1834
+ else if (foldStyle != "all")
1835
+ range = null;
1836
+ }
1837
+ return range;
1838
+ }
1839
+ if (foldStyle === "markbegin")
1840
+ return;
1841
+ var match = line.match(this.foldingStopMarker);
1842
+ if (match) {
1843
+ var i = match.index + match[0].length;
1844
+ if (match[1])
1845
+ return this.closingBracketBlock(session, match[1], row, i);
1846
+ return session.getCommentFoldRange(row, i, -1);
1847
+ }
1848
+ };
1849
+ this.getSectionRange = function (session, row) {
1850
+ var line = session.getLine(row);
1851
+ var startIndent = line.search(/\S/);
1852
+ var startRow = row;
1853
+ var startColumn = line.length;
1854
+ row = row + 1;
1855
+ var endRow = row;
1856
+ var maxRow = session.getLength();
1857
+ while (++row < maxRow) {
1858
+ line = session.getLine(row);
1859
+ var indent = line.search(/\S/);
1860
+ if (indent === -1)
1861
+ continue;
1862
+ if (startIndent > indent)
1863
+ break;
1864
+ var subRange = this.getFoldWidgetRange(session, "all", row);
1865
+ if (subRange) {
1866
+ if (subRange.start.row <= startRow) {
1867
+ break;
1868
+ }
1869
+ else if (subRange.isMultiLine()) {
1870
+ row = subRange.end.row;
1871
+ }
1872
+ else if (startIndent == indent) {
1873
+ break;
1874
+ }
1875
+ }
1876
+ endRow = row;
1877
+ }
1878
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1879
+ };
1880
+ this.getCommentRegionBlock = function (session, line, row) {
1881
+ var startColumn = line.search(/\s*$/);
1882
+ var maxRow = session.getLength();
1883
+ var startRow = row;
1884
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1885
+ var depth = 1;
1886
+ while (++row < maxRow) {
1887
+ line = session.getLine(row);
1888
+ var m = re.exec(line);
1889
+ if (!m)
1890
+ continue;
1891
+ if (m[1])
1892
+ depth--;
1893
+ else
1894
+ depth++;
1895
+ if (!depth)
1612
1896
  break;
1613
1897
  }
1614
1898
  var endRow = row;
@@ -1620,19 +1904,51 @@ oop.inherits(FoldMode, BaseFoldMode);
1620
1904
 
1621
1905
  });
1622
1906
 
1623
- 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";
1907
+ 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";
1908
+ var oop = require("../../lib/oop");
1909
+ var XmlFoldMode = require("./xml").FoldMode;
1910
+ var CFoldMode = require("./cstyle").FoldMode;
1911
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1912
+ if (commentRegex) {
1913
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1914
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1915
+ }
1916
+ this.xmlFoldMode = new XmlFoldMode();
1917
+ };
1918
+ oop.inherits(FoldMode, CFoldMode);
1919
+ (function () {
1920
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
1921
+ this.getFoldWidgetBase = this.getFoldWidget;
1922
+ this.getFoldWidget = function (session, foldStyle, row) {
1923
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
1924
+ if (!fw) {
1925
+ return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
1926
+ }
1927
+ return fw;
1928
+ };
1929
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1930
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
1931
+ if (range)
1932
+ return range;
1933
+ return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
1934
+ };
1935
+ }).call(FoldMode.prototype);
1936
+
1937
+ });
1938
+
1939
+ 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";
1624
1940
  var oop = require("../lib/oop");
1625
1941
  var TextMode = require("./text").Mode;
1626
1942
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1627
1943
  var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1628
1944
  var WorkerClient = require("../worker/worker_client").WorkerClient;
1629
- var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1630
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1945
+ var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
1946
+ var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
1631
1947
  var Mode = function () {
1632
1948
  this.HighlightRules = JavaScriptHighlightRules;
1633
1949
  this.$outdent = new MatchingBraceOutdent();
1634
- this.$behaviour = new CstyleBehaviour();
1635
- this.foldingRules = new CStyleFoldMode();
1950
+ this.$behaviour = new JavaScriptBehaviour();
1951
+ this.foldingRules = new JavaScriptFoldMode();
1636
1952
  };
1637
1953
  oop.inherits(Mode, TextMode);
1638
1954
  (function () {
@@ -1660,13 +1976,6 @@ oop.inherits(Mode, TextMode);
1660
1976
  if (endState == "start" || endState == "no_regex") {
1661
1977
  return "";
1662
1978
  }
1663
- var match = line.match(/^\s*(\/?)\*/);
1664
- if (match) {
1665
- if (match[1]) {
1666
- indent += " ";
1667
- }
1668
- indent += "* ";
1669
- }
1670
1979
  }
1671
1980
  return indent;
1672
1981
  };
@@ -1992,154 +2301,6 @@ exports.Mode = Mode;
1992
2301
 
1993
2302
  });
1994
2303
 
1995
- 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";
1996
- var oop = require("../../lib/oop");
1997
- var Behaviour = require("../behaviour").Behaviour;
1998
- var TokenIterator = require("../../token_iterator").TokenIterator;
1999
- var lang = require("../../lib/lang");
2000
- function is(token, type) {
2001
- return token && token.type.lastIndexOf(type + ".xml") > -1;
2002
- }
2003
- var XmlBehaviour = function () {
2004
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
2005
- if (text == '"' || text == "'") {
2006
- var quote = text;
2007
- var selected = session.doc.getTextRange(editor.getSelectionRange());
2008
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
2009
- return {
2010
- text: quote + selected + quote,
2011
- selection: false
2012
- };
2013
- }
2014
- var cursor = editor.getCursorPosition();
2015
- var line = session.doc.getLine(cursor.row);
2016
- var rightChar = line.substring(cursor.column, cursor.column + 1);
2017
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
2018
- var token = iterator.getCurrentToken();
2019
- if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
2020
- return {
2021
- text: "",
2022
- selection: [1, 1]
2023
- };
2024
- }
2025
- if (!token)
2026
- token = iterator.stepBackward();
2027
- if (!token)
2028
- return;
2029
- while (is(token, "tag-whitespace") || is(token, "whitespace")) {
2030
- token = iterator.stepBackward();
2031
- }
2032
- var rightSpace = !rightChar || rightChar.match(/\s/);
2033
- if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
2034
- return {
2035
- text: quote + quote,
2036
- selection: [1, 1]
2037
- };
2038
- }
2039
- }
2040
- });
2041
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
2042
- var selected = session.doc.getTextRange(range);
2043
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
2044
- var line = session.doc.getLine(range.start.row);
2045
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
2046
- if (rightChar == selected) {
2047
- range.end.column++;
2048
- return range;
2049
- }
2050
- }
2051
- });
2052
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
2053
- if (text == '>') {
2054
- var position = editor.getSelectionRange().start;
2055
- var iterator = new TokenIterator(session, position.row, position.column);
2056
- var token = iterator.getCurrentToken() || iterator.stepBackward();
2057
- if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
2058
- return;
2059
- if (is(token, "reference.attribute-value"))
2060
- return;
2061
- if (is(token, "attribute-value")) {
2062
- var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
2063
- if (position.column < tokenEndColumn)
2064
- return;
2065
- if (position.column == tokenEndColumn) {
2066
- var nextToken = iterator.stepForward();
2067
- if (nextToken && is(nextToken, "attribute-value"))
2068
- return;
2069
- iterator.stepBackward();
2070
- }
2071
- }
2072
- if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
2073
- return;
2074
- while (!is(token, "tag-name")) {
2075
- token = iterator.stepBackward();
2076
- if (token.value == "<") {
2077
- token = iterator.stepForward();
2078
- break;
2079
- }
2080
- }
2081
- var tokenRow = iterator.getCurrentTokenRow();
2082
- var tokenColumn = iterator.getCurrentTokenColumn();
2083
- if (is(iterator.stepBackward(), "end-tag-open"))
2084
- return;
2085
- var element = token.value;
2086
- if (tokenRow == position.row)
2087
- element = element.substring(0, position.column - tokenColumn);
2088
- if (this.voidElements.hasOwnProperty(element.toLowerCase()))
2089
- return;
2090
- return {
2091
- text: ">" + "</" + element + ">",
2092
- selection: [1, 1]
2093
- };
2094
- }
2095
- });
2096
- this.add("autoindent", "insertion", function (state, action, editor, session, text) {
2097
- if (text == "\n") {
2098
- var cursor = editor.getCursorPosition();
2099
- var line = session.getLine(cursor.row);
2100
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
2101
- var token = iterator.getCurrentToken();
2102
- if (token && token.type.indexOf("tag-close") !== -1) {
2103
- if (token.value == "/>")
2104
- return;
2105
- while (token && token.type.indexOf("tag-name") === -1) {
2106
- token = iterator.stepBackward();
2107
- }
2108
- if (!token) {
2109
- return;
2110
- }
2111
- var tag = token.value;
2112
- var row = iterator.getCurrentTokenRow();
2113
- token = iterator.stepBackward();
2114
- if (!token || token.type.indexOf("end-tag") !== -1) {
2115
- return;
2116
- }
2117
- if (this.voidElements && !this.voidElements[tag]) {
2118
- var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
2119
- var line = session.getLine(row);
2120
- var nextIndent = this.$getIndent(line);
2121
- var indent = nextIndent + session.getTabString();
2122
- if (nextToken && nextToken.value === "</") {
2123
- return {
2124
- text: "\n" + indent + "\n" + nextIndent,
2125
- selection: [1, indent.length, 1, indent.length]
2126
- };
2127
- }
2128
- else {
2129
- return {
2130
- text: "\n" + indent
2131
- };
2132
- }
2133
- }
2134
- }
2135
- }
2136
- });
2137
- };
2138
- oop.inherits(XmlBehaviour, Behaviour);
2139
- exports.XmlBehaviour = XmlBehaviour;
2140
-
2141
- });
2142
-
2143
2304
  ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
2144
2305
  var oop = require("../../lib/oop");
2145
2306
  var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2179,107 +2340,6 @@ oop.inherits(FoldMode, BaseFoldMode);
2179
2340
 
2180
2341
  });
2181
2342
 
2182
- 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";
2183
- var oop = require("../../lib/oop");
2184
- var Range = require("../../range").Range;
2185
- var BaseFoldMode = require("./fold_mode").FoldMode;
2186
- var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
2187
- BaseFoldMode.call(this);
2188
- this.voidElements = voidElements || {};
2189
- this.optionalEndTags = oop.mixin({}, this.voidElements);
2190
- if (optionalEndTags)
2191
- oop.mixin(this.optionalEndTags, optionalEndTags);
2192
- };
2193
- oop.inherits(FoldMode, BaseFoldMode);
2194
- var Tag = function () {
2195
- this.tagName = "";
2196
- this.closing = false;
2197
- this.selfClosing = false;
2198
- this.start = { row: 0, column: 0 };
2199
- this.end = { row: 0, column: 0 };
2200
- };
2201
- function is(token, type) {
2202
- return token.type.lastIndexOf(type + ".xml") > -1;
2203
- }
2204
- (function () {
2205
- this.getFoldWidget = function (session, foldStyle, row) {
2206
- var tag = this._getFirstTagInLine(session, row);
2207
- if (!tag)
2208
- return this.getCommentFoldWidget(session, row);
2209
- if (tag.closing || (!tag.tagName && tag.selfClosing))
2210
- return foldStyle === "markbeginend" ? "end" : "";
2211
- if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
2212
- return "";
2213
- if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
2214
- return "";
2215
- return "start";
2216
- };
2217
- this.getCommentFoldWidget = function (session, row) {
2218
- if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
2219
- return "start";
2220
- return "";
2221
- };
2222
- this._getFirstTagInLine = function (session, row) {
2223
- var tokens = session.getTokens(row);
2224
- var tag = new Tag();
2225
- for (var i = 0; i < tokens.length; i++) {
2226
- var token = tokens[i];
2227
- if (is(token, "tag-open")) {
2228
- tag.end.column = tag.start.column + token.value.length;
2229
- tag.closing = is(token, "end-tag-open");
2230
- token = tokens[++i];
2231
- if (!token)
2232
- return null;
2233
- tag.tagName = token.value;
2234
- tag.end.column += token.value.length;
2235
- for (i++; i < tokens.length; i++) {
2236
- token = tokens[i];
2237
- tag.end.column += token.value.length;
2238
- if (is(token, "tag-close")) {
2239
- tag.selfClosing = token.value == '/>';
2240
- break;
2241
- }
2242
- }
2243
- return tag;
2244
- }
2245
- else if (is(token, "tag-close")) {
2246
- tag.selfClosing = token.value == '/>';
2247
- return tag;
2248
- }
2249
- tag.start.column += token.value.length;
2250
- }
2251
- return null;
2252
- };
2253
- this._findEndTagInLine = function (session, row, tagName, startColumn) {
2254
- var tokens = session.getTokens(row);
2255
- var column = 0;
2256
- for (var i = 0; i < tokens.length; i++) {
2257
- var token = tokens[i];
2258
- column += token.value.length;
2259
- if (column < startColumn)
2260
- continue;
2261
- if (is(token, "end-tag-open")) {
2262
- token = tokens[i + 1];
2263
- if (token && token.value == tagName)
2264
- return true;
2265
- }
2266
- }
2267
- return false;
2268
- };
2269
- this.getFoldWidgetRange = function (session, foldStyle, row) {
2270
- var tags = session.getMatchingTags({ row: row, column: 0 });
2271
- if (tags) {
2272
- return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
2273
- }
2274
- else {
2275
- return this.getCommentFoldWidget(session, row)
2276
- && session.getCommentFoldRange(row, session.getLine(row).length);
2277
- }
2278
- };
2279
- }).call(FoldMode.prototype);
2280
-
2281
- });
2282
-
2283
2343
  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";
2284
2344
  var oop = require("../../lib/oop");
2285
2345
  var MixedFoldMode = require("./mixed").FoldMode;