@openui5/sap.ui.codeeditor 1.120.6 → 1.121.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 (457) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +2 -2
  4. package/src/sap/ui/codeeditor/.library +2 -2
  5. package/src/sap/ui/codeeditor/CodeEditor.js +41 -27
  6. package/src/sap/ui/codeeditor/js/ace/ace.js +16262 -16597
  7. package/src/sap/ui/codeeditor/js/ace/css/ace.css +358 -86
  8. package/src/sap/ui/codeeditor/js/ace/css/ambiance-3.png +0 -0
  9. package/src/sap/ui/codeeditor/js/ace/css/chrome-2.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-1.png +0 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-2.png +0 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-1.png +0 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-2.png +0 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-1.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-2.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/clouds-2.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/clouds_midnight-2.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/cobalt-2.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/crimson_editor-2.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/dawn-2.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/dracula-2.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/dreamweaver-2.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/eclipse-2.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/github-2.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/github_dark-1.png +0 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/github_dark-2.png +0 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/gob-2.png +0 -0
  28. package/src/sap/ui/codeeditor/js/ace/css/gruvbox-2.png +0 -0
  29. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_dark_hard-1.png +0 -0
  30. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-1.png +0 -0
  31. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-2.png +0 -0
  32. package/src/sap/ui/codeeditor/js/ace/css/idle_fingers-2.png +0 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/iplastic-3.png +0 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-1.png +0 -0
  35. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-2.png +0 -0
  36. package/src/sap/ui/codeeditor/js/ace/css/kr_theme-2.png +0 -0
  37. package/src/sap/ui/codeeditor/js/ace/css/kuroir-1.png +0 -0
  38. package/src/sap/ui/codeeditor/js/ace/css/kuroir-2.png +0 -0
  39. package/src/sap/ui/codeeditor/js/ace/css/main-10.png +0 -0
  40. package/src/sap/ui/codeeditor/js/ace/css/main-11.png +0 -0
  41. package/src/sap/ui/codeeditor/js/ace/css/main-12.png +0 -0
  42. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  43. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  44. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  45. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  46. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  47. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  48. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  49. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  50. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  51. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  52. package/src/sap/ui/codeeditor/js/ace/css/main-22.svg +1 -0
  53. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  54. package/src/sap/ui/codeeditor/js/ace/css/main-5.svg +7 -0
  55. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +7 -0
  56. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +9 -0
  57. package/src/sap/ui/codeeditor/js/ace/css/main-8.png +0 -0
  58. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +4 -0
  59. package/src/sap/ui/codeeditor/js/ace/css/main-9.png +0 -0
  60. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +4 -0
  61. package/src/sap/ui/codeeditor/js/ace/css/merbivore-2.png +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/css/merbivore_soft-2.png +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/css/mono_industrial-2.png +0 -0
  64. package/src/sap/ui/codeeditor/js/ace/css/monokai-2.png +0 -0
  65. package/src/sap/ui/codeeditor/js/ace/css/one_dark-2.png +0 -0
  66. package/src/sap/ui/codeeditor/js/ace/css/pastel_on_dark-2.png +0 -0
  67. package/src/sap/ui/codeeditor/js/ace/css/solarized_dark-2.png +0 -0
  68. package/src/sap/ui/codeeditor/js/ace/css/solarized_light-2.png +0 -0
  69. package/src/sap/ui/codeeditor/js/ace/css/sqlserver-2.png +0 -0
  70. package/src/sap/ui/codeeditor/js/ace/css/terminal-2.png +0 -0
  71. package/src/sap/ui/codeeditor/js/ace/css/textmate-2.png +0 -0
  72. package/src/sap/ui/codeeditor/js/ace/css/theme/ambiance.css +120 -68
  73. package/src/sap/ui/codeeditor/js/ace/css/theme/chaos.css +79 -66
  74. package/src/sap/ui/codeeditor/js/ace/css/theme/chrome.css +82 -43
  75. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_day.css +160 -0
  76. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night.css +146 -0
  77. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night_low_color.css +134 -0
  78. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds.css +59 -31
  79. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds_midnight.css +60 -32
  80. package/src/sap/ui/codeeditor/js/ace/css/theme/cobalt.css +71 -38
  81. package/src/sap/ui/codeeditor/js/ace/css/theme/crimson_editor.css +79 -42
  82. package/src/sap/ui/codeeditor/js/ace/css/theme/dawn.css +70 -40
  83. package/src/sap/ui/codeeditor/js/ace/css/theme/dracula.css +95 -49
  84. package/src/sap/ui/codeeditor/js/ace/css/theme/dreamweaver.css +95 -49
  85. package/src/sap/ui/codeeditor/js/ace/css/theme/eclipse.css +62 -33
  86. package/src/sap/ui/codeeditor/js/ace/css/theme/github.css +71 -38
  87. package/src/sap/ui/codeeditor/js/ace/css/theme/github_dark.css +134 -0
  88. package/src/sap/ui/codeeditor/js/ace/css/theme/gob.css +68 -38
  89. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox.css +54 -28
  90. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_dark_hard.css +163 -0
  91. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_light_hard.css +167 -0
  92. package/src/sap/ui/codeeditor/js/ace/css/theme/idle_fingers.css +62 -34
  93. package/src/sap/ui/codeeditor/js/ace/css/theme/iplastic.css +76 -45
  94. package/src/sap/ui/codeeditor/js/ace/css/theme/katzenmilch.css +91 -53
  95. package/src/sap/ui/codeeditor/js/ace/css/theme/kr_theme.css +67 -36
  96. package/src/sap/ui/codeeditor/js/ace/css/theme/kuroir.css +43 -17
  97. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore.css +57 -31
  98. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore_soft.css +57 -31
  99. package/src/sap/ui/codeeditor/js/ace/css/theme/mono_industrial.css +66 -36
  100. package/src/sap/ui/codeeditor/js/ace/css/theme/monokai.css +63 -35
  101. package/src/sap/ui/codeeditor/js/ace/css/theme/nord_dark.css +55 -29
  102. package/src/sap/ui/codeeditor/js/ace/css/theme/one_dark.css +88 -47
  103. package/src/sap/ui/codeeditor/js/ace/css/theme/pastel_on_dark.css +70 -38
  104. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +52 -28
  105. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_light.css +55 -29
  106. package/src/sap/ui/codeeditor/js/ace/css/theme/sqlserver.css +90 -48
  107. package/src/sap/ui/codeeditor/js/ace/css/theme/terminal.css +64 -34
  108. package/src/sap/ui/codeeditor/js/ace/css/theme/textmate.css +82 -43
  109. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow.css +61 -33
  110. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night.css +61 -33
  111. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_blue.css +59 -32
  112. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_bright.css +71 -40
  113. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_eighties.css +61 -33
  114. package/src/sap/ui/codeeditor/js/ace/css/theme/twilight.css +66 -36
  115. package/src/sap/ui/codeeditor/js/ace/css/theme/vibrant_ink.css +59 -32
  116. package/src/sap/ui/codeeditor/js/ace/css/theme/xcode.css +54 -28
  117. package/src/sap/ui/codeeditor/js/ace/css/tomorrow-2.png +0 -0
  118. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night-2.png +0 -0
  119. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_blue-2.png +0 -0
  120. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_bright-2.png +0 -0
  121. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_eighties-2.png +0 -0
  122. package/src/sap/ui/codeeditor/js/ace/css/twilight-2.png +0 -0
  123. package/src/sap/ui/codeeditor/js/ace/css/vibrant_ink-2.png +0 -0
  124. package/src/sap/ui/codeeditor/js/ace/css/xcode-2.png +0 -0
  125. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +90 -91
  126. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +39 -75
  127. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +457 -0
  128. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +47 -97
  129. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +496 -552
  130. package/src/sap/ui/codeeditor/js/ace/ext-hardwrap.js +47 -16
  131. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +3269 -0
  132. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +45 -105
  133. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +1438 -1128
  134. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +8 -16
  135. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +198 -185
  136. package/src/sap/ui/codeeditor/js/ace/ext-options.js +405 -443
  137. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +1682 -1508
  138. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +26 -28
  139. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +160 -332
  140. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +409 -446
  141. package/src/sap/ui/codeeditor/js/ace/ext-simple_tokenizer.js +45 -0
  142. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +4 -10
  143. package/src/sap/ui/codeeditor/js/ace/ext-split.js +41 -63
  144. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +19 -27
  145. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +45 -41
  146. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +62 -83
  147. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +442 -551
  148. package/src/sap/ui/codeeditor/js/ace/keybinding-sublime.js +338 -351
  149. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +5242 -4758
  150. package/src/sap/ui/codeeditor/js/ace/keybinding-vscode.js +228 -235
  151. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +72 -93
  152. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +136 -164
  153. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +109 -150
  154. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +45 -74
  155. package/src/sap/ui/codeeditor/js/ace/mode-alda.js +77 -109
  156. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +196 -241
  157. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +192 -247
  158. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +56 -102
  159. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +85 -95
  160. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +120 -158
  161. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +233 -298
  162. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +78 -101
  163. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +2414 -0
  164. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +80 -116
  165. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +74 -105
  166. package/src/sap/ui/codeeditor/js/ace/mode-bibtex.js +318 -0
  167. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +72 -115
  168. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +171 -257
  169. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +97 -115
  170. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +126 -119
  171. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +48 -67
  172. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +203 -268
  173. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +1029 -1276
  174. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +337 -393
  175. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +127 -216
  176. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +1539 -1569
  177. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +786 -898
  178. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +184 -237
  179. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +37 -37
  180. package/src/sap/ui/codeeditor/js/ace/mode-css.js +293 -384
  181. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +1019 -1262
  182. package/src/sap/ui/codeeditor/js/ace/mode-cuttlefish.js +56 -0
  183. package/src/sap/ui/codeeditor/js/ace/mode-d.js +163 -233
  184. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +330 -427
  185. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +20 -38
  186. package/src/sap/ui/codeeditor/js/ace/mode-django.js +1032 -1271
  187. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +211 -284
  188. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +131 -200
  189. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +408 -349
  190. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +89 -125
  191. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +47 -62
  192. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +1350 -1666
  193. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +349 -407
  194. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +136 -168
  195. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +707 -881
  196. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +164 -0
  197. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +128 -172
  198. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +177 -246
  199. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +92 -131
  200. package/src/sap/ui/codeeditor/js/ace/mode-fsl.js +91 -124
  201. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +813 -748
  202. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +52 -71
  203. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +105 -119
  204. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +12 -22
  205. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +184 -289
  206. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +686 -623
  207. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +167 -239
  208. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +48 -88
  209. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +577 -471
  210. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +1062 -1026
  211. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +1061 -1305
  212. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +199 -255
  213. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +81 -87
  214. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +111 -184
  215. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +164 -199
  216. package/src/sap/ui/codeeditor/js/ace/mode-html.js +1009 -1239
  217. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +1402 -1705
  218. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +1390 -1706
  219. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +58 -82
  220. package/src/sap/ui/codeeditor/js/ace/mode-io.js +85 -123
  221. package/src/sap/ui/codeeditor/js/ace/mode-ion.js +477 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +109 -162
  223. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +1339 -1344
  224. package/src/sap/ui/codeeditor/js/ace/mode-java.js +710 -498
  225. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +441 -354
  226. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +270 -0
  227. package/src/sap/ui/codeeditor/js/ace/mode-json.js +93 -147
  228. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +128 -180
  229. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +58 -112
  230. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +1045 -865
  231. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +158 -190
  232. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +121 -194
  233. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +128 -177
  234. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +262 -614
  235. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +94 -138
  236. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +1120 -1366
  237. package/src/sap/ui/codeeditor/js/ace/mode-less.js +342 -442
  238. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +1353 -1414
  239. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +65 -73
  240. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +217 -224
  241. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +97 -142
  242. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +187 -227
  243. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +99 -155
  244. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +152 -211
  245. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +1167 -1470
  246. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +25 -34
  247. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +244 -282
  248. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +1858 -2177
  249. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +964 -1007
  250. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +197 -221
  251. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +127 -163
  252. package/src/sap/ui/codeeditor/js/ace/mode-mediawiki.js +464 -476
  253. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +90 -140
  254. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +101 -134
  255. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +63 -75
  256. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +537 -576
  257. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +85 -102
  258. package/src/sap/ui/codeeditor/js/ace/mode-nasal.js +513 -0
  259. package/src/sap/ui/codeeditor/js/ace/mode-nginx.js +119 -155
  260. package/src/sap/ui/codeeditor/js/ace/mode-nim.js +159 -197
  261. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +283 -375
  262. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +139 -172
  263. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +1138 -1378
  264. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +400 -514
  265. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +77 -120
  266. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +449 -0
  267. package/src/sap/ui/codeeditor/js/ace/mode-partiql.js +750 -0
  268. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +28 -47
  269. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +122 -185
  270. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +974 -851
  271. package/src/sap/ui/codeeditor/js/ace/mode-php.js +2282 -1502
  272. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +2463 -1696
  273. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +133 -165
  274. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +5 -10
  275. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +268 -0
  276. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +332 -183
  277. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +168 -234
  278. package/src/sap/ui/codeeditor/js/ace/mode-prisma.js +292 -324
  279. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +180 -246
  280. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +26 -37
  281. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +232 -327
  282. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +320 -0
  283. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +68 -120
  284. package/src/sap/ui/codeeditor/js/ace/mode-python.js +338 -370
  285. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +244 -279
  286. package/src/sap/ui/codeeditor/js/ace/mode-r.js +295 -220
  287. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +356 -433
  288. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +1130 -1374
  289. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +214 -171
  290. package/src/sap/ui/codeeditor/js/ace/mode-red.js +212 -274
  291. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +181 -220
  292. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +1325 -1443
  293. package/src/sap/ui/codeeditor/js/ace/mode-robot.js +168 -0
  294. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +217 -229
  295. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +338 -420
  296. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +258 -155
  297. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +349 -0
  298. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +257 -309
  299. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +127 -191
  300. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +572 -468
  301. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +104 -126
  302. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +181 -228
  303. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +364 -472
  304. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +204 -266
  305. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +477 -405
  306. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +2631 -3161
  307. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +1075 -1334
  308. package/src/sap/ui/codeeditor/js/ace/mode-smithy.js +276 -327
  309. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +78 -102
  310. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +1251 -1548
  311. package/src/sap/ui/codeeditor/js/ace/mode-space.js +47 -63
  312. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +139 -171
  313. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +77 -133
  314. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +138 -192
  315. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +306 -338
  316. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +642 -794
  317. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +96 -150
  318. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +151 -200
  319. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +78 -132
  320. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +148 -96
  321. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +45 -70
  322. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +63 -87
  323. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +462 -384
  324. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +119 -151
  325. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +1099 -1350
  326. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +455 -376
  327. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +382 -505
  328. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +231 -264
  329. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +1116 -1388
  330. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +61 -81
  331. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +57 -79
  332. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +1046 -1292
  333. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +525 -417
  334. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +182 -389
  335. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +58 -112
  336. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +202 -137
  337. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +237 -274
  338. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +5 -34
  339. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +5 -160
  340. package/src/sap/ui/codeeditor/js/ace/snippets/astro.js +9 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/bibtex.js +9 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +5 -134
  343. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +5 -93
  344. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +5 -98
  345. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +5 -13
  346. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +5 -50
  347. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +5 -970
  348. package/src/sap/ui/codeeditor/js/ace/snippets/cuttlefish.js +9 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +5 -86
  350. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +5 -14
  351. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +5 -111
  352. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +5 -22
  353. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +8 -246
  354. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +5 -163
  355. package/src/sap/ui/codeeditor/js/ace/snippets/flix.js +9 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/fsl.js +6 -4
  357. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +5 -1707
  358. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +5 -35
  359. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +5 -23
  360. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +5 -85
  361. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +5 -856
  362. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +1 -3
  363. package/src/sap/ui/codeeditor/js/ace/snippets/ion.js +9 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +5 -243
  365. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +5 -198
  366. package/src/sap/ui/codeeditor/js/ace/snippets/jexl.js +9 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +44 -41
  368. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +5 -102
  369. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +5 -884
  370. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +5 -1235
  371. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +5 -24
  372. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +5 -7
  373. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +5 -91
  374. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +5 -12
  375. package/src/sap/ui/codeeditor/js/ace/snippets/nasal.js +9 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/odin.js +9 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/partiql.js +9 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +5 -350
  379. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +5 -386
  380. package/src/sap/ui/codeeditor/js/ace/snippets/plsql.js +9 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/prql.js +9 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +5 -161
  383. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +5 -124
  384. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +5 -6
  385. package/src/sap/ui/codeeditor/js/ace/snippets/robot.js +16 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +5 -25
  387. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +5 -931
  388. package/src/sap/ui/codeeditor/js/ace/snippets/sac.js +9 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +5 -86
  390. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +5 -12
  391. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +5 -29
  392. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +5 -72
  393. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +5 -95
  394. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +5 -193
  395. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +5 -33
  396. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +1 -2
  397. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +5 -31
  398. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +5 -87
  399. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +44 -41
  400. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +5 -172
  401. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +5 -150
  402. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +6 -123
  403. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_day.js +19 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night.js +18 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night_low_color.js +18 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +6 -90
  407. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +6 -91
  408. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +6 -108
  409. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +6 -113
  410. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +6 -103
  411. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +6 -122
  412. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +7 -137
  413. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +6 -92
  414. package/src/sap/ui/codeeditor/js/ace/theme-github.js +7 -99
  415. package/src/sap/ui/codeeditor/js/ace/theme-github_dark.js +18 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +6 -107
  417. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +5 -76
  418. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_dark_hard.js +18 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_light_hard.js +18 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +6 -91
  421. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +6 -116
  422. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +6 -116
  423. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +6 -99
  424. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +6 -56
  425. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +6 -90
  426. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +6 -91
  427. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +6 -102
  428. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +6 -100
  429. package/src/sap/ui/codeeditor/js/ace/theme-nord_dark.js +6 -89
  430. package/src/sap/ui/codeeditor/js/ace/theme-one_dark.js +10 -131
  431. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +6 -103
  432. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +6 -83
  433. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +6 -86
  434. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +6 -133
  435. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +6 -109
  436. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +3 -124
  437. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +6 -103
  438. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +6 -103
  439. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +6 -101
  440. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +6 -116
  441. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +6 -103
  442. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +6 -104
  443. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +6 -89
  444. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +6 -83
  445. package/src/sap/ui/codeeditor/js/ace/worker-base.js +516 -595
  446. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +496 -575
  447. package/src/sap/ui/codeeditor/js/ace/worker-css.js +501 -578
  448. package/src/sap/ui/codeeditor/js/ace/worker-html.js +515 -584
  449. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +2964 -2551
  450. package/src/sap/ui/codeeditor/js/ace/worker-json.js +496 -575
  451. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +497 -576
  452. package/src/sap/ui/codeeditor/js/ace/worker-php.js +2906 -2795
  453. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +496 -575
  454. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +496 -575
  455. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +5851 -0
  456. package/src/sap/ui/codeeditor/library.js +6 -5
  457. package/LICENSES/BSD-2-Clause.txt +0 -22
@@ -1,220 +1,192 @@
1
- ace.define("ace/mode/xml_highlight_rules",[], function(require, exports, module) {
2
- "use strict";
3
-
1
+ ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
4
2
  var oop = require("../lib/oop");
5
3
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
-
7
- var XmlHighlightRules = function(normalize) {
4
+ var XmlHighlightRules = function (normalize) {
8
5
  var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
9
-
10
6
  this.$rules = {
11
- start : [
12
- {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
7
+ start: [
8
+ { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
13
9
  {
14
- token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
15
- regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
10
+ token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
11
+ regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
16
12
  },
17
- {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
13
+ { token: "comment.start.xml", regex: "<\\!--", next: "comment" },
18
14
  {
19
- token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
20
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
15
+ token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
16
+ regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
21
17
  },
22
- {include : "tag"},
23
- {token : "text.end-tag-open.xml", regex: "</"},
24
- {token : "text.tag-open.xml", regex: "<"},
25
- {include : "reference"},
26
- {defaultToken : "text.xml"}
18
+ { include: "tag" },
19
+ { token: "text.end-tag-open.xml", regex: "</" },
20
+ { token: "text.tag-open.xml", regex: "<" },
21
+ { include: "reference" },
22
+ { defaultToken: "text.xml" }
27
23
  ],
28
-
29
- processing_instruction : [{
30
- token : "entity.other.attribute-name.decl-attribute-name.xml",
31
- regex : tagRegex
32
- }, {
33
- token : "keyword.operator.decl-attribute-equals.xml",
34
- regex : "="
35
- }, {
36
- include: "whitespace"
37
- }, {
38
- include: "string"
39
- }, {
40
- token : "punctuation.xml-decl.xml",
41
- regex : "\\?>",
42
- next : "start"
43
- }],
44
-
45
- doctype : [
46
- {include : "whitespace"},
47
- {include : "string"},
48
- {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
49
- {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
50
- {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
24
+ processing_instruction: [{
25
+ token: "entity.other.attribute-name.decl-attribute-name.xml",
26
+ regex: tagRegex
27
+ }, {
28
+ token: "keyword.operator.decl-attribute-equals.xml",
29
+ regex: "="
30
+ }, {
31
+ include: "whitespace"
32
+ }, {
33
+ include: "string"
34
+ }, {
35
+ token: "punctuation.xml-decl.xml",
36
+ regex: "\\?>",
37
+ next: "start"
38
+ }],
39
+ doctype: [
40
+ { include: "whitespace" },
41
+ { include: "string" },
42
+ { token: "xml-pe.doctype.xml", regex: ">", next: "start" },
43
+ { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
44
+ { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
51
45
  ],
52
-
53
- int_subset : [{
54
- token : "text.xml",
55
- regex : "\\s+"
56
- }, {
57
- token: "punctuation.int-subset.xml",
58
- regex: "]",
59
- next: "pop"
60
- }, {
61
- token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
62
- regex : "(<\\!)(" + tagRegex + ")",
63
- push : [{
64
- token : "text",
65
- regex : "\\s+"
66
- },
67
- {
68
- token : "punctuation.markup-decl.xml",
69
- regex : ">",
70
- next : "pop"
71
- },
72
- {include : "string"}]
73
- }],
74
-
75
- cdata : [
76
- {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
77
- {token : "text.xml", regex : "\\s+"},
78
- {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
46
+ int_subset: [{
47
+ token: "text.xml",
48
+ regex: "\\s+"
49
+ }, {
50
+ token: "punctuation.int-subset.xml",
51
+ regex: "]",
52
+ next: "pop"
53
+ }, {
54
+ token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
55
+ regex: "(<\\!)(" + tagRegex + ")",
56
+ push: [{
57
+ token: "text",
58
+ regex: "\\s+"
59
+ },
60
+ {
61
+ token: "punctuation.markup-decl.xml",
62
+ regex: ">",
63
+ next: "pop"
64
+ },
65
+ { include: "string" }]
66
+ }],
67
+ cdata: [
68
+ { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
69
+ { token: "text.xml", regex: "\\s+" },
70
+ { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
79
71
  ],
80
-
81
- comment : [
82
- {token : "comment.end.xml", regex : "-->", next : "start"},
83
- {defaultToken : "comment.xml"}
72
+ comment: [
73
+ { token: "comment.end.xml", regex: "-->", next: "start" },
74
+ { defaultToken: "comment.xml" }
84
75
  ],
85
-
86
- reference : [{
87
- token : "constant.language.escape.reference.xml",
88
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
89
- }],
90
-
91
- attr_reference : [{
92
- token : "constant.language.escape.reference.attribute-value.xml",
93
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
94
- }],
95
-
96
- tag : [{
97
- token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
98
- regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
99
- next: [
100
- {include : "attributes"},
101
- {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
102
- ]
103
- }],
104
-
105
- tag_whitespace : [
106
- {token : "text.tag-whitespace.xml", regex : "\\s+"}
76
+ reference: [{
77
+ token: "constant.language.escape.reference.xml",
78
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
79
+ }],
80
+ attr_reference: [{
81
+ token: "constant.language.escape.reference.attribute-value.xml",
82
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
83
+ }],
84
+ tag: [{
85
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
86
+ regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
87
+ next: [
88
+ { include: "attributes" },
89
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
90
+ ]
91
+ }],
92
+ tag_whitespace: [
93
+ { token: "text.tag-whitespace.xml", regex: "\\s+" }
107
94
  ],
108
- whitespace : [
109
- {token : "text.whitespace.xml", regex : "\\s+"}
95
+ whitespace: [
96
+ { token: "text.whitespace.xml", regex: "\\s+" }
110
97
  ],
111
98
  string: [{
112
- token : "string.xml",
113
- regex : "'",
114
- push : [
115
- {token : "string.xml", regex: "'", next: "pop"},
116
- {defaultToken : "string.xml"}
117
- ]
118
- }, {
119
- token : "string.xml",
120
- regex : '"',
121
- push : [
122
- {token : "string.xml", regex: '"', next: "pop"},
123
- {defaultToken : "string.xml"}
124
- ]
125
- }],
126
-
99
+ token: "string.xml",
100
+ regex: "'",
101
+ push: [
102
+ { token: "string.xml", regex: "'", next: "pop" },
103
+ { defaultToken: "string.xml" }
104
+ ]
105
+ }, {
106
+ token: "string.xml",
107
+ regex: '"',
108
+ push: [
109
+ { token: "string.xml", regex: '"', next: "pop" },
110
+ { defaultToken: "string.xml" }
111
+ ]
112
+ }],
127
113
  attributes: [{
128
- token : "entity.other.attribute-name.xml",
129
- regex : tagRegex
130
- }, {
131
- token : "keyword.operator.attribute-equals.xml",
132
- regex : "="
133
- }, {
134
- include: "tag_whitespace"
135
- }, {
136
- include: "attribute_value"
137
- }],
138
-
114
+ token: "entity.other.attribute-name.xml",
115
+ regex: tagRegex
116
+ }, {
117
+ token: "keyword.operator.attribute-equals.xml",
118
+ regex: "="
119
+ }, {
120
+ include: "tag_whitespace"
121
+ }, {
122
+ include: "attribute_value"
123
+ }],
139
124
  attribute_value: [{
140
- token : "string.attribute-value.xml",
141
- regex : "'",
142
- push : [
143
- {token : "string.attribute-value.xml", regex: "'", next: "pop"},
144
- {include : "attr_reference"},
145
- {defaultToken : "string.attribute-value.xml"}
146
- ]
147
- }, {
148
- token : "string.attribute-value.xml",
149
- regex : '"',
150
- push : [
151
- {token : "string.attribute-value.xml", regex: '"', next: "pop"},
152
- {include : "attr_reference"},
153
- {defaultToken : "string.attribute-value.xml"}
154
- ]
155
- }]
125
+ token: "string.attribute-value.xml",
126
+ regex: "'",
127
+ push: [
128
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
129
+ { include: "attr_reference" },
130
+ { defaultToken: "string.attribute-value.xml" }
131
+ ]
132
+ }, {
133
+ token: "string.attribute-value.xml",
134
+ regex: '"',
135
+ push: [
136
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
137
+ { include: "attr_reference" },
138
+ { defaultToken: "string.attribute-value.xml" }
139
+ ]
140
+ }]
156
141
  };
157
-
158
142
  if (this.constructor === XmlHighlightRules)
159
143
  this.normalizeRules();
160
144
  };
161
-
162
-
163
- (function() {
164
-
165
- this.embedTagRules = function(HighlightRules, prefix, tag){
145
+ (function () {
146
+ this.embedTagRules = function (HighlightRules, prefix, tag) {
166
147
  this.$rules.tag.unshift({
167
- token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
168
- regex : "(<)(" + tag + "(?=\\s|>|$))",
148
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
149
+ regex: "(<)(" + tag + "(?=\\s|>|$))",
169
150
  next: [
170
- {include : "attributes"},
171
- {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
151
+ { include: "attributes" },
152
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
172
153
  ]
173
154
  });
174
-
175
155
  this.$rules[tag + "-end"] = [
176
- {include : "attributes"},
177
- {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
178
- onMatch : function(value, currentState, stack) {
156
+ { include: "attributes" },
157
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
158
+ onMatch: function (value, currentState, stack) {
179
159
  stack.splice(0);
180
160
  return this.token;
181
- }}
161
+ } }
182
162
  ];
183
-
184
163
  this.embedRules(HighlightRules, prefix, [{
185
- token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
186
- regex : "(</)(" + tag + "(?=\\s|>|$))",
187
- next: tag + "-end"
188
- }, {
189
- token: "string.cdata.xml",
190
- regex : "<\\!\\[CDATA\\["
191
- }, {
192
- token: "string.cdata.xml",
193
- regex : "\\]\\]>"
194
- }]);
164
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
165
+ regex: "(</)(" + tag + "(?=\\s|>|$))",
166
+ next: tag + "-end"
167
+ }, {
168
+ token: "string.cdata.xml",
169
+ regex: "<\\!\\[CDATA\\["
170
+ }, {
171
+ token: "string.cdata.xml",
172
+ regex: "\\]\\]>"
173
+ }]);
195
174
  };
196
-
197
175
  }).call(TextHighlightRules.prototype);
198
-
199
176
  oop.inherits(XmlHighlightRules, TextHighlightRules);
200
-
201
177
  exports.XmlHighlightRules = XmlHighlightRules;
202
- });
203
178
 
204
- ace.define("ace/mode/behaviour/xml",[], function(require, exports, module) {
205
- "use strict";
179
+ });
206
180
 
181
+ 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";
207
182
  var oop = require("../../lib/oop");
208
183
  var Behaviour = require("../behaviour").Behaviour;
209
184
  var TokenIterator = require("../../token_iterator").TokenIterator;
210
185
  var lang = require("../../lib/lang");
211
-
212
186
  function is(token, type) {
213
187
  return token && token.type.lastIndexOf(type + ".xml") > -1;
214
188
  }
215
-
216
189
  var XmlBehaviour = function () {
217
-
218
190
  this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
219
191
  if (text == '"' || text == "'") {
220
192
  var quote = text;
@@ -225,26 +197,21 @@ var XmlBehaviour = function () {
225
197
  selection: false
226
198
  };
227
199
  }
228
-
229
200
  var cursor = editor.getCursorPosition();
230
201
  var line = session.doc.getLine(cursor.row);
231
202
  var rightChar = line.substring(cursor.column, cursor.column + 1);
232
203
  var iterator = new TokenIterator(session, cursor.row, cursor.column);
233
204
  var token = iterator.getCurrentToken();
234
-
235
205
  if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
236
206
  return {
237
207
  text: "",
238
208
  selection: [1, 1]
239
209
  };
240
210
  }
241
-
242
211
  if (!token)
243
212
  token = iterator.stepBackward();
244
-
245
213
  if (!token)
246
214
  return;
247
-
248
215
  while (is(token, "tag-whitespace") || is(token, "whitespace")) {
249
216
  token = iterator.stepBackward();
250
217
  }
@@ -257,8 +224,7 @@ var XmlBehaviour = function () {
257
224
  }
258
225
  }
259
226
  });
260
-
261
- this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
227
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
262
228
  var selected = session.doc.getTextRange(range);
263
229
  if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
264
230
  var line = session.doc.getLine(range.start.row);
@@ -269,7 +235,6 @@ var XmlBehaviour = function () {
269
235
  }
270
236
  }
271
237
  });
272
-
273
238
  this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
274
239
  if (text == '>') {
275
240
  var position = editor.getSelectionRange().start;
@@ -290,7 +255,6 @@ var XmlBehaviour = function () {
290
255
  iterator.stepBackward();
291
256
  }
292
257
  }
293
-
294
258
  if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
295
259
  return;
296
260
  while (!is(token, "tag-name")) {
@@ -300,63 +264,54 @@ var XmlBehaviour = function () {
300
264
  break;
301
265
  }
302
266
  }
303
-
304
267
  var tokenRow = iterator.getCurrentTokenRow();
305
268
  var tokenColumn = iterator.getCurrentTokenColumn();
306
269
  if (is(iterator.stepBackward(), "end-tag-open"))
307
270
  return;
308
-
309
271
  var element = token.value;
310
272
  if (tokenRow == position.row)
311
273
  element = element.substring(0, position.column - tokenColumn);
312
-
313
274
  if (this.voidElements.hasOwnProperty(element.toLowerCase()))
314
- return;
315
-
275
+ return;
316
276
  return {
317
- text: ">" + "</" + element + ">",
318
- selection: [1, 1]
277
+ text: ">" + "</" + element + ">",
278
+ selection: [1, 1]
319
279
  };
320
280
  }
321
281
  });
322
-
323
282
  this.add("autoindent", "insertion", function (state, action, editor, session, text) {
324
283
  if (text == "\n") {
325
284
  var cursor = editor.getCursorPosition();
326
285
  var line = session.getLine(cursor.row);
327
286
  var iterator = new TokenIterator(session, cursor.row, cursor.column);
328
287
  var token = iterator.getCurrentToken();
329
-
330
288
  if (token && token.type.indexOf("tag-close") !== -1) {
331
289
  if (token.value == "/>")
332
290
  return;
333
291
  while (token && token.type.indexOf("tag-name") === -1) {
334
292
  token = iterator.stepBackward();
335
293
  }
336
-
337
294
  if (!token) {
338
295
  return;
339
296
  }
340
-
341
297
  var tag = token.value;
342
298
  var row = iterator.getCurrentTokenRow();
343
299
  token = iterator.stepBackward();
344
300
  if (!token || token.type.indexOf("end-tag") !== -1) {
345
301
  return;
346
302
  }
347
-
348
303
  if (this.voidElements && !this.voidElements[tag]) {
349
- var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
304
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
350
305
  var line = session.getLine(row);
351
306
  var nextIndent = this.$getIndent(line);
352
307
  var indent = nextIndent + session.getTabString();
353
-
354
308
  if (nextToken && nextToken.value === "</") {
355
309
  return {
356
310
  text: "\n" + indent + "\n" + nextIndent,
357
311
  selection: [1, indent.length, 1, indent.length]
358
312
  };
359
- } else {
313
+ }
314
+ else {
360
315
  return {
361
316
  text: "\n" + indent
362
317
  };
@@ -365,74 +320,55 @@ var XmlBehaviour = function () {
365
320
  }
366
321
  }
367
322
  });
368
-
369
323
  };
370
-
371
324
  oop.inherits(XmlBehaviour, Behaviour);
372
-
373
325
  exports.XmlBehaviour = XmlBehaviour;
374
- });
375
326
 
376
- ace.define("ace/mode/folding/xml",[], function(require, exports, module) {
377
- "use strict";
327
+ });
378
328
 
329
+ 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";
379
330
  var oop = require("../../lib/oop");
380
- var lang = require("../../lib/lang");
381
331
  var Range = require("../../range").Range;
382
332
  var BaseFoldMode = require("./fold_mode").FoldMode;
383
- var TokenIterator = require("../../token_iterator").TokenIterator;
384
-
385
- var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
333
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
386
334
  BaseFoldMode.call(this);
387
335
  this.voidElements = voidElements || {};
388
336
  this.optionalEndTags = oop.mixin({}, this.voidElements);
389
337
  if (optionalEndTags)
390
338
  oop.mixin(this.optionalEndTags, optionalEndTags);
391
-
392
339
  };
393
340
  oop.inherits(FoldMode, BaseFoldMode);
394
-
395
- var Tag = function() {
341
+ var Tag = function () {
396
342
  this.tagName = "";
397
343
  this.closing = false;
398
344
  this.selfClosing = false;
399
- this.start = {row: 0, column: 0};
400
- this.end = {row: 0, column: 0};
345
+ this.start = { row: 0, column: 0 };
346
+ this.end = { row: 0, column: 0 };
401
347
  };
402
-
403
348
  function is(token, type) {
404
349
  return token.type.lastIndexOf(type + ".xml") > -1;
405
350
  }
406
-
407
- (function() {
408
-
409
- this.getFoldWidget = function(session, foldStyle, row) {
351
+ (function () {
352
+ this.getFoldWidget = function (session, foldStyle, row) {
410
353
  var tag = this._getFirstTagInLine(session, row);
411
-
412
354
  if (!tag)
413
355
  return this.getCommentFoldWidget(session, row);
414
-
415
356
  if (tag.closing || (!tag.tagName && tag.selfClosing))
416
- return foldStyle == "markbeginend" ? "end" : "";
417
-
357
+ return foldStyle === "markbeginend" ? "end" : "";
418
358
  if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
419
359
  return "";
420
-
421
360
  if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
422
361
  return "";
423
-
424
362
  return "start";
425
363
  };
426
-
427
- this.getCommentFoldWidget = function(session, row) {
364
+ this.getCommentFoldWidget = function (session, row) {
428
365
  if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
429
366
  return "start";
430
367
  return "";
431
368
  };
432
- this._getFirstTagInLine = function(session, row) {
369
+ this._getFirstTagInLine = function (session, row) {
433
370
  var tokens = session.getTokens(row);
434
371
  var tag = new Tag();
435
-
436
372
  for (var i = 0; i < tokens.length; i++) {
437
373
  var token = tokens[i];
438
374
  if (is(token, "tag-open")) {
@@ -452,17 +388,16 @@ function is(token, type) {
452
388
  }
453
389
  }
454
390
  return tag;
455
- } else if (is(token, "tag-close")) {
391
+ }
392
+ else if (is(token, "tag-close")) {
456
393
  tag.selfClosing = token.value == '/>';
457
394
  return tag;
458
395
  }
459
396
  tag.start.column += token.value.length;
460
397
  }
461
-
462
398
  return null;
463
399
  };
464
-
465
- this._findEndTagInLine = function(session, row, tagName, startColumn) {
400
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
466
401
  var tokens = session.getTokens(row);
467
402
  var column = 0;
468
403
  for (var i = 0; i < tokens.length; i++) {
@@ -478,153 +413,21 @@ function is(token, type) {
478
413
  }
479
414
  return false;
480
415
  };
481
- this._readTagForward = function(iterator) {
482
- var token = iterator.getCurrentToken();
483
- if (!token)
484
- return null;
485
-
486
- var tag = new Tag();
487
- do {
488
- if (is(token, "tag-open")) {
489
- tag.closing = is(token, "end-tag-open");
490
- tag.start.row = iterator.getCurrentTokenRow();
491
- tag.start.column = iterator.getCurrentTokenColumn();
492
- } else if (is(token, "tag-name")) {
493
- tag.tagName = token.value;
494
- } else if (is(token, "tag-close")) {
495
- tag.selfClosing = token.value == "/>";
496
- tag.end.row = iterator.getCurrentTokenRow();
497
- tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
498
- iterator.stepForward();
499
- return tag;
500
- }
501
- } while(token = iterator.stepForward());
502
-
503
- return null;
504
- };
505
-
506
- this._readTagBackward = function(iterator) {
507
- var token = iterator.getCurrentToken();
508
- if (!token)
509
- return null;
510
-
511
- var tag = new Tag();
512
- do {
513
- if (is(token, "tag-open")) {
514
- tag.closing = is(token, "end-tag-open");
515
- tag.start.row = iterator.getCurrentTokenRow();
516
- tag.start.column = iterator.getCurrentTokenColumn();
517
- iterator.stepBackward();
518
- return tag;
519
- } else if (is(token, "tag-name")) {
520
- tag.tagName = token.value;
521
- } else if (is(token, "tag-close")) {
522
- tag.selfClosing = token.value == "/>";
523
- tag.end.row = iterator.getCurrentTokenRow();
524
- tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
525
- }
526
- } while(token = iterator.stepBackward());
527
-
528
- return null;
529
- };
530
-
531
- this._pop = function(stack, tag) {
532
- while (stack.length) {
533
-
534
- var top = stack[stack.length-1];
535
- if (!tag || top.tagName == tag.tagName) {
536
- return stack.pop();
537
- }
538
- else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
539
- stack.pop();
540
- continue;
541
- } else {
542
- return null;
543
- }
416
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
417
+ var tags = session.getMatchingTags({ row: row, column: 0 });
418
+ if (tags) {
419
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
544
420
  }
545
- };
546
-
547
- this.getFoldWidgetRange = function(session, foldStyle, row) {
548
- var firstTag = this._getFirstTagInLine(session, row);
549
-
550
- if (!firstTag) {
421
+ else {
551
422
  return this.getCommentFoldWidget(session, row)
552
423
  && session.getCommentFoldRange(row, session.getLine(row).length);
553
424
  }
554
-
555
- var isBackward = firstTag.closing || firstTag.selfClosing;
556
- var stack = [];
557
- var tag;
558
-
559
- if (!isBackward) {
560
- var iterator = new TokenIterator(session, row, firstTag.start.column);
561
- var start = {
562
- row: row,
563
- column: firstTag.start.column + firstTag.tagName.length + 2
564
- };
565
- if (firstTag.start.row == firstTag.end.row)
566
- start.column = firstTag.end.column;
567
- while (tag = this._readTagForward(iterator)) {
568
- if (tag.selfClosing) {
569
- if (!stack.length) {
570
- tag.start.column += tag.tagName.length + 2;
571
- tag.end.column -= 2;
572
- return Range.fromPoints(tag.start, tag.end);
573
- } else
574
- continue;
575
- }
576
-
577
- if (tag.closing) {
578
- this._pop(stack, tag);
579
- if (stack.length == 0)
580
- return Range.fromPoints(start, tag.start);
581
- }
582
- else {
583
- stack.push(tag);
584
- }
585
- }
586
- }
587
- else {
588
- var iterator = new TokenIterator(session, row, firstTag.end.column);
589
- var end = {
590
- row: row,
591
- column: firstTag.start.column
592
- };
593
-
594
- while (tag = this._readTagBackward(iterator)) {
595
- if (tag.selfClosing) {
596
- if (!stack.length) {
597
- tag.start.column += tag.tagName.length + 2;
598
- tag.end.column -= 2;
599
- return Range.fromPoints(tag.start, tag.end);
600
- } else
601
- continue;
602
- }
603
-
604
- if (!tag.closing) {
605
- this._pop(stack, tag);
606
- if (stack.length == 0) {
607
- tag.start.column += tag.tagName.length + 2;
608
- if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
609
- tag.start.column = tag.end.column;
610
- return Range.fromPoints(tag.start, end);
611
- }
612
- }
613
- else {
614
- stack.push(tag);
615
- }
616
- }
617
- }
618
-
619
425
  };
620
-
621
426
  }).call(FoldMode.prototype);
622
427
 
623
428
  });
624
429
 
625
- ace.define("ace/mode/xml",[], function(require, exports, module) {
626
- "use strict";
627
-
430
+ ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module){"use strict";
628
431
  var oop = require("../lib/oop");
629
432
  var lang = require("../lib/lang");
630
433
  var TextMode = require("./text").Mode;
@@ -632,129 +435,183 @@ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
632
435
  var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
633
436
  var XmlFoldMode = require("./folding/xml").FoldMode;
634
437
  var WorkerClient = require("../worker/worker_client").WorkerClient;
635
-
636
- var Mode = function() {
637
- this.HighlightRules = XmlHighlightRules;
638
- this.$behaviour = new XmlBehaviour();
639
- this.foldingRules = new XmlFoldMode();
438
+ var Mode = function () {
439
+ this.HighlightRules = XmlHighlightRules;
440
+ this.$behaviour = new XmlBehaviour();
441
+ this.foldingRules = new XmlFoldMode();
640
442
  };
641
-
642
443
  oop.inherits(Mode, TextMode);
643
-
644
- (function() {
645
-
444
+ (function () {
646
445
  this.voidElements = lang.arrayToMap([]);
647
-
648
- this.blockComment = {start: "<!--", end: "-->"};
649
-
650
- this.createWorker = function(session) {
446
+ this.blockComment = { start: "<!--", end: "-->" };
447
+ this.createWorker = function (session) {
651
448
  var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
652
449
  worker.attachToDocument(session.getDocument());
653
-
654
- worker.on("error", function(e) {
450
+ worker.on("error", function (e) {
655
451
  session.setAnnotations(e.data);
656
452
  });
657
-
658
- worker.on("terminate", function() {
453
+ worker.on("terminate", function () {
659
454
  session.clearAnnotations();
660
455
  });
661
-
662
456
  return worker;
663
457
  };
664
-
665
458
  this.$id = "ace/mode/xml";
666
459
  }).call(Mode.prototype);
667
-
668
460
  exports.Mode = Mode;
669
- });
670
461
 
671
- ace.define("ace/mode/doc_comment_highlight_rules",[], function(require, exports, module) {
672
- "use strict";
462
+ });
673
463
 
464
+ ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
674
465
  var oop = require("../lib/oop");
675
466
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
676
-
677
- var DocCommentHighlightRules = function() {
467
+ var JsDocCommentHighlightRules = function () {
678
468
  this.$rules = {
679
- "start" : [ {
680
- token : "comment.doc.tag",
681
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
682
- },
683
- DocCommentHighlightRules.getTagRule(),
684
- {
685
- defaultToken : "comment.doc",
686
- caseInsensitive: true
687
- }]
469
+ "start": [
470
+ {
471
+ token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
472
+ regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
473
+ push: [
474
+ {
475
+ token: "lparen.doc",
476
+ regex: "{",
477
+ push: [
478
+ {
479
+ include: "doc-syntax"
480
+ }, {
481
+ token: "rparen.doc",
482
+ regex: "}|(?=$)",
483
+ next: "pop"
484
+ }
485
+ ]
486
+ }, {
487
+ token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
488
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
489
+ next: "pop"
490
+ }, {
491
+ token: "rparen.doc",
492
+ regex: "}|(?=$)",
493
+ next: "pop"
494
+ }, {
495
+ include: "doc-syntax"
496
+ }, {
497
+ defaultToken: "text.doc"
498
+ }
499
+ ]
500
+ }, {
501
+ token: ["comment.doc.tag", "text.doc", "lparen.doc"],
502
+ regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
503
+ + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
504
+ push: [
505
+ {
506
+ token: "lparen.doc",
507
+ regex: "{",
508
+ push: [
509
+ {
510
+ include: "doc-syntax"
511
+ }, {
512
+ token: "rparen.doc",
513
+ regex: "}|(?=$)",
514
+ next: "pop"
515
+ }
516
+ ]
517
+ }, {
518
+ token: "rparen.doc",
519
+ regex: "}|(?=$)",
520
+ next: "pop"
521
+ }, {
522
+ include: "doc-syntax"
523
+ }, {
524
+ defaultToken: "text.doc"
525
+ }
526
+ ]
527
+ }, {
528
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
529
+ regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
530
+ + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
531
+ + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
532
+ + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
533
+ }, {
534
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
535
+ regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
536
+ }, {
537
+ token: "comment.doc.tag",
538
+ regex: "@access\\s+(?:private|public|protected)"
539
+ }, {
540
+ token: "comment.doc.tag",
541
+ regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
542
+ }, {
543
+ token: "comment.doc.tag",
544
+ regex: "@\\w+(?=\\s|$)"
545
+ },
546
+ JsDocCommentHighlightRules.getTagRule(),
547
+ {
548
+ defaultToken: "comment.doc",
549
+ caseInsensitive: true
550
+ }
551
+ ],
552
+ "doc-syntax": [{
553
+ token: "operator.doc",
554
+ regex: /[|:]/
555
+ }, {
556
+ token: "paren.doc",
557
+ regex: /[\[\]]/
558
+ }]
688
559
  };
560
+ this.normalizeRules();
689
561
  };
690
-
691
- oop.inherits(DocCommentHighlightRules, TextHighlightRules);
692
-
693
- DocCommentHighlightRules.getTagRule = function(start) {
562
+ oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
563
+ JsDocCommentHighlightRules.getTagRule = function (start) {
694
564
  return {
695
- token : "comment.doc.tag.storage.type",
696
- regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
565
+ token: "comment.doc.tag.storage.type",
566
+ regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
697
567
  };
698
568
  };
699
-
700
- DocCommentHighlightRules.getStartRule = function(start) {
569
+ JsDocCommentHighlightRules.getStartRule = function (start) {
701
570
  return {
702
- token : "comment.doc", // doc comment
703
- regex : "\\/\\*(?=\\*)",
704
- next : start
571
+ token: "comment.doc",
572
+ regex: "\\/\\*(?=\\*)",
573
+ next: start
705
574
  };
706
575
  };
707
-
708
- DocCommentHighlightRules.getEndRule = function (start) {
576
+ JsDocCommentHighlightRules.getEndRule = function (start) {
709
577
  return {
710
- token : "comment.doc", // closing comment
711
- regex : "\\*\\/",
712
- next : start
578
+ token: "comment.doc",
579
+ regex: "\\*\\/",
580
+ next: start
713
581
  };
714
582
  };
715
-
716
-
717
- exports.DocCommentHighlightRules = DocCommentHighlightRules;
583
+ exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
718
584
 
719
585
  });
720
586
 
721
- ace.define("ace/mode/javascript_highlight_rules",[], function(require, exports, module) {
722
- "use strict";
723
-
587
+ ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
724
588
  var oop = require("../lib/oop");
725
- var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
589
+ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
726
590
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
727
591
  var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
728
-
729
- var JavaScriptHighlightRules = function(options) {
592
+ var JavaScriptHighlightRules = function (options) {
730
593
  var keywordMapper = this.createKeywordMapper({
731
- "variable.language":
732
- "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
733
- "Namespace|QName|XML|XMLList|" + // E4X
734
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
735
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
736
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
737
- "SyntaxError|TypeError|URIError|" +
594
+ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
595
+ "Namespace|QName|XML|XMLList|" + // E4X
596
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
597
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
598
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
599
+ "SyntaxError|TypeError|URIError|" +
738
600
  "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
739
- "isNaN|parseFloat|parseInt|" +
740
- "JSON|Math|" + // Other
741
- "this|arguments|prototype|window|document" , // Pseudo
742
- "keyword":
743
- "const|yield|import|get|set|async|await|" +
601
+ "isNaN|parseFloat|parseInt|" +
602
+ "JSON|Math|" + // Other
603
+ "this|arguments|prototype|window|document",
604
+ "keyword": "const|yield|import|get|set|async|await|" +
744
605
  "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
745
606
  "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
746
607
  "__parent__|__count__|escape|unescape|with|__proto__|" +
747
- "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
748
- "storage.type":
749
- "const|let|var|function",
750
- "constant.language":
751
- "null|Infinity|NaN|undefined",
752
- "support.function":
753
- "alert",
608
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
609
+ "storage.type": "const|let|var|function",
610
+ "constant.language": "null|Infinity|NaN|undefined",
611
+ "support.function": "alert",
754
612
  "constant.language.boolean": "true|false"
755
613
  }, "identifier");
756
614
  var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
757
-
758
615
  var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
759
616
  "u[0-9a-fA-F]{4}|" + // unicode
760
617
  "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
@@ -762,143 +619,142 @@ var JavaScriptHighlightRules = function(options) {
762
619
  "3[0-7][0-7]?|" + // oct
763
620
  "[4-7][0-7]?|" + //oct
764
621
  ".)";
765
-
766
622
  this.$rules = {
767
- "no_regex" : [
623
+ "no_regex": [
768
624
  DocCommentHighlightRules.getStartRule("doc-start"),
769
625
  comments("no_regex"),
770
626
  {
771
- token : "string",
772
- regex : "'(?=.)",
773
- next : "qstring"
627
+ token: "string",
628
+ regex: "'(?=.)",
629
+ next: "qstring"
774
630
  }, {
775
- token : "string",
776
- regex : '"(?=.)',
777
- next : "qqstring"
631
+ token: "string",
632
+ regex: '"(?=.)',
633
+ next: "qqstring"
778
634
  }, {
779
- token : "constant.numeric", // hexadecimal, octal and binary
780
- regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
635
+ token: "constant.numeric",
636
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
781
637
  }, {
782
- token : "constant.numeric", // decimal integers and floats
783
- regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
638
+ token: "constant.numeric",
639
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
784
640
  }, {
785
- token : [
641
+ token: [
786
642
  "storage.type", "punctuation.operator", "support.function",
787
- "punctuation.operator", "entity.name.function", "text","keyword.operator"
643
+ "punctuation.operator", "entity.name.function", "text", "keyword.operator"
788
644
  ],
789
- regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
645
+ regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
790
646
  next: "function_arguments"
791
647
  }, {
792
- token : [
648
+ token: [
793
649
  "storage.type", "punctuation.operator", "entity.name.function", "text",
794
650
  "keyword.operator", "text", "storage.type", "text", "paren.lparen"
795
651
  ],
796
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
652
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
797
653
  next: "function_arguments"
798
654
  }, {
799
- token : [
655
+ token: [
800
656
  "entity.name.function", "text", "keyword.operator", "text", "storage.type",
801
657
  "text", "paren.lparen"
802
658
  ],
803
- regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
659
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
804
660
  next: "function_arguments"
805
661
  }, {
806
- token : [
662
+ token: [
807
663
  "storage.type", "punctuation.operator", "entity.name.function", "text",
808
664
  "keyword.operator", "text",
809
665
  "storage.type", "text", "entity.name.function", "text", "paren.lparen"
810
666
  ],
811
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
667
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
812
668
  next: "function_arguments"
813
669
  }, {
814
- token : [
670
+ token: [
815
671
  "storage.type", "text", "entity.name.function", "text", "paren.lparen"
816
672
  ],
817
- regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
673
+ regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
818
674
  next: "function_arguments"
819
675
  }, {
820
- token : [
676
+ token: [
821
677
  "entity.name.function", "text", "punctuation.operator",
822
678
  "text", "storage.type", "text", "paren.lparen"
823
679
  ],
824
- regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
680
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
825
681
  next: "function_arguments"
826
682
  }, {
827
- token : [
683
+ token: [
828
684
  "text", "text", "storage.type", "text", "paren.lparen"
829
685
  ],
830
- regex : "(:)(\\s*)(function)(\\s*)(\\()",
686
+ regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
831
687
  next: "function_arguments"
832
688
  }, {
833
- token : "keyword",
834
- regex : "from(?=\\s*('|\"))"
689
+ token: "keyword",
690
+ regex: "from(?=\\s*('|\"))"
835
691
  }, {
836
- token : "keyword",
837
- regex : "(?:" + kwBeforeRe + ")\\b",
838
- next : "start"
692
+ token: "keyword",
693
+ regex: "(?:" + kwBeforeRe + ")\\b",
694
+ next: "start"
839
695
  }, {
840
- token : ["support.constant"],
841
- regex : /that\b/
696
+ token: "support.constant",
697
+ regex: /that\b/
842
698
  }, {
843
- token : ["storage.type", "punctuation.operator", "support.function.firebug"],
844
- regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
699
+ token: ["storage.type", "punctuation.operator", "support.function.firebug"],
700
+ regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
845
701
  }, {
846
- token : keywordMapper,
847
- regex : identifierRe
702
+ token: keywordMapper,
703
+ regex: identifierRe
848
704
  }, {
849
- token : "punctuation.operator",
850
- regex : /[.](?![.])/,
851
- next : "property"
705
+ token: "punctuation.operator",
706
+ regex: /[.](?![.])/,
707
+ next: "property"
852
708
  }, {
853
- token : "storage.type",
854
- regex : /=>/,
855
- next : "start"
709
+ token: "storage.type",
710
+ regex: /=>/,
711
+ next: "start"
856
712
  }, {
857
- token : "keyword.operator",
858
- regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
859
- next : "start"
713
+ token: "keyword.operator",
714
+ regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
715
+ next: "start"
860
716
  }, {
861
- token : "punctuation.operator",
862
- regex : /[?:,;.]/,
863
- next : "start"
717
+ token: "punctuation.operator",
718
+ regex: /[?:,;.]/,
719
+ next: "start"
864
720
  }, {
865
- token : "paren.lparen",
866
- regex : /[\[({]/,
867
- next : "start"
721
+ token: "paren.lparen",
722
+ regex: /[\[({]/,
723
+ next: "start"
868
724
  }, {
869
- token : "paren.rparen",
870
- regex : /[\])}]/
725
+ token: "paren.rparen",
726
+ regex: /[\])}]/
871
727
  }, {
872
728
  token: "comment",
873
729
  regex: /^#!.*$/
874
730
  }
875
731
  ],
876
732
  property: [{
877
- token : "text",
878
- regex : "\\s+"
733
+ token: "text",
734
+ regex: "\\s+"
879
735
  }, {
880
- token : [
736
+ token: [
881
737
  "storage.type", "punctuation.operator", "entity.name.function", "text",
882
738
  "keyword.operator", "text",
883
739
  "storage.type", "text", "entity.name.function", "text", "paren.lparen"
884
740
  ],
885
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
741
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
886
742
  next: "function_arguments"
887
743
  }, {
888
- token : "punctuation.operator",
889
- regex : /[.](?![.])/
744
+ token: "punctuation.operator",
745
+ regex: /[.](?![.])/
890
746
  }, {
891
- token : "support.function",
892
- 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
747
+ token: "support.function",
748
+ 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(?=\()/
893
749
  }, {
894
- token : "support.function.dom",
895
- regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
750
+ token: "support.function.dom",
751
+ regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
896
752
  }, {
897
- token : "support.constant",
898
- regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
753
+ token: "support.constant",
754
+ regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
899
755
  }, {
900
- token : "identifier",
901
- regex : identifierRe
756
+ token: "identifier",
757
+ regex: identifierRe
902
758
  }, {
903
759
  regex: "",
904
760
  token: "empty",
@@ -913,9 +769,9 @@ var JavaScriptHighlightRules = function(options) {
913
769
  regex: "\\/",
914
770
  next: "regex"
915
771
  }, {
916
- token : "text",
917
- regex : "\\s+|^$",
918
- next : "start"
772
+ token: "text",
773
+ regex: "\\s+|^$",
774
+ next: "start"
919
775
  }, {
920
776
  token: "empty",
921
777
  regex: "",
@@ -931,13 +787,13 @@ var JavaScriptHighlightRules = function(options) {
931
787
  regex: "/[sxngimy]*",
932
788
  next: "no_regex"
933
789
  }, {
934
- token : "invalid",
790
+ token: "invalid",
935
791
  regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
936
792
  }, {
937
- token : "constant.language.escape",
793
+ token: "constant.language.escape",
938
794
  regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
939
795
  }, {
940
- token : "constant.language.delimiter",
796
+ token: "constant.language.delimiter",
941
797
  regex: /\|/
942
798
  }, {
943
799
  token: "constant.language.escape",
@@ -970,13 +826,67 @@ var JavaScriptHighlightRules = function(options) {
970
826
  defaultToken: "string.regexp.charachterclass"
971
827
  }
972
828
  ],
829
+ "default_parameter": [
830
+ {
831
+ token: "string",
832
+ regex: "'(?=.)",
833
+ push: [
834
+ {
835
+ token: "string",
836
+ regex: "'|$",
837
+ next: "pop"
838
+ }, {
839
+ include: "qstring"
840
+ }
841
+ ]
842
+ }, {
843
+ token: "string",
844
+ regex: '"(?=.)',
845
+ push: [
846
+ {
847
+ token: "string",
848
+ regex: '"|$',
849
+ next: "pop"
850
+ }, {
851
+ include: "qqstring"
852
+ }
853
+ ]
854
+ }, {
855
+ token: "constant.language",
856
+ regex: "null|Infinity|NaN|undefined"
857
+ }, {
858
+ token: "constant.numeric",
859
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
860
+ }, {
861
+ token: "constant.numeric",
862
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
863
+ }, {
864
+ token: "punctuation.operator",
865
+ regex: ",",
866
+ next: "function_arguments"
867
+ }, {
868
+ token: "text",
869
+ regex: "\\s+"
870
+ }, {
871
+ token: "punctuation.operator",
872
+ regex: "$"
873
+ }, {
874
+ token: "empty",
875
+ regex: "",
876
+ next: "no_regex"
877
+ }
878
+ ],
973
879
  "function_arguments": [
880
+ comments("function_arguments"),
974
881
  {
975
882
  token: "variable.parameter",
976
883
  regex: identifierRe
977
884
  }, {
978
885
  token: "punctuation.operator",
979
- regex: "[, ]+"
886
+ regex: ","
887
+ }, {
888
+ token: "text",
889
+ regex: "\\s+"
980
890
  }, {
981
891
  token: "punctuation.operator",
982
892
  regex: "$"
@@ -986,44 +896,42 @@ var JavaScriptHighlightRules = function(options) {
986
896
  next: "no_regex"
987
897
  }
988
898
  ],
989
- "qqstring" : [
899
+ "qqstring": [
990
900
  {
991
- token : "constant.language.escape",
992
- regex : escapedRe
901
+ token: "constant.language.escape",
902
+ regex: escapedRe
993
903
  }, {
994
- token : "string",
995
- regex : "\\\\$",
996
- consumeLineEnd : true
904
+ token: "string",
905
+ regex: "\\\\$",
906
+ consumeLineEnd: true
997
907
  }, {
998
- token : "string",
999
- regex : '"|$',
1000
- next : "no_regex"
908
+ token: "string",
909
+ regex: '"|$',
910
+ next: "no_regex"
1001
911
  }, {
1002
912
  defaultToken: "string"
1003
913
  }
1004
914
  ],
1005
- "qstring" : [
915
+ "qstring": [
1006
916
  {
1007
- token : "constant.language.escape",
1008
- regex : escapedRe
917
+ token: "constant.language.escape",
918
+ regex: escapedRe
1009
919
  }, {
1010
- token : "string",
1011
- regex : "\\\\$",
1012
- consumeLineEnd : true
920
+ token: "string",
921
+ regex: "\\\\$",
922
+ consumeLineEnd: true
1013
923
  }, {
1014
- token : "string",
1015
- regex : "'|$",
1016
- next : "no_regex"
924
+ token: "string",
925
+ regex: "'|$",
926
+ next: "no_regex"
1017
927
  }, {
1018
928
  defaultToken: "string"
1019
929
  }
1020
930
  ]
1021
931
  };
1022
-
1023
-
1024
932
  if (!options || !options.noES6) {
1025
933
  this.$rules.no_regex.unshift({
1026
- regex: "[{}]", onMatch: function(val, state, stack) {
934
+ regex: "[{}]", onMatch: function (val, state, stack) {
1027
935
  this.next = val == "{" ? this.nextState : "";
1028
936
  if (val == "{" && stack.length) {
1029
937
  stack.unshift("start", state);
@@ -1038,40 +946,60 @@ var JavaScriptHighlightRules = function(options) {
1038
946
  },
1039
947
  nextState: "start"
1040
948
  }, {
1041
- token : "string.quasi.start",
1042
- regex : /`/,
1043
- push : [{
1044
- token : "constant.language.escape",
1045
- regex : escapedRe
1046
- }, {
1047
- token : "paren.quasi.start",
1048
- regex : /\${/,
1049
- push : "start"
1050
- }, {
1051
- token : "string.quasi.end",
1052
- regex : /`/,
1053
- next : "pop"
1054
- }, {
1055
- defaultToken: "string.quasi"
1056
- }]
949
+ token: "string.quasi.start",
950
+ regex: /`/,
951
+ push: [{
952
+ token: "constant.language.escape",
953
+ regex: escapedRe
954
+ }, {
955
+ token: "paren.quasi.start",
956
+ regex: /\${/,
957
+ push: "start"
958
+ }, {
959
+ token: "string.quasi.end",
960
+ regex: /`/,
961
+ next: "pop"
962
+ }, {
963
+ defaultToken: "string.quasi"
964
+ }]
965
+ }, {
966
+ token: ["variable.parameter", "text"],
967
+ regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
968
+ }, {
969
+ token: "paren.lparen",
970
+ regex: "(\\()(?=.+\\s*=>)",
971
+ next: "function_arguments"
972
+ }, {
973
+ token: "variable.language",
974
+ regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
975
+ });
976
+ this.$rules["function_arguments"].unshift({
977
+ token: "keyword.operator",
978
+ regex: "=",
979
+ next: "default_parameter"
980
+ }, {
981
+ token: "keyword.operator",
982
+ regex: "\\.{3}"
983
+ });
984
+ this.$rules["property"].unshift({
985
+ token: "support.function",
986
+ regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
987
+ + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
988
+ }, {
989
+ token: "constant.language",
990
+ regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
1057
991
  });
1058
-
1059
992
  if (!options || options.jsx != false)
1060
993
  JSX.call(this);
1061
994
  }
1062
-
1063
- this.embedRules(DocCommentHighlightRules, "doc-",
1064
- [ DocCommentHighlightRules.getEndRule("no_regex") ]);
1065
-
995
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
1066
996
  this.normalizeRules();
1067
997
  };
1068
-
1069
998
  oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
1070
-
1071
999
  function JSX() {
1072
1000
  var tagRegex = identifierRe.replace("\\d", "\\d\\-");
1073
1001
  var jsxTag = {
1074
- onMatch : function(val, state, stack) {
1002
+ onMatch: function (val, state, stack) {
1075
1003
  var offset = val.charAt(1) == "/" ? 2 : 1;
1076
1004
  if (offset == 1) {
1077
1005
  if (state != this.nextState)
@@ -1079,7 +1007,8 @@ function JSX() {
1079
1007
  else
1080
1008
  stack.unshift(this.next);
1081
1009
  stack[2]++;
1082
- } else if (offset == 2) {
1010
+ }
1011
+ else if (offset == 2) {
1083
1012
  if (state == this.nextState) {
1084
1013
  stack[1]--;
1085
1014
  if (!stack[1] || stack[1] < 0) {
@@ -1089,14 +1018,14 @@ function JSX() {
1089
1018
  }
1090
1019
  }
1091
1020
  return [{
1092
- type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
1093
- value: val.slice(0, offset)
1094
- }, {
1095
- type: "meta.tag.tag-name.xml",
1096
- value: val.substr(offset)
1097
- }];
1021
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
1022
+ value: val.slice(0, offset)
1023
+ }, {
1024
+ type: "meta.tag.tag-name.xml",
1025
+ value: val.substr(offset)
1026
+ }];
1098
1027
  },
1099
- regex : "</?" + tagRegex + "",
1028
+ regex: "</?" + tagRegex + "",
1100
1029
  next: "jsxAttributes",
1101
1030
  nextState: "jsx"
1102
1031
  };
@@ -1109,212 +1038,177 @@ function JSX() {
1109
1038
  this.$rules.jsx = [
1110
1039
  jsxJsRule,
1111
1040
  jsxTag,
1112
- {include : "reference"},
1113
- {defaultToken: "string"}
1041
+ { include: "reference" },
1042
+ { defaultToken: "string" }
1114
1043
  ];
1115
1044
  this.$rules.jsxAttributes = [{
1116
- token : "meta.tag.punctuation.tag-close.xml",
1117
- regex : "/?>",
1118
- onMatch : function(value, currentState, stack) {
1119
- if (currentState == stack[0])
1120
- stack.shift();
1121
- if (value.length == 2) {
1122
- if (stack[0] == this.nextState)
1123
- stack[1]--;
1124
- if (!stack[1] || stack[1] < 0) {
1125
- stack.splice(0, 2);
1045
+ token: "meta.tag.punctuation.tag-close.xml",
1046
+ regex: "/?>",
1047
+ onMatch: function (value, currentState, stack) {
1048
+ if (currentState == stack[0])
1049
+ stack.shift();
1050
+ if (value.length == 2) {
1051
+ if (stack[0] == this.nextState)
1052
+ stack[1]--;
1053
+ if (!stack[1] || stack[1] < 0) {
1054
+ stack.splice(0, 2);
1055
+ }
1126
1056
  }
1127
- }
1128
- this.next = stack[0] || "start";
1129
- return [{type: this.token, value: value}];
1057
+ this.next = stack[0] || "start";
1058
+ return [{ type: this.token, value: value }];
1059
+ },
1060
+ nextState: "jsx"
1130
1061
  },
1131
- nextState: "jsx"
1132
- },
1133
- jsxJsRule,
1134
- comments("jsxAttributes"),
1135
- {
1136
- token : "entity.other.attribute-name.xml",
1137
- regex : tagRegex
1138
- }, {
1139
- token : "keyword.operator.attribute-equals.xml",
1140
- regex : "="
1141
- }, {
1142
- token : "text.tag-whitespace.xml",
1143
- regex : "\\s+"
1144
- }, {
1145
- token : "string.attribute-value.xml",
1146
- regex : "'",
1147
- stateName : "jsx_attr_q",
1148
- push : [
1149
- {token : "string.attribute-value.xml", regex: "'", next: "pop"},
1150
- {include : "reference"},
1151
- {defaultToken : "string.attribute-value.xml"}
1152
- ]
1153
- }, {
1154
- token : "string.attribute-value.xml",
1155
- regex : '"',
1156
- stateName : "jsx_attr_qq",
1157
- push : [
1158
- {token : "string.attribute-value.xml", regex: '"', next: "pop"},
1159
- {include : "reference"},
1160
- {defaultToken : "string.attribute-value.xml"}
1161
- ]
1162
- },
1163
- jsxTag
1062
+ jsxJsRule,
1063
+ comments("jsxAttributes"),
1064
+ {
1065
+ token: "entity.other.attribute-name.xml",
1066
+ regex: tagRegex
1067
+ }, {
1068
+ token: "keyword.operator.attribute-equals.xml",
1069
+ regex: "="
1070
+ }, {
1071
+ token: "text.tag-whitespace.xml",
1072
+ regex: "\\s+"
1073
+ }, {
1074
+ token: "string.attribute-value.xml",
1075
+ regex: "'",
1076
+ stateName: "jsx_attr_q",
1077
+ push: [
1078
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
1079
+ { include: "reference" },
1080
+ { defaultToken: "string.attribute-value.xml" }
1081
+ ]
1082
+ }, {
1083
+ token: "string.attribute-value.xml",
1084
+ regex: '"',
1085
+ stateName: "jsx_attr_qq",
1086
+ push: [
1087
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
1088
+ { include: "reference" },
1089
+ { defaultToken: "string.attribute-value.xml" }
1090
+ ]
1091
+ },
1092
+ jsxTag
1164
1093
  ];
1165
1094
  this.$rules.reference = [{
1166
- token : "constant.language.escape.reference.xml",
1167
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1168
- }];
1095
+ token: "constant.language.escape.reference.xml",
1096
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1097
+ }];
1169
1098
  }
1170
-
1171
1099
  function comments(next) {
1172
1100
  return [
1173
1101
  {
1174
- token : "comment", // multi line comment
1175
- regex : /\/\*/,
1102
+ token: "comment",
1103
+ regex: /\/\*/,
1176
1104
  next: [
1177
1105
  DocCommentHighlightRules.getTagRule(),
1178
- {token : "comment", regex : "\\*\\/", next : next || "pop"},
1179
- {defaultToken : "comment", caseInsensitive: true}
1106
+ { token: "comment", regex: "\\*\\/", next: next || "pop" },
1107
+ { defaultToken: "comment", caseInsensitive: true }
1180
1108
  ]
1181
1109
  }, {
1182
- token : "comment",
1183
- regex : "\\/\\/",
1110
+ token: "comment",
1111
+ regex: "\\/\\/",
1184
1112
  next: [
1185
1113
  DocCommentHighlightRules.getTagRule(),
1186
- {token : "comment", regex : "$|^", next : next || "pop"},
1187
- {defaultToken : "comment", caseInsensitive: true}
1114
+ { token: "comment", regex: "$|^", next: next || "pop" },
1115
+ { defaultToken: "comment", caseInsensitive: true }
1188
1116
  ]
1189
1117
  }
1190
1118
  ];
1191
1119
  }
1192
1120
  exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
1193
- });
1194
1121
 
1195
- ace.define("ace/mode/matching_brace_outdent",[], function(require, exports, module) {
1196
- "use strict";
1122
+ });
1197
1123
 
1124
+ ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
1198
1125
  var Range = require("../range").Range;
1199
-
1200
- var MatchingBraceOutdent = function() {};
1201
-
1202
- (function() {
1203
-
1204
- this.checkOutdent = function(line, input) {
1205
- if (! /^\s+$/.test(line))
1126
+ var MatchingBraceOutdent = function () { };
1127
+ (function () {
1128
+ this.checkOutdent = function (line, input) {
1129
+ if (!/^\s+$/.test(line))
1206
1130
  return false;
1207
-
1208
1131
  return /^\s*\}/.test(input);
1209
1132
  };
1210
-
1211
- this.autoOutdent = function(doc, row) {
1133
+ this.autoOutdent = function (doc, row) {
1212
1134
  var line = doc.getLine(row);
1213
1135
  var match = line.match(/^(\s*\})/);
1214
-
1215
- if (!match) return 0;
1216
-
1136
+ if (!match)
1137
+ return 0;
1217
1138
  var column = match[1].length;
1218
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
1219
-
1220
- if (!openBracePos || openBracePos.row == row) return 0;
1221
-
1139
+ var openBracePos = doc.findMatchingBracket({ row: row, column: column });
1140
+ if (!openBracePos || openBracePos.row == row)
1141
+ return 0;
1222
1142
  var indent = this.$getIndent(doc.getLine(openBracePos.row));
1223
- doc.replace(new Range(row, 0, row, column-1), indent);
1143
+ doc.replace(new Range(row, 0, row, column - 1), indent);
1224
1144
  };
1225
-
1226
- this.$getIndent = function(line) {
1145
+ this.$getIndent = function (line) {
1227
1146
  return line.match(/^\s*/)[0];
1228
1147
  };
1229
-
1230
1148
  }).call(MatchingBraceOutdent.prototype);
1231
-
1232
1149
  exports.MatchingBraceOutdent = MatchingBraceOutdent;
1233
- });
1234
1150
 
1235
- ace.define("ace/mode/folding/cstyle",[], function(require, exports, module) {
1236
- "use strict";
1151
+ });
1237
1152
 
1153
+ 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";
1238
1154
  var oop = require("../../lib/oop");
1239
1155
  var Range = require("../../range").Range;
1240
1156
  var BaseFoldMode = require("./fold_mode").FoldMode;
1241
-
1242
- var FoldMode = exports.FoldMode = function(commentRegex) {
1157
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1243
1158
  if (commentRegex) {
1244
- this.foldingStartMarker = new RegExp(
1245
- this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
1246
- );
1247
- this.foldingStopMarker = new RegExp(
1248
- this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
1249
- );
1159
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1160
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1250
1161
  }
1251
1162
  };
1252
1163
  oop.inherits(FoldMode, BaseFoldMode);
1253
-
1254
- (function() {
1255
-
1164
+ (function () {
1256
1165
  this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1257
1166
  this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1258
- this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
1167
+ this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
1259
1168
  this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1260
1169
  this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1261
1170
  this._getFoldWidgetBase = this.getFoldWidget;
1262
- this.getFoldWidget = function(session, foldStyle, row) {
1171
+ this.getFoldWidget = function (session, foldStyle, row) {
1263
1172
  var line = session.getLine(row);
1264
-
1265
1173
  if (this.singleLineBlockCommentRe.test(line)) {
1266
1174
  if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1267
1175
  return "";
1268
1176
  }
1269
-
1270
1177
  var fw = this._getFoldWidgetBase(session, foldStyle, row);
1271
-
1272
1178
  if (!fw && this.startRegionRe.test(line))
1273
1179
  return "start"; // lineCommentRegionStart
1274
-
1275
1180
  return fw;
1276
1181
  };
1277
-
1278
- this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
1182
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1279
1183
  var line = session.getLine(row);
1280
-
1281
1184
  if (this.startRegionRe.test(line))
1282
1185
  return this.getCommentRegionBlock(session, line, row);
1283
-
1284
1186
  var match = line.match(this.foldingStartMarker);
1285
1187
  if (match) {
1286
1188
  var i = match.index;
1287
-
1288
1189
  if (match[1])
1289
1190
  return this.openingBracketBlock(session, match[1], row, i);
1290
-
1291
1191
  var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1292
-
1293
1192
  if (range && !range.isMultiLine()) {
1294
1193
  if (forceMultiline) {
1295
1194
  range = this.getSectionRange(session, row);
1296
- } else if (foldStyle != "all")
1195
+ }
1196
+ else if (foldStyle != "all")
1297
1197
  range = null;
1298
1198
  }
1299
-
1300
1199
  return range;
1301
1200
  }
1302
-
1303
1201
  if (foldStyle === "markbegin")
1304
1202
  return;
1305
-
1306
1203
  var match = line.match(this.foldingStopMarker);
1307
1204
  if (match) {
1308
1205
  var i = match.index + match[0].length;
1309
-
1310
1206
  if (match[1])
1311
1207
  return this.closingBracketBlock(session, match[1], row, i);
1312
-
1313
1208
  return session.getCommentFoldRange(row, i, -1);
1314
1209
  }
1315
1210
  };
1316
-
1317
- this.getSectionRange = function(session, row) {
1211
+ this.getSectionRange = function (session, row) {
1318
1212
  var line = session.getLine(row);
1319
1213
  var startIndent = line.search(/\S/);
1320
1214
  var startRow = row;
@@ -1327,54 +1221,52 @@ oop.inherits(FoldMode, BaseFoldMode);
1327
1221
  var indent = line.search(/\S/);
1328
1222
  if (indent === -1)
1329
1223
  continue;
1330
- if (startIndent > indent)
1224
+ if (startIndent > indent)
1331
1225
  break;
1332
1226
  var subRange = this.getFoldWidgetRange(session, "all", row);
1333
-
1334
1227
  if (subRange) {
1335
1228
  if (subRange.start.row <= startRow) {
1336
1229
  break;
1337
- } else if (subRange.isMultiLine()) {
1230
+ }
1231
+ else if (subRange.isMultiLine()) {
1338
1232
  row = subRange.end.row;
1339
- } else if (startIndent == indent) {
1233
+ }
1234
+ else if (startIndent == indent) {
1340
1235
  break;
1341
1236
  }
1342
1237
  }
1343
1238
  endRow = row;
1344
1239
  }
1345
-
1346
1240
  return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1347
1241
  };
1348
- this.getCommentRegionBlock = function(session, line, row) {
1242
+ this.getCommentRegionBlock = function (session, line, row) {
1349
1243
  var startColumn = line.search(/\s*$/);
1350
1244
  var maxRow = session.getLength();
1351
1245
  var startRow = row;
1352
-
1353
1246
  var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1354
1247
  var depth = 1;
1355
1248
  while (++row < maxRow) {
1356
1249
  line = session.getLine(row);
1357
1250
  var m = re.exec(line);
1358
- if (!m) continue;
1359
- if (m[1]) depth--;
1360
- else depth++;
1361
-
1362
- if (!depth) break;
1251
+ if (!m)
1252
+ continue;
1253
+ if (m[1])
1254
+ depth--;
1255
+ else
1256
+ depth++;
1257
+ if (!depth)
1258
+ break;
1363
1259
  }
1364
-
1365
1260
  var endRow = row;
1366
1261
  if (endRow > startRow) {
1367
1262
  return new Range(startRow, startColumn, endRow, line.length);
1368
1263
  }
1369
1264
  };
1370
-
1371
1265
  }).call(FoldMode.prototype);
1372
1266
 
1373
1267
  });
1374
1268
 
1375
- ace.define("ace/mode/javascript",[], function(require, exports, module) {
1376
- "use strict";
1377
-
1269
+ 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";
1378
1270
  var oop = require("../lib/oop");
1379
1271
  var TextMode = require("./text").Mode;
1380
1272
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
@@ -1382,39 +1274,35 @@ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutd
1382
1274
  var WorkerClient = require("../worker/worker_client").WorkerClient;
1383
1275
  var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1384
1276
  var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1385
-
1386
- var Mode = function() {
1277
+ var Mode = function () {
1387
1278
  this.HighlightRules = JavaScriptHighlightRules;
1388
-
1389
1279
  this.$outdent = new MatchingBraceOutdent();
1390
1280
  this.$behaviour = new CstyleBehaviour();
1391
1281
  this.foldingRules = new CStyleFoldMode();
1392
1282
  };
1393
1283
  oop.inherits(Mode, TextMode);
1394
-
1395
- (function() {
1396
-
1284
+ (function () {
1397
1285
  this.lineCommentStart = "//";
1398
- this.blockComment = {start: "/*", end: "*/"};
1399
- this.$quotes = {'"': '"', "'": "'", "`": "`"};
1400
-
1401
- this.getNextLineIndent = function(state, line, tab) {
1286
+ this.blockComment = { start: "/*", end: "*/" };
1287
+ this.$quotes = { '"': '"', "'": "'", "`": "`" };
1288
+ this.$pairQuotesAfter = {
1289
+ "`": /\w/
1290
+ };
1291
+ this.getNextLineIndent = function (state, line, tab) {
1402
1292
  var indent = this.$getIndent(line);
1403
-
1404
1293
  var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
1405
1294
  var tokens = tokenizedLine.tokens;
1406
1295
  var endState = tokenizedLine.state;
1407
-
1408
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
1296
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1409
1297
  return indent;
1410
1298
  }
1411
-
1412
1299
  if (state == "start" || state == "no_regex") {
1413
1300
  var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1414
1301
  if (match) {
1415
1302
  indent += tab;
1416
1303
  }
1417
- } else if (state == "doc-start") {
1304
+ }
1305
+ else if (state == "doc-start") {
1418
1306
  if (endState == "start" || endState == "no_regex") {
1419
1307
  return "";
1420
1308
  }
@@ -1426,77 +1314,57 @@ oop.inherits(Mode, TextMode);
1426
1314
  indent += "* ";
1427
1315
  }
1428
1316
  }
1429
-
1430
1317
  return indent;
1431
1318
  };
1432
-
1433
- this.checkOutdent = function(state, line, input) {
1319
+ this.checkOutdent = function (state, line, input) {
1434
1320
  return this.$outdent.checkOutdent(line, input);
1435
1321
  };
1436
-
1437
- this.autoOutdent = function(state, doc, row) {
1322
+ this.autoOutdent = function (state, doc, row) {
1438
1323
  this.$outdent.autoOutdent(doc, row);
1439
1324
  };
1440
-
1441
- this.createWorker = function(session) {
1325
+ this.createWorker = function (session) {
1442
1326
  var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
1443
1327
  worker.attachToDocument(session.getDocument());
1444
-
1445
- worker.on("annotate", function(results) {
1328
+ worker.on("annotate", function (results) {
1446
1329
  session.setAnnotations(results.data);
1447
1330
  });
1448
-
1449
- worker.on("terminate", function() {
1331
+ worker.on("terminate", function () {
1450
1332
  session.clearAnnotations();
1451
1333
  });
1452
-
1453
1334
  return worker;
1454
1335
  };
1455
-
1456
1336
  this.$id = "ace/mode/javascript";
1457
1337
  this.snippetFileId = "ace/snippets/javascript";
1458
1338
  }).call(Mode.prototype);
1459
-
1460
1339
  exports.Mode = Mode;
1461
- });
1462
1340
 
1463
- ace.define("ace/mode/svg_highlight_rules",[], function(require, exports, module) {
1464
- "use strict";
1341
+ });
1465
1342
 
1343
+ ace.define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict";
1466
1344
  var oop = require("../lib/oop");
1467
1345
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1468
1346
  var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1469
-
1470
- var SvgHighlightRules = function() {
1347
+ var SvgHighlightRules = function () {
1471
1348
  XmlHighlightRules.call(this);
1472
-
1473
1349
  this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
1474
-
1475
1350
  this.normalizeRules();
1476
1351
  };
1477
-
1478
1352
  oop.inherits(SvgHighlightRules, XmlHighlightRules);
1479
-
1480
1353
  exports.SvgHighlightRules = SvgHighlightRules;
1481
- });
1482
1354
 
1483
- ace.define("ace/mode/folding/mixed",[], function(require, exports, module) {
1484
- "use strict";
1355
+ });
1485
1356
 
1357
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1486
1358
  var oop = require("../../lib/oop");
1487
1359
  var BaseFoldMode = require("./fold_mode").FoldMode;
1488
-
1489
- var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
1360
+ var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
1490
1361
  this.defaultMode = defaultMode;
1491
1362
  this.subModes = subModes;
1492
1363
  };
1493
1364
  oop.inherits(FoldMode, BaseFoldMode);
1494
-
1495
- (function() {
1496
-
1497
-
1498
- this.$getMode = function(state) {
1499
- if (typeof state != "string")
1365
+ (function () {
1366
+ this.$getMode = function (state) {
1367
+ if (typeof state != "string")
1500
1368
  state = state[0];
1501
1369
  for (var key in this.subModes) {
1502
1370
  if (state.indexOf(key) === 0)
@@ -1504,39 +1372,28 @@ oop.inherits(FoldMode, BaseFoldMode);
1504
1372
  }
1505
1373
  return null;
1506
1374
  };
1507
-
1508
- this.$tryMode = function(state, session, foldStyle, row) {
1375
+ this.$tryMode = function (state, session, foldStyle, row) {
1509
1376
  var mode = this.$getMode(state);
1510
1377
  return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1511
1378
  };
1512
-
1513
- this.getFoldWidget = function(session, foldStyle, row) {
1514
- return (
1515
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
1379
+ this.getFoldWidget = function (session, foldStyle, row) {
1380
+ return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
1516
1381
  this.$tryMode(session.getState(row), session, foldStyle, row) ||
1517
- this.defaultMode.getFoldWidget(session, foldStyle, row)
1518
- );
1382
+ this.defaultMode.getFoldWidget(session, foldStyle, row));
1519
1383
  };
1520
-
1521
- this.getFoldWidgetRange = function(session, foldStyle, row) {
1522
- var mode = this.$getMode(session.getState(row-1));
1523
-
1384
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1385
+ var mode = this.$getMode(session.getState(row - 1));
1524
1386
  if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1525
1387
  mode = this.$getMode(session.getState(row));
1526
-
1527
1388
  if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1528
1389
  mode = this.defaultMode;
1529
-
1530
1390
  return mode.getFoldWidgetRange(session, foldStyle, row);
1531
1391
  };
1532
-
1533
1392
  }).call(FoldMode.prototype);
1534
1393
 
1535
1394
  });
1536
1395
 
1537
- ace.define("ace/mode/svg",[], function(require, exports, module) {
1538
- "use strict";
1539
-
1396
+ ace.define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1540
1397
  var oop = require("../lib/oop");
1541
1398
  var XmlMode = require("./xml").Mode;
1542
1399
  var JavaScriptMode = require("./javascript").Mode;
@@ -1544,34 +1401,25 @@ var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
1544
1401
  var MixedFoldMode = require("./folding/mixed").FoldMode;
1545
1402
  var XmlFoldMode = require("./folding/xml").FoldMode;
1546
1403
  var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1547
-
1548
- var Mode = function() {
1404
+ var Mode = function () {
1549
1405
  XmlMode.call(this);
1550
-
1551
1406
  this.HighlightRules = SvgHighlightRules;
1552
-
1553
1407
  this.createModeDelegates({
1554
1408
  "js-": JavaScriptMode
1555
1409
  });
1556
-
1557
1410
  this.foldingRules = new MixedFoldMode(new XmlFoldMode(), {
1558
1411
  "js-": new CStyleFoldMode()
1559
1412
  });
1560
1413
  };
1561
-
1562
1414
  oop.inherits(Mode, XmlMode);
1563
-
1564
- (function() {
1565
-
1566
- this.getNextLineIndent = function(state, line, tab) {
1415
+ (function () {
1416
+ this.getNextLineIndent = function (state, line, tab) {
1567
1417
  return this.$getIndent(line);
1568
1418
  };
1569
-
1570
-
1571
1419
  this.$id = "ace/mode/svg";
1572
1420
  }).call(Mode.prototype);
1573
-
1574
1421
  exports.Mode = Mode;
1422
+
1575
1423
  }); (function() {
1576
1424
  ace.require(["ace/mode/svg"], function(m) {
1577
1425
  if (typeof module == "object" && typeof exports == "object" && module) {