@openui5/sap.ui.codeeditor 1.132.1 → 1.134.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/.reuse/dep5 +2 -9
  2. package/LICENSES/LicenseRef-Unicode-3.0.txt +39 -0
  3. package/THIRDPARTY.txt +45 -78
  4. package/package.json +2 -2
  5. package/src/sap/ui/codeeditor/.library +2 -2
  6. package/src/sap/ui/codeeditor/CodeEditor.js +4 -4
  7. package/src/sap/ui/codeeditor/js/ace/ace.js +6564 -6162
  8. package/src/sap/ui/codeeditor/js/ace/css/ace.css +55 -23
  9. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-1.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/github_light_default-2.png +0 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/main-10.svg +4 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/main-11.svg +5 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/main-12.svg +4 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/main-24.png +0 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/main-25.svg +1 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/main-26.png +0 -0
  28. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +8 -6
  29. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +4 -6
  30. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +8 -3
  31. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +5 -3
  32. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor.css +221 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud_editor_dark.css +224 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/theme/github_light_default.css +164 -0
  35. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +2 -2
  36. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +0 -0
  37. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +1 -6
  38. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +4 -2
  39. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +0 -0
  40. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +24 -6
  41. package/src/sap/ui/codeeditor/js/ace/ext-error_marker.js +0 -0
  42. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +198 -87
  43. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +8 -5
  44. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +180 -79
  45. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +0 -0
  46. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +7 -3
  47. package/src/sap/ui/codeeditor/js/ace/ext-options.js +12 -5
  48. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +202 -116
  49. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +0 -0
  50. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +14 -12
  51. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +12 -5
  52. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +0 -0
  53. package/src/sap/ui/codeeditor/js/ace/ext-split.js +2 -1
  54. package/src/sap/ui/codeeditor/js/ace/ext-static_highlight.js +0 -0
  55. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +0 -0
  56. package/src/sap/ui/codeeditor/js/ace/ext-textarea.js +476 -3
  57. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +6 -2
  58. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +0 -0
  59. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +13 -6
  60. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +748 -373
  61. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +0 -0
  64. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +3 -3
  65. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +0 -0
  66. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +6 -6
  67. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +3 -3
  68. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +3 -3
  69. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +0 -0
  70. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +14 -14
  71. package/src/sap/ui/codeeditor/js/ace/mode-assembly_arm32.js +185 -0
  72. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +0 -0
  73. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +377 -317
  74. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +0 -0
  75. package/src/sap/ui/codeeditor/js/ace/mode-basic.js +201 -0
  76. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +0 -0
  77. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +1 -1
  78. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +13 -13
  79. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +0 -0
  80. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +13 -13
  81. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +3 -3
  82. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +0 -0
  83. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +377 -317
  84. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +6 -6
  85. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +9 -9
  86. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +75 -78
  87. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +22 -22
  88. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +0 -0
  89. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +0 -0
  90. package/src/sap/ui/codeeditor/js/ace/mode-css.js +6 -3
  91. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +377 -317
  92. package/src/sap/ui/codeeditor/js/ace/mode-d.js +12 -12
  93. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +17 -17
  94. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +0 -0
  95. package/src/sap/ui/codeeditor/js/ace/mode-django.js +377 -317
  96. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +3 -3
  97. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +6 -6
  98. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +18 -18
  99. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +4 -4
  100. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +4 -4
  101. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +402 -342
  102. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +0 -0
  103. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +0 -0
  104. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +15 -15
  105. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +7 -7
  106. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +0 -0
  107. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +12 -12
  108. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +0 -0
  109. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +54 -57
  110. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +4 -4
  111. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +3 -3
  112. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +1 -1
  113. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +13 -13
  114. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +371 -65
  115. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +10 -10
  116. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +0 -0
  117. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +381 -75
  118. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +84 -87
  119. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +379 -319
  120. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +0 -0
  121. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +1 -1
  122. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +10 -10
  123. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +0 -0
  124. package/src/sap/ui/codeeditor/js/ace/mode-html.js +377 -317
  125. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +472 -412
  126. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +484 -424
  127. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +0 -0
  128. package/src/sap/ui/codeeditor/js/ace/mode-io.js +0 -0
  129. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +2 -2
  130. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +67 -70
  131. package/src/sap/ui/codeeditor/js/ace/mode-java.js +383 -77
  132. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +371 -65
  133. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +7 -7
  134. package/src/sap/ui/codeeditor/js/ace/mode-json.js +8 -8
  135. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +8 -8
  136. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +4 -5
  137. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +67 -70
  138. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +0 -0
  139. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +960 -89
  140. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +0 -0
  141. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +0 -0
  142. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +0 -0
  143. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +381 -321
  144. package/src/sap/ui/codeeditor/js/ace/mode-less.js +12 -9
  145. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +385 -325
  146. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +2 -2
  147. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +0 -0
  148. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +0 -0
  149. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +6 -9
  150. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +0 -0
  151. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +5 -5
  152. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +382 -322
  153. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +0 -0
  154. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +3 -3
  155. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +474 -414
  156. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +53 -56
  157. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +1 -1
  158. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +0 -0
  159. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +0 -0
  160. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +1 -1
  161. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +0 -0
  162. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +7 -7
  163. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +7 -7
  164. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +16 -16
  165. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +0 -0
  166. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +379 -319
  167. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +15 -15
  168. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +7 -7
  169. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +10 -10
  170. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +0 -0
  171. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +6 -6
  172. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +98 -104
  173. package/src/sap/ui/codeeditor/js/ace/mode-php.js +797 -616
  174. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +797 -616
  175. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +0 -0
  176. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +0 -0
  177. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +3 -3
  178. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +6 -6
  179. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +0 -0
  180. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +0 -0
  181. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +0 -0
  182. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +18 -18
  183. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +7 -4
  184. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +0 -0
  185. package/src/sap/ui/codeeditor/js/ace/mode-python.js +17 -17
  186. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +5 -5
  187. package/src/sap/ui/codeeditor/js/ace/mode-r.js +13 -13
  188. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +8 -8
  189. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +386 -326
  190. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +6 -6
  191. package/src/sap/ui/codeeditor/js/ace/mode-red.js +0 -0
  192. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +32 -32
  193. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +390 -330
  194. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +0 -0
  195. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +25 -25
  196. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +39 -32
  197. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +13 -13
  198. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +14 -11
  199. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +14 -14
  200. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +381 -75
  201. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +2 -2
  202. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +10 -10
  203. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +14 -11
  204. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +3 -3
  205. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +371 -65
  206. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +521 -461
  207. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +377 -317
  208. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +0 -0
  209. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +377 -317
  210. package/src/sap/ui/codeeditor/js/ace/mode-space.js +0 -0
  211. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +0 -0
  212. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +12 -6
  213. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +5 -5
  214. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +10 -7
  215. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +132 -75
  216. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +5 -4
  217. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +7 -7
  218. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +0 -0
  219. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +6 -6
  220. package/src/sap/ui/codeeditor/js/ace/mode-text.js +0 -0
  221. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +0 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +0 -0
  223. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +492 -182
  224. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +0 -0
  225. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +379 -319
  226. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +371 -65
  227. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +0 -0
  228. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +0 -0
  229. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +387 -327
  230. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +1 -1
  231. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +4 -4
  232. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +377 -317
  233. package/src/sap/ui/codeeditor/js/ace/mode-vue.js +3834 -0
  234. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +382 -76
  235. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +18 -10
  236. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +4 -5
  237. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +5 -5
  238. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +2 -2
  239. package/src/sap/ui/codeeditor/js/ace/mode-zig.js +585 -0
  240. package/src/sap/ui/codeeditor/js/ace/snippets/abap.js +0 -0
  241. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +0 -0
  242. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +0 -0
  243. package/src/sap/ui/codeeditor/js/ace/snippets/ada.js +0 -0
  244. package/src/sap/ui/codeeditor/js/ace/snippets/apache_conf.js +0 -0
  245. package/src/sap/ui/codeeditor/js/ace/snippets/applescript.js +0 -0
  246. package/src/sap/ui/codeeditor/js/ace/snippets/asciidoc.js +0 -0
  247. package/src/sap/ui/codeeditor/js/ace/snippets/asl.js +0 -0
  248. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_arm32.js +9 -0
  249. package/src/sap/ui/codeeditor/js/ace/snippets/assembly_x86.js +0 -0
  250. package/src/sap/ui/codeeditor/js/ace/snippets/autohotkey.js +0 -0
  251. package/src/sap/ui/codeeditor/js/ace/snippets/basic.js +9 -0
  252. package/src/sap/ui/codeeditor/js/ace/snippets/batchfile.js +0 -0
  253. package/src/sap/ui/codeeditor/js/ace/snippets/c9search.js +0 -0
  254. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +0 -0
  255. package/src/sap/ui/codeeditor/js/ace/snippets/cirru.js +0 -0
  256. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +0 -0
  257. package/src/sap/ui/codeeditor/js/ace/snippets/cobol.js +0 -0
  258. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +0 -0
  259. package/src/sap/ui/codeeditor/js/ace/snippets/coldfusion.js +0 -0
  260. package/src/sap/ui/codeeditor/js/ace/snippets/csharp.js +0 -0
  261. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +0 -0
  262. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +0 -0
  263. package/src/sap/ui/codeeditor/js/ace/snippets/csound_score.js +0 -0
  264. package/src/sap/ui/codeeditor/js/ace/snippets/csp.js +0 -0
  265. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +0 -0
  266. package/src/sap/ui/codeeditor/js/ace/snippets/curly.js +0 -0
  267. package/src/sap/ui/codeeditor/js/ace/snippets/d.js +0 -0
  268. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +0 -0
  269. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +0 -0
  270. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +0 -0
  271. package/src/sap/ui/codeeditor/js/ace/snippets/dockerfile.js +0 -0
  272. package/src/sap/ui/codeeditor/js/ace/snippets/dot.js +0 -0
  273. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +0 -0
  274. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +0 -0
  275. package/src/sap/ui/codeeditor/js/ace/snippets/eiffel.js +0 -0
  276. package/src/sap/ui/codeeditor/js/ace/snippets/ejs.js +0 -0
  277. package/src/sap/ui/codeeditor/js/ace/snippets/elixir.js +0 -0
  278. package/src/sap/ui/codeeditor/js/ace/snippets/elm.js +0 -0
  279. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +0 -0
  280. package/src/sap/ui/codeeditor/js/ace/snippets/forth.js +0 -0
  281. package/src/sap/ui/codeeditor/js/ace/snippets/fortran.js +0 -0
  282. package/src/sap/ui/codeeditor/js/ace/snippets/fsharp.js +0 -0
  283. package/src/sap/ui/codeeditor/js/ace/snippets/ftl.js +0 -0
  284. package/src/sap/ui/codeeditor/js/ace/snippets/gcode.js +0 -0
  285. package/src/sap/ui/codeeditor/js/ace/snippets/gherkin.js +0 -0
  286. package/src/sap/ui/codeeditor/js/ace/snippets/gitignore.js +0 -0
  287. package/src/sap/ui/codeeditor/js/ace/snippets/glsl.js +0 -0
  288. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +0 -0
  289. package/src/sap/ui/codeeditor/js/ace/snippets/golang.js +0 -0
  290. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +0 -0
  291. package/src/sap/ui/codeeditor/js/ace/snippets/groovy.js +0 -0
  292. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +0 -0
  293. package/src/sap/ui/codeeditor/js/ace/snippets/handlebars.js +0 -0
  294. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +0 -0
  295. package/src/sap/ui/codeeditor/js/ace/snippets/haskell_cabal.js +0 -0
  296. package/src/sap/ui/codeeditor/js/ace/snippets/haxe.js +0 -0
  297. package/src/sap/ui/codeeditor/js/ace/snippets/hjson.js +0 -0
  298. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +0 -0
  299. package/src/sap/ui/codeeditor/js/ace/snippets/html_elixir.js +0 -0
  300. package/src/sap/ui/codeeditor/js/ace/snippets/html_ruby.js +0 -0
  301. package/src/sap/ui/codeeditor/js/ace/snippets/ini.js +0 -0
  302. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +0 -0
  303. package/src/sap/ui/codeeditor/js/ace/snippets/jack.js +0 -0
  304. package/src/sap/ui/codeeditor/js/ace/snippets/jade.js +0 -0
  305. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +0 -0
  306. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +0 -0
  307. package/src/sap/ui/codeeditor/js/ace/snippets/json.js +0 -0
  308. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +0 -0
  309. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +0 -0
  310. package/src/sap/ui/codeeditor/js/ace/snippets/jssm.js +0 -0
  311. package/src/sap/ui/codeeditor/js/ace/snippets/jsx.js +0 -0
  312. package/src/sap/ui/codeeditor/js/ace/snippets/julia.js +0 -0
  313. package/src/sap/ui/codeeditor/js/ace/snippets/kotlin.js +0 -0
  314. package/src/sap/ui/codeeditor/js/ace/snippets/latex.js +0 -0
  315. package/src/sap/ui/codeeditor/js/ace/snippets/less.js +0 -0
  316. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +0 -0
  317. package/src/sap/ui/codeeditor/js/ace/snippets/lisp.js +0 -0
  318. package/src/sap/ui/codeeditor/js/ace/snippets/livescript.js +0 -0
  319. package/src/sap/ui/codeeditor/js/ace/snippets/logiql.js +0 -0
  320. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +0 -0
  321. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +0 -0
  322. package/src/sap/ui/codeeditor/js/ace/snippets/luapage.js +0 -0
  323. package/src/sap/ui/codeeditor/js/ace/snippets/lucene.js +0 -0
  324. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +0 -0
  325. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +0 -0
  326. package/src/sap/ui/codeeditor/js/ace/snippets/mask.js +0 -0
  327. package/src/sap/ui/codeeditor/js/ace/snippets/matlab.js +0 -0
  328. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +0 -0
  329. package/src/sap/ui/codeeditor/js/ace/snippets/mel.js +0 -0
  330. package/src/sap/ui/codeeditor/js/ace/snippets/mixal.js +0 -0
  331. package/src/sap/ui/codeeditor/js/ace/snippets/mushcode.js +0 -0
  332. package/src/sap/ui/codeeditor/js/ace/snippets/mysql.js +0 -0
  333. package/src/sap/ui/codeeditor/js/ace/snippets/nix.js +0 -0
  334. package/src/sap/ui/codeeditor/js/ace/snippets/nsis.js +0 -0
  335. package/src/sap/ui/codeeditor/js/ace/snippets/objectivec.js +0 -0
  336. package/src/sap/ui/codeeditor/js/ace/snippets/ocaml.js +0 -0
  337. package/src/sap/ui/codeeditor/js/ace/snippets/pascal.js +0 -0
  338. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +0 -0
  339. package/src/sap/ui/codeeditor/js/ace/snippets/pgsql.js +0 -0
  340. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +0 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/php_laravel_blade.js +0 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/pig.js +0 -0
  343. package/src/sap/ui/codeeditor/js/ace/snippets/plain_text.js +0 -0
  344. package/src/sap/ui/codeeditor/js/ace/snippets/powershell.js +0 -0
  345. package/src/sap/ui/codeeditor/js/ace/snippets/praat.js +0 -0
  346. package/src/sap/ui/codeeditor/js/ace/snippets/prolog.js +0 -0
  347. package/src/sap/ui/codeeditor/js/ace/snippets/properties.js +0 -0
  348. package/src/sap/ui/codeeditor/js/ace/snippets/protobuf.js +0 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/puppet.js +0 -0
  350. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +0 -0
  351. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +0 -0
  352. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +0 -0
  353. package/src/sap/ui/codeeditor/js/ace/snippets/rdoc.js +0 -0
  354. package/src/sap/ui/codeeditor/js/ace/snippets/red.js +0 -0
  355. package/src/sap/ui/codeeditor/js/ace/snippets/redshift.js +0 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/rhtml.js +0 -0
  357. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +0 -0
  358. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +0 -0
  359. package/src/sap/ui/codeeditor/js/ace/snippets/rust.js +0 -0
  360. package/src/sap/ui/codeeditor/js/ace/snippets/sass.js +0 -0
  361. package/src/sap/ui/codeeditor/js/ace/snippets/scad.js +0 -0
  362. package/src/sap/ui/codeeditor/js/ace/snippets/scala.js +0 -0
  363. package/src/sap/ui/codeeditor/js/ace/snippets/scheme.js +0 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/scss.js +0 -0
  365. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +0 -0
  366. package/src/sap/ui/codeeditor/js/ace/snippets/sjs.js +0 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/slim.js +0 -0
  368. package/src/sap/ui/codeeditor/js/ace/snippets/smarty.js +0 -0
  369. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +0 -0
  370. package/src/sap/ui/codeeditor/js/ace/snippets/soy_template.js +0 -0
  371. package/src/sap/ui/codeeditor/js/ace/snippets/space.js +0 -0
  372. package/src/sap/ui/codeeditor/js/ace/snippets/sparql.js +0 -0
  373. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +0 -0
  374. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +0 -0
  375. package/src/sap/ui/codeeditor/js/ace/snippets/stylus.js +0 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/svg.js +0 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/swift.js +0 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +0 -0
  379. package/src/sap/ui/codeeditor/js/ace/snippets/terraform.js +0 -0
  380. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +0 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/text.js +0 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +0 -0
  383. package/src/sap/ui/codeeditor/js/ace/snippets/toml.js +0 -0
  384. package/src/sap/ui/codeeditor/js/ace/snippets/tsx.js +0 -0
  385. package/src/sap/ui/codeeditor/js/ace/snippets/turtle.js +0 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/twig.js +0 -0
  387. package/src/sap/ui/codeeditor/js/ace/snippets/typescript.js +0 -0
  388. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +0 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/vbscript.js +0 -0
  390. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +0 -0
  391. package/src/sap/ui/codeeditor/js/ace/snippets/verilog.js +0 -0
  392. package/src/sap/ui/codeeditor/js/ace/snippets/vhdl.js +0 -0
  393. package/src/sap/ui/codeeditor/js/ace/snippets/vue.js +9 -0
  394. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +0 -0
  395. package/src/sap/ui/codeeditor/js/ace/snippets/xml.js +0 -0
  396. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +0 -0
  397. package/src/sap/ui/codeeditor/js/ace/snippets/yaml.js +0 -0
  398. package/src/sap/ui/codeeditor/js/ace/snippets/zig.js +9 -0
  399. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +0 -0
  400. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +0 -0
  401. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +0 -0
  402. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor.js +18 -0
  403. package/src/sap/ui/codeeditor/js/ace/theme-cloud_editor_dark.js +18 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +0 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +0 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +0 -0
  407. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +0 -0
  408. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +0 -0
  409. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +0 -0
  410. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +0 -0
  411. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +0 -0
  412. package/src/sap/ui/codeeditor/js/ace/theme-github.js +0 -0
  413. package/src/sap/ui/codeeditor/js/ace/theme-github_light_default.js +18 -0
  414. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +0 -0
  415. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +0 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +0 -0
  417. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +0 -0
  418. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +0 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +0 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +0 -0
  421. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +0 -0
  422. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +0 -0
  423. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +0 -0
  424. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +0 -0
  425. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +0 -0
  426. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +1 -1
  427. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +0 -0
  428. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +0 -0
  429. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +0 -0
  430. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +0 -0
  431. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +0 -0
  432. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +0 -0
  433. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +0 -0
  434. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +0 -0
  435. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +0 -0
  436. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +0 -0
  437. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +0 -0
  438. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +0 -0
  439. package/src/sap/ui/codeeditor/js/ace/worker-base.js +3 -13
  440. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +3 -13
  441. package/src/sap/ui/codeeditor/js/ace/worker-css.js +3 -13
  442. package/src/sap/ui/codeeditor/js/ace/worker-html.js +3 -13
  443. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +3 -13
  444. package/src/sap/ui/codeeditor/js/ace/worker-json.js +3 -13
  445. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +3 -13
  446. package/src/sap/ui/codeeditor/js/ace/worker-php.js +3 -13
  447. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +8 -15
  448. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +3 -13
  449. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +6 -16
  450. package/src/sap/ui/codeeditor/library.js +2 -2
  451. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
  452. package/LICENSES/Unicode-DFS-2015.txt +0 -51
@@ -74,7 +74,7 @@ var CssHighlightRules = function () {
74
74
  + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
75
75
  }],
76
76
  "comments": [{
77
- token: "comment",
77
+ token: "comment", // multi line comment
78
78
  regex: "\\/\\*",
79
79
  push: [{
80
80
  token: "comment",
@@ -103,10 +103,10 @@ var CssHighlightRules = function () {
103
103
  token: "constant.numeric",
104
104
  regex: numRe
105
105
  }, {
106
- token: "constant.numeric",
106
+ token: "constant.numeric", // hex6 color
107
107
  regex: "#[a-f0-9]{6}"
108
108
  }, {
109
- token: "constant.numeric",
109
+ token: "constant.numeric", // hex3 color
110
110
  regex: "#[a-f0-9]{3}"
111
111
  }, {
112
112
  token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
@@ -119,6 +119,9 @@ var CssHighlightRules = function () {
119
119
  }, {
120
120
  token: keywordMapper,
121
121
  regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
122
+ }, {
123
+ token: "paren.lparen",
124
+ regex: "\\{"
122
125
  }, {
123
126
  caseInsensitive: true
124
127
  }],
@@ -202,7 +205,7 @@ var JsDocCommentHighlightRules = function () {
202
205
  ]
203
206
  }, {
204
207
  token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
205
- regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
208
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
206
209
  next: "pop"
207
210
  }, {
208
211
  token: "rparen.doc",
@@ -262,7 +265,7 @@ var JsDocCommentHighlightRules = function () {
262
265
  },
263
266
  JsDocCommentHighlightRules.getTagRule(),
264
267
  {
265
- defaultToken: "comment.doc",
268
+ defaultToken: "comment.doc.body",
266
269
  caseInsensitive: true
267
270
  }
268
271
  ],
@@ -285,14 +288,14 @@ JsDocCommentHighlightRules.getTagRule = function (start) {
285
288
  };
286
289
  JsDocCommentHighlightRules.getStartRule = function (start) {
287
290
  return {
288
- token: "comment.doc",
289
- regex: "\\/\\*(?=\\*)",
291
+ token: "comment.doc", // doc comment
292
+ regex: /\/\*\*(?!\/)/,
290
293
  next: start
291
294
  };
292
295
  };
293
296
  JsDocCommentHighlightRules.getEndRule = function (start) {
294
297
  return {
295
- token: "comment.doc",
298
+ token: "comment.doc", // closing comment
296
299
  regex: "\\*\\/",
297
300
  next: start
298
301
  };
@@ -307,7 +310,7 @@ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocC
307
310
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
308
311
  var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
309
312
  var JavaScriptHighlightRules = function (options) {
310
- var keywordMapper = this.createKeywordMapper({
313
+ var keywords = {
311
314
  "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
312
315
  "Namespace|QName|XML|XMLList|" + // E4X
313
316
  "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
@@ -317,9 +320,9 @@ var JavaScriptHighlightRules = function (options) {
317
320
  "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
318
321
  "isNaN|parseFloat|parseInt|" +
319
322
  "JSON|Math|" + // Other
320
- "this|arguments|prototype|window|document",
323
+ "this|arguments|prototype|window|document", // Pseudo
321
324
  "keyword": "const|yield|import|get|set|async|await|" +
322
- "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
325
+ "break|case|catch|continue|default|delete|do|else|finally|for|" +
323
326
  "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
324
327
  "__parent__|__count__|escape|unescape|with|__proto__|" +
325
328
  "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
@@ -327,7 +330,8 @@ var JavaScriptHighlightRules = function (options) {
327
330
  "constant.language": "null|Infinity|NaN|undefined",
328
331
  "support.function": "alert",
329
332
  "constant.language.boolean": "true|false"
330
- }, "identifier");
333
+ };
334
+ var keywordMapper = this.createKeywordMapper(keywords, "identifier");
331
335
  var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
332
336
  var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
333
337
  "u[0-9a-fA-F]{4}|" + // unicode
@@ -336,10 +340,16 @@ var JavaScriptHighlightRules = function (options) {
336
340
  "3[0-7][0-7]?|" + // oct
337
341
  "[4-7][0-7]?|" + //oct
338
342
  ".)";
343
+ var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
344
+ var functionCallStartRule = {
345
+ token: ["identifier", "text", "paren.lparen"],
346
+ regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
347
+ };
339
348
  this.$rules = {
340
349
  "no_regex": [
341
350
  DocCommentHighlightRules.getStartRule("doc-start"),
342
351
  comments("no_regex"),
352
+ functionCallStartRule,
343
353
  {
344
354
  token: "string",
345
355
  regex: "'(?=.)",
@@ -349,58 +359,36 @@ var JavaScriptHighlightRules = function (options) {
349
359
  regex: '"(?=.)',
350
360
  next: "qqstring"
351
361
  }, {
352
- token: "constant.numeric",
362
+ token: "constant.numeric", // hexadecimal, octal and binary
353
363
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
354
364
  }, {
355
- token: "constant.numeric",
365
+ token: "constant.numeric", // decimal integers and floats
356
366
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
357
- }, {
358
- token: [
359
- "storage.type", "punctuation.operator", "support.function",
360
- "punctuation.operator", "entity.name.function", "text", "keyword.operator"
361
- ],
362
- regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
363
- next: "function_arguments"
364
- }, {
365
- token: [
366
- "storage.type", "punctuation.operator", "entity.name.function", "text",
367
- "keyword.operator", "text", "storage.type", "text", "paren.lparen"
368
- ],
369
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
370
- next: "function_arguments"
371
367
  }, {
372
368
  token: [
373
369
  "entity.name.function", "text", "keyword.operator", "text", "storage.type",
374
- "text", "paren.lparen"
375
- ],
376
- regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
377
- next: "function_arguments"
378
- }, {
379
- token: [
380
- "storage.type", "punctuation.operator", "entity.name.function", "text",
381
- "keyword.operator", "text",
382
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
370
+ "text", "storage.type", "text", "paren.lparen"
383
371
  ],
384
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
372
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
385
373
  next: "function_arguments"
386
374
  }, {
387
375
  token: [
388
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
376
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
389
377
  ],
390
- regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
378
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
391
379
  next: "function_arguments"
392
380
  }, {
393
381
  token: [
394
382
  "entity.name.function", "text", "punctuation.operator",
395
- "text", "storage.type", "text", "paren.lparen"
383
+ "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
396
384
  ],
397
- regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
385
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
398
386
  next: "function_arguments"
399
387
  }, {
400
388
  token: [
401
- "text", "text", "storage.type", "text", "paren.lparen"
389
+ "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
402
390
  ],
403
- regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
391
+ regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
404
392
  next: "function_arguments"
405
393
  }, {
406
394
  token: "keyword",
@@ -414,7 +402,7 @@ var JavaScriptHighlightRules = function (options) {
414
402
  regex: /that\b/
415
403
  }, {
416
404
  token: ["storage.type", "punctuation.operator", "support.function.firebug"],
417
- regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
405
+ regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
418
406
  }, {
419
407
  token: keywordMapper,
420
408
  regex: identifierRe
@@ -449,17 +437,27 @@ var JavaScriptHighlightRules = function (options) {
449
437
  property: [{
450
438
  token: "text",
451
439
  regex: "\\s+"
440
+ }, {
441
+ token: "keyword.operator",
442
+ regex: /=/
443
+ }, {
444
+ token: [
445
+ "storage.type", "text", "storage.type", "text", "paren.lparen"
446
+ ],
447
+ regex: anonymousFunctionRe + "(\\s*)(\\()",
448
+ next: "function_arguments"
452
449
  }, {
453
450
  token: [
454
- "storage.type", "punctuation.operator", "entity.name.function", "text",
455
- "keyword.operator", "text",
456
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
451
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
457
452
  ],
458
- regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
453
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
459
454
  next: "function_arguments"
460
455
  }, {
461
456
  token: "punctuation.operator",
462
457
  regex: /[.](?![.])/
458
+ }, {
459
+ token: "support.function",
460
+ regex: "prototype"
463
461
  }, {
464
462
  token: "support.function",
465
463
  regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
@@ -572,10 +570,10 @@ var JavaScriptHighlightRules = function (options) {
572
570
  token: "constant.language",
573
571
  regex: "null|Infinity|NaN|undefined"
574
572
  }, {
575
- token: "constant.numeric",
573
+ token: "constant.numeric", // hexadecimal, octal and binary
576
574
  regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
577
575
  }, {
578
- token: "constant.numeric",
576
+ token: "constant.numeric", // decimal integers and floats
579
577
  regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
580
578
  }, {
581
579
  token: "punctuation.operator",
@@ -684,7 +682,7 @@ var JavaScriptHighlightRules = function (options) {
684
682
  regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
685
683
  }, {
686
684
  token: "paren.lparen",
687
- regex: "(\\()(?=.+\\s*=>)",
685
+ regex: "(\\()(?=[^\\(]+\\s*=>)",
688
686
  next: "function_arguments"
689
687
  }, {
690
688
  token: "variable.language",
@@ -742,7 +740,7 @@ function JSX() {
742
740
  value: val.substr(offset)
743
741
  }];
744
742
  },
745
- regex: "</?" + tagRegex + "",
743
+ regex: "</?(?:" + tagRegex + "|(?=>))",
746
744
  next: "jsxAttributes",
747
745
  nextState: "jsx"
748
746
  };
@@ -755,8 +753,7 @@ function JSX() {
755
753
  this.$rules.jsx = [
756
754
  jsxJsRule,
757
755
  jsxTag,
758
- { include: "reference" },
759
- { defaultToken: "string" }
756
+ { include: "reference" }, { defaultToken: "string.xml" }
760
757
  ];
761
758
  this.$rules.jsxAttributes = [{
762
759
  token: "meta.tag.punctuation.tag-close.xml",
@@ -816,7 +813,7 @@ function JSX() {
816
813
  function comments(next) {
817
814
  return [
818
815
  {
819
- token: "comment",
816
+ token: "comment", // multi line comment
820
817
  regex: /\/\*/,
821
818
  next: [
822
819
  DocCommentHighlightRules.getTagRule(),
@@ -1121,6 +1118,293 @@ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1121
1118
 
1122
1119
  });
1123
1120
 
1121
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
1122
+ var oop = require("../../lib/oop");
1123
+ var Behaviour = require("../behaviour").Behaviour;
1124
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1125
+ function is(token, type) {
1126
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
1127
+ }
1128
+ var XmlBehaviour = function () {
1129
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1130
+ if (text == '"' || text == "'") {
1131
+ var quote = text;
1132
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
1133
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1134
+ return {
1135
+ text: quote + selected + quote,
1136
+ selection: false
1137
+ };
1138
+ }
1139
+ var cursor = editor.getCursorPosition();
1140
+ var line = session.doc.getLine(cursor.row);
1141
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1142
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1143
+ var token = iterator.getCurrentToken();
1144
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1145
+ return {
1146
+ text: "",
1147
+ selection: [1, 1]
1148
+ };
1149
+ }
1150
+ if (!token)
1151
+ token = iterator.stepBackward();
1152
+ if (!token)
1153
+ return;
1154
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1155
+ token = iterator.stepBackward();
1156
+ }
1157
+ var rightSpace = !rightChar || rightChar.match(/\s/);
1158
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1159
+ return {
1160
+ text: quote + quote,
1161
+ selection: [1, 1]
1162
+ };
1163
+ }
1164
+ }
1165
+ });
1166
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
1167
+ var selected = session.doc.getTextRange(range);
1168
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1169
+ var line = session.doc.getLine(range.start.row);
1170
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1171
+ if (rightChar == selected) {
1172
+ range.end.column++;
1173
+ return range;
1174
+ }
1175
+ }
1176
+ });
1177
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1178
+ if (text == '>') {
1179
+ var position = editor.getSelectionRange().start;
1180
+ var iterator = new TokenIterator(session, position.row, position.column);
1181
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1182
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1183
+ return;
1184
+ if (is(token, "reference.attribute-value"))
1185
+ return;
1186
+ if (is(token, "attribute-value")) {
1187
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
1188
+ if (position.column < tokenEndColumn)
1189
+ return;
1190
+ if (position.column == tokenEndColumn) {
1191
+ var nextToken = iterator.stepForward();
1192
+ if (nextToken && is(nextToken, "attribute-value"))
1193
+ return;
1194
+ iterator.stepBackward();
1195
+ }
1196
+ }
1197
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1198
+ return;
1199
+ while (!is(token, "tag-name")) {
1200
+ token = iterator.stepBackward();
1201
+ if (token.value == "<") {
1202
+ token = iterator.stepForward();
1203
+ break;
1204
+ }
1205
+ }
1206
+ var tokenRow = iterator.getCurrentTokenRow();
1207
+ var tokenColumn = iterator.getCurrentTokenColumn();
1208
+ if (is(iterator.stepBackward(), "end-tag-open"))
1209
+ return;
1210
+ var element = token.value;
1211
+ if (tokenRow == position.row)
1212
+ element = element.substring(0, position.column - tokenColumn);
1213
+ if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
1214
+ return;
1215
+ return {
1216
+ text: ">" + "</" + element + ">",
1217
+ selection: [1, 1]
1218
+ };
1219
+ }
1220
+ });
1221
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1222
+ if (text == "\n") {
1223
+ var cursor = editor.getCursorPosition();
1224
+ var line = session.getLine(cursor.row);
1225
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1226
+ var token = iterator.getCurrentToken();
1227
+ if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
1228
+ if (token.value == "/>")
1229
+ return;
1230
+ while (token && token.type.indexOf("tag-name") === -1) {
1231
+ token = iterator.stepBackward();
1232
+ }
1233
+ if (!token) {
1234
+ return;
1235
+ }
1236
+ var tag = token.value;
1237
+ var row = iterator.getCurrentTokenRow();
1238
+ token = iterator.stepBackward();
1239
+ if (!token || token.type.indexOf("end-tag") !== -1) {
1240
+ return;
1241
+ }
1242
+ if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
1243
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1244
+ var line = session.getLine(row);
1245
+ var nextIndent = this.$getIndent(line);
1246
+ var indent = nextIndent + session.getTabString();
1247
+ if (nextToken && nextToken.value === "</") {
1248
+ return {
1249
+ text: "\n" + indent + "\n" + nextIndent,
1250
+ selection: [1, indent.length, 1, indent.length]
1251
+ };
1252
+ }
1253
+ else {
1254
+ return {
1255
+ text: "\n" + indent
1256
+ };
1257
+ }
1258
+ }
1259
+ }
1260
+ }
1261
+ });
1262
+ };
1263
+ oop.inherits(XmlBehaviour, Behaviour);
1264
+ exports.XmlBehaviour = XmlBehaviour;
1265
+
1266
+ });
1267
+
1268
+ ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
1269
+ var oop = require("../../lib/oop");
1270
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1271
+ var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
1272
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
1273
+ var JavaScriptBehaviour = function () {
1274
+ var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
1275
+ this.addBehaviours(xmlBehaviours);
1276
+ this.inherit(CstyleBehaviour);
1277
+ this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
1278
+ if (text == '>') {
1279
+ var position = editor.getSelectionRange().start;
1280
+ var iterator = new TokenIterator(session, position.row, position.column);
1281
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1282
+ if (!token)
1283
+ return;
1284
+ if (token.value == '<') {
1285
+ return {
1286
+ text: "></>",
1287
+ selection: [1, 1]
1288
+ };
1289
+ }
1290
+ }
1291
+ });
1292
+ };
1293
+ oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
1294
+ exports.JavaScriptBehaviour = JavaScriptBehaviour;
1295
+
1296
+ });
1297
+
1298
+ 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";
1299
+ var oop = require("../../lib/oop");
1300
+ var Range = require("../../range").Range;
1301
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1302
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1303
+ BaseFoldMode.call(this);
1304
+ this.voidElements = voidElements || {};
1305
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1306
+ if (optionalEndTags)
1307
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1308
+ };
1309
+ oop.inherits(FoldMode, BaseFoldMode);
1310
+ var Tag = function () {
1311
+ this.tagName = "";
1312
+ this.closing = false;
1313
+ this.selfClosing = false;
1314
+ this.start = { row: 0, column: 0 };
1315
+ this.end = { row: 0, column: 0 };
1316
+ };
1317
+ function is(token, type) {
1318
+ return token.type.lastIndexOf(type + ".xml") > -1;
1319
+ }
1320
+ (function () {
1321
+ this.getFoldWidget = function (session, foldStyle, row) {
1322
+ var tag = this._getFirstTagInLine(session, row);
1323
+ if (!tag)
1324
+ return this.getCommentFoldWidget(session, row);
1325
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1326
+ return foldStyle === "markbeginend" ? "end" : "";
1327
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1328
+ return "";
1329
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1330
+ return "";
1331
+ return "start";
1332
+ };
1333
+ this.getCommentFoldWidget = function (session, row) {
1334
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1335
+ return "start";
1336
+ return "";
1337
+ };
1338
+ this._getFirstTagInLine = function (session, row) {
1339
+ var tokens = session.getTokens(row);
1340
+ var tag = new Tag();
1341
+ for (var i = 0; i < tokens.length; i++) {
1342
+ var token = tokens[i];
1343
+ if (is(token, "tag-open")) {
1344
+ tag.end.column = tag.start.column + token.value.length;
1345
+ tag.closing = is(token, "end-tag-open");
1346
+ token = tokens[++i];
1347
+ if (!token)
1348
+ return null;
1349
+ tag.tagName = token.value;
1350
+ if (token.value === "") { //skip empty tag name token for fragment
1351
+ token = tokens[++i];
1352
+ if (!token)
1353
+ return null;
1354
+ tag.tagName = token.value;
1355
+ }
1356
+ tag.end.column += token.value.length;
1357
+ for (i++; i < tokens.length; i++) {
1358
+ token = tokens[i];
1359
+ tag.end.column += token.value.length;
1360
+ if (is(token, "tag-close")) {
1361
+ tag.selfClosing = token.value == '/>';
1362
+ break;
1363
+ }
1364
+ }
1365
+ return tag;
1366
+ }
1367
+ else if (is(token, "tag-close")) {
1368
+ tag.selfClosing = token.value == '/>';
1369
+ return tag;
1370
+ }
1371
+ tag.start.column += token.value.length;
1372
+ }
1373
+ return null;
1374
+ };
1375
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
1376
+ var tokens = session.getTokens(row);
1377
+ var column = 0;
1378
+ for (var i = 0; i < tokens.length; i++) {
1379
+ var token = tokens[i];
1380
+ column += token.value.length;
1381
+ if (column < startColumn - 1)
1382
+ continue;
1383
+ if (is(token, "end-tag-open")) {
1384
+ token = tokens[i + 1];
1385
+ if (is(token, "tag-name") && token.value === "") {
1386
+ token = tokens[i + 2];
1387
+ }
1388
+ if (token && token.value == tagName)
1389
+ return true;
1390
+ }
1391
+ }
1392
+ return false;
1393
+ };
1394
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1395
+ var firstTag = this._getFirstTagInLine(session, row);
1396
+ if (!firstTag) {
1397
+ return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
1398
+ }
1399
+ var tags = session.getMatchingTags({ row: row, column: 0 });
1400
+ if (tags) {
1401
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
1402
+ }
1403
+ };
1404
+ }).call(FoldMode.prototype);
1405
+
1406
+ });
1407
+
1124
1408
  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";
1125
1409
  var oop = require("../../lib/oop");
1126
1410
  var Range = require("../../range").Range;
@@ -1237,19 +1521,51 @@ oop.inherits(FoldMode, BaseFoldMode);
1237
1521
 
1238
1522
  });
1239
1523
 
1240
- 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";
1524
+ ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1525
+ var oop = require("../../lib/oop");
1526
+ var XmlFoldMode = require("./xml").FoldMode;
1527
+ var CFoldMode = require("./cstyle").FoldMode;
1528
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1529
+ if (commentRegex) {
1530
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1531
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1532
+ }
1533
+ this.xmlFoldMode = new XmlFoldMode();
1534
+ };
1535
+ oop.inherits(FoldMode, CFoldMode);
1536
+ (function () {
1537
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
1538
+ this.getFoldWidgetBase = this.getFoldWidget;
1539
+ this.getFoldWidget = function (session, foldStyle, row) {
1540
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
1541
+ if (!fw) {
1542
+ return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
1543
+ }
1544
+ return fw;
1545
+ };
1546
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1547
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
1548
+ if (range)
1549
+ return range;
1550
+ return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
1551
+ };
1552
+ }).call(FoldMode.prototype);
1553
+
1554
+ });
1555
+
1556
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
1241
1557
  var oop = require("../lib/oop");
1242
1558
  var TextMode = require("./text").Mode;
1243
1559
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1244
1560
  var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1245
1561
  var WorkerClient = require("../worker/worker_client").WorkerClient;
1246
- var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1247
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1562
+ var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
1563
+ var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
1248
1564
  var Mode = function () {
1249
1565
  this.HighlightRules = JavaScriptHighlightRules;
1250
1566
  this.$outdent = new MatchingBraceOutdent();
1251
- this.$behaviour = new CstyleBehaviour();
1252
- this.foldingRules = new CStyleFoldMode();
1567
+ this.$behaviour = new JavaScriptBehaviour();
1568
+ this.foldingRules = new JavaScriptFoldMode();
1253
1569
  };
1254
1570
  oop.inherits(Mode, TextMode);
1255
1571
  (function () {
@@ -1277,13 +1593,6 @@ oop.inherits(Mode, TextMode);
1277
1593
  if (endState == "start" || endState == "no_regex") {
1278
1594
  return "";
1279
1595
  }
1280
- var match = line.match(/^\s*(\/?)\*/);
1281
- if (match) {
1282
- if (match[1]) {
1283
- indent += " ";
1284
- }
1285
- indent += "* ";
1286
- }
1287
1596
  }
1288
1597
  return indent;
1289
1598
  };
@@ -1609,154 +1918,6 @@ exports.Mode = Mode;
1609
1918
 
1610
1919
  });
1611
1920
 
1612
- 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";
1613
- var oop = require("../../lib/oop");
1614
- var Behaviour = require("../behaviour").Behaviour;
1615
- var TokenIterator = require("../../token_iterator").TokenIterator;
1616
- var lang = require("../../lib/lang");
1617
- function is(token, type) {
1618
- return token && token.type.lastIndexOf(type + ".xml") > -1;
1619
- }
1620
- var XmlBehaviour = function () {
1621
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1622
- if (text == '"' || text == "'") {
1623
- var quote = text;
1624
- var selected = session.doc.getTextRange(editor.getSelectionRange());
1625
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1626
- return {
1627
- text: quote + selected + quote,
1628
- selection: false
1629
- };
1630
- }
1631
- var cursor = editor.getCursorPosition();
1632
- var line = session.doc.getLine(cursor.row);
1633
- var rightChar = line.substring(cursor.column, cursor.column + 1);
1634
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
1635
- var token = iterator.getCurrentToken();
1636
- if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1637
- return {
1638
- text: "",
1639
- selection: [1, 1]
1640
- };
1641
- }
1642
- if (!token)
1643
- token = iterator.stepBackward();
1644
- if (!token)
1645
- return;
1646
- while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1647
- token = iterator.stepBackward();
1648
- }
1649
- var rightSpace = !rightChar || rightChar.match(/\s/);
1650
- if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1651
- return {
1652
- text: quote + quote,
1653
- selection: [1, 1]
1654
- };
1655
- }
1656
- }
1657
- });
1658
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
1659
- var selected = session.doc.getTextRange(range);
1660
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1661
- var line = session.doc.getLine(range.start.row);
1662
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1663
- if (rightChar == selected) {
1664
- range.end.column++;
1665
- return range;
1666
- }
1667
- }
1668
- });
1669
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1670
- if (text == '>') {
1671
- var position = editor.getSelectionRange().start;
1672
- var iterator = new TokenIterator(session, position.row, position.column);
1673
- var token = iterator.getCurrentToken() || iterator.stepBackward();
1674
- if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1675
- return;
1676
- if (is(token, "reference.attribute-value"))
1677
- return;
1678
- if (is(token, "attribute-value")) {
1679
- var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
1680
- if (position.column < tokenEndColumn)
1681
- return;
1682
- if (position.column == tokenEndColumn) {
1683
- var nextToken = iterator.stepForward();
1684
- if (nextToken && is(nextToken, "attribute-value"))
1685
- return;
1686
- iterator.stepBackward();
1687
- }
1688
- }
1689
- if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1690
- return;
1691
- while (!is(token, "tag-name")) {
1692
- token = iterator.stepBackward();
1693
- if (token.value == "<") {
1694
- token = iterator.stepForward();
1695
- break;
1696
- }
1697
- }
1698
- var tokenRow = iterator.getCurrentTokenRow();
1699
- var tokenColumn = iterator.getCurrentTokenColumn();
1700
- if (is(iterator.stepBackward(), "end-tag-open"))
1701
- return;
1702
- var element = token.value;
1703
- if (tokenRow == position.row)
1704
- element = element.substring(0, position.column - tokenColumn);
1705
- if (this.voidElements.hasOwnProperty(element.toLowerCase()))
1706
- return;
1707
- return {
1708
- text: ">" + "</" + element + ">",
1709
- selection: [1, 1]
1710
- };
1711
- }
1712
- });
1713
- this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1714
- if (text == "\n") {
1715
- var cursor = editor.getCursorPosition();
1716
- var line = session.getLine(cursor.row);
1717
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
1718
- var token = iterator.getCurrentToken();
1719
- if (token && token.type.indexOf("tag-close") !== -1) {
1720
- if (token.value == "/>")
1721
- return;
1722
- while (token && token.type.indexOf("tag-name") === -1) {
1723
- token = iterator.stepBackward();
1724
- }
1725
- if (!token) {
1726
- return;
1727
- }
1728
- var tag = token.value;
1729
- var row = iterator.getCurrentTokenRow();
1730
- token = iterator.stepBackward();
1731
- if (!token || token.type.indexOf("end-tag") !== -1) {
1732
- return;
1733
- }
1734
- if (this.voidElements && !this.voidElements[tag]) {
1735
- var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1736
- var line = session.getLine(row);
1737
- var nextIndent = this.$getIndent(line);
1738
- var indent = nextIndent + session.getTabString();
1739
- if (nextToken && nextToken.value === "</") {
1740
- return {
1741
- text: "\n" + indent + "\n" + nextIndent,
1742
- selection: [1, indent.length, 1, indent.length]
1743
- };
1744
- }
1745
- else {
1746
- return {
1747
- text: "\n" + indent
1748
- };
1749
- }
1750
- }
1751
- }
1752
- }
1753
- });
1754
- };
1755
- oop.inherits(XmlBehaviour, Behaviour);
1756
- exports.XmlBehaviour = XmlBehaviour;
1757
-
1758
- });
1759
-
1760
1921
  ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1761
1922
  var oop = require("../../lib/oop");
1762
1923
  var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1796,107 +1957,6 @@ oop.inherits(FoldMode, BaseFoldMode);
1796
1957
 
1797
1958
  });
1798
1959
 
1799
- 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";
1800
- var oop = require("../../lib/oop");
1801
- var Range = require("../../range").Range;
1802
- var BaseFoldMode = require("./fold_mode").FoldMode;
1803
- var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1804
- BaseFoldMode.call(this);
1805
- this.voidElements = voidElements || {};
1806
- this.optionalEndTags = oop.mixin({}, this.voidElements);
1807
- if (optionalEndTags)
1808
- oop.mixin(this.optionalEndTags, optionalEndTags);
1809
- };
1810
- oop.inherits(FoldMode, BaseFoldMode);
1811
- var Tag = function () {
1812
- this.tagName = "";
1813
- this.closing = false;
1814
- this.selfClosing = false;
1815
- this.start = { row: 0, column: 0 };
1816
- this.end = { row: 0, column: 0 };
1817
- };
1818
- function is(token, type) {
1819
- return token.type.lastIndexOf(type + ".xml") > -1;
1820
- }
1821
- (function () {
1822
- this.getFoldWidget = function (session, foldStyle, row) {
1823
- var tag = this._getFirstTagInLine(session, row);
1824
- if (!tag)
1825
- return this.getCommentFoldWidget(session, row);
1826
- if (tag.closing || (!tag.tagName && tag.selfClosing))
1827
- return foldStyle === "markbeginend" ? "end" : "";
1828
- if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1829
- return "";
1830
- if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1831
- return "";
1832
- return "start";
1833
- };
1834
- this.getCommentFoldWidget = function (session, row) {
1835
- if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1836
- return "start";
1837
- return "";
1838
- };
1839
- this._getFirstTagInLine = function (session, row) {
1840
- var tokens = session.getTokens(row);
1841
- var tag = new Tag();
1842
- for (var i = 0; i < tokens.length; i++) {
1843
- var token = tokens[i];
1844
- if (is(token, "tag-open")) {
1845
- tag.end.column = tag.start.column + token.value.length;
1846
- tag.closing = is(token, "end-tag-open");
1847
- token = tokens[++i];
1848
- if (!token)
1849
- return null;
1850
- tag.tagName = token.value;
1851
- tag.end.column += token.value.length;
1852
- for (i++; i < tokens.length; i++) {
1853
- token = tokens[i];
1854
- tag.end.column += token.value.length;
1855
- if (is(token, "tag-close")) {
1856
- tag.selfClosing = token.value == '/>';
1857
- break;
1858
- }
1859
- }
1860
- return tag;
1861
- }
1862
- else if (is(token, "tag-close")) {
1863
- tag.selfClosing = token.value == '/>';
1864
- return tag;
1865
- }
1866
- tag.start.column += token.value.length;
1867
- }
1868
- return null;
1869
- };
1870
- this._findEndTagInLine = function (session, row, tagName, startColumn) {
1871
- var tokens = session.getTokens(row);
1872
- var column = 0;
1873
- for (var i = 0; i < tokens.length; i++) {
1874
- var token = tokens[i];
1875
- column += token.value.length;
1876
- if (column < startColumn)
1877
- continue;
1878
- if (is(token, "end-tag-open")) {
1879
- token = tokens[i + 1];
1880
- if (token && token.value == tagName)
1881
- return true;
1882
- }
1883
- }
1884
- return false;
1885
- };
1886
- this.getFoldWidgetRange = function (session, foldStyle, row) {
1887
- var tags = session.getMatchingTags({ row: row, column: 0 });
1888
- if (tags) {
1889
- return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
1890
- }
1891
- else {
1892
- return this.getCommentFoldWidget(session, row)
1893
- && session.getCommentFoldRange(row, session.getLine(row).length);
1894
- }
1895
- };
1896
- }).call(FoldMode.prototype);
1897
-
1898
- });
1899
-
1900
1960
  ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1901
1961
  var oop = require("../../lib/oop");
1902
1962
  var MixedFoldMode = require("./mixed").FoldMode;
@@ -2275,23 +2335,23 @@ ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/li
2275
2335
  var oop = require("../lib/oop");
2276
2336
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2277
2337
  var constantOtherSymbol = exports.constantOtherSymbol = {
2278
- token: "constant.other.symbol.ruby",
2338
+ token: "constant.other.symbol.ruby", // symbol
2279
2339
  regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
2280
2340
  };
2281
2341
  exports.qString = {
2282
- token: "string",
2342
+ token: "string", // single line
2283
2343
  regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
2284
2344
  };
2285
2345
  exports.qqString = {
2286
- token: "string",
2346
+ token: "string", // single line
2287
2347
  regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
2288
2348
  };
2289
2349
  exports.tString = {
2290
- token: "string",
2350
+ token: "string", // backtick string
2291
2351
  regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
2292
2352
  };
2293
2353
  var constantNumericHex = exports.constantNumericHex = {
2294
- token: "constant.numeric",
2354
+ token: "constant.numeric", // hex
2295
2355
  regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
2296
2356
  };
2297
2357
  var constantNumericBinary = exports.constantNumericBinary = {
@@ -2302,24 +2362,24 @@ var constantNumericDecimal = exports.constantNumericDecimal = {
2302
2362
  token: "constant.numeric",
2303
2363
  regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/
2304
2364
  };
2305
- var constantNumericOctal = exports.constantNumericDecimal = {
2365
+ var constantNumericOctal = exports.constantNumericOctal = {
2306
2366
  token: "constant.numeric",
2307
2367
  regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/
2308
2368
  };
2309
2369
  var constantNumericRational = exports.constantNumericRational = {
2310
- token: "constant.numeric",
2370
+ token: "constant.numeric", //rational + complex
2311
2371
  regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/
2312
2372
  };
2313
2373
  var constantNumericComplex = exports.constantNumericComplex = {
2314
- token: "constant.numeric",
2374
+ token: "constant.numeric", //simple complex numbers
2315
2375
  regex: /\b([\d]i)\b/
2316
2376
  };
2317
2377
  var constantNumericFloat = exports.constantNumericFloat = {
2318
- token: "constant.numeric",
2378
+ token: "constant.numeric", // float + complex
2319
2379
  regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"
2320
2380
  };
2321
2381
  var instanceVariable = exports.instanceVariable = {
2322
- token: "variable.instance",
2382
+ token: "variable.instance", // instance variable
2323
2383
  regex: "@{1,2}[a-zA-Z_\\d]+"
2324
2384
  };
2325
2385
  var RubyHighlightRules = function () {
@@ -2384,7 +2444,7 @@ var RubyHighlightRules = function () {
2384
2444
  token: "comment",
2385
2445
  regex: "#.*$"
2386
2446
  }, {
2387
- token: "comment.multiline",
2447
+ token: "comment.multiline", // multi line comment
2388
2448
  regex: "^=begin(?=$|\\s.*$)",
2389
2449
  next: "comment"
2390
2450
  }, {
@@ -2440,7 +2500,7 @@ var RubyHighlightRules = function () {
2440
2500
  defaultToken: "string"
2441
2501
  }]
2442
2502
  }, {
2443
- token: "string.start",
2503
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
2444
2504
  regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) {
2445
2505
  if (stack.length)
2446
2506
  stack = [];
@@ -2450,7 +2510,7 @@ var RubyHighlightRules = function () {
2450
2510
  return this.token;
2451
2511
  }
2452
2512
  }, {
2453
- token: "string.start",
2513
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
2454
2514
  regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) {
2455
2515
  if (stack.length)
2456
2516
  stack = [];
@@ -2460,7 +2520,7 @@ var RubyHighlightRules = function () {
2460
2520
  return this.token;
2461
2521
  }
2462
2522
  }, {
2463
- token: "constant.other.symbol.ruby",
2523
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
2464
2524
  regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) {
2465
2525
  if (stack.length)
2466
2526
  stack = [];
@@ -2470,7 +2530,7 @@ var RubyHighlightRules = function () {
2470
2530
  return this.token;
2471
2531
  }
2472
2532
  }, {
2473
- token: "constant.other.symbol.ruby",
2533
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
2474
2534
  regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) {
2475
2535
  if (stack.length)
2476
2536
  stack = [];
@@ -2491,15 +2551,15 @@ var RubyHighlightRules = function () {
2491
2551
  }
2492
2552
  }],
2493
2553
  {
2494
- token: "punctuation",
2554
+ token: "punctuation", // namespaces aren't symbols
2495
2555
  regex: "::"
2496
2556
  },
2497
2557
  instanceVariable,
2498
2558
  {
2499
- token: "variable.global",
2559
+ token: "variable.global", // global variable
2500
2560
  regex: "[$][a-zA-Z_\\d]+"
2501
2561
  }, {
2502
- token: "support.class",
2562
+ token: "support.class", // class name
2503
2563
  regex: "[A-Z][a-zA-Z_\\d]*"
2504
2564
  }, {
2505
2565
  token: ["punctuation.operator", "support.function"],
@@ -2613,16 +2673,16 @@ var RubyHighlightRules = function () {
2613
2673
  ],
2614
2674
  "comment": [
2615
2675
  {
2616
- token: "comment.multiline",
2676
+ token: "comment.multiline", // closing comment
2617
2677
  regex: "^=end(?=$|\\s.*$)",
2618
2678
  next: "start"
2619
2679
  }, {
2620
- token: "comment",
2680
+ token: "comment", // comment spanning whole line
2621
2681
  regex: ".+"
2622
2682
  }
2623
2683
  ],
2624
2684
  "qStateWithInterpolation": [{
2625
- token: "string.start",
2685
+ token: "string.start", // excluded nested |^% due to difficulty in realization
2626
2686
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2627
2687
  if (stack.length && val === stack[0]) {
2628
2688
  stack.unshift(val, state);
@@ -2655,7 +2715,7 @@ var RubyHighlightRules = function () {
2655
2715
  defaultToken: "string"
2656
2716
  }],
2657
2717
  "qStateWithoutInterpolation": [{
2658
- token: "string.start",
2718
+ token: "string.start", // excluded nested |^% due to difficulty in realization
2659
2719
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2660
2720
  if (stack.length && val === stack[0]) {
2661
2721
  stack.unshift(val, state);
@@ -2684,7 +2744,7 @@ var RubyHighlightRules = function () {
2684
2744
  defaultToken: "string"
2685
2745
  }],
2686
2746
  "sStateWithoutInterpolation": [{
2687
- token: "constant.other.symbol.ruby",
2747
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
2688
2748
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2689
2749
  if (stack.length && val === stack[0]) {
2690
2750
  stack.unshift(val, state);
@@ -2707,7 +2767,7 @@ var RubyHighlightRules = function () {
2707
2767
  defaultToken: "constant.other.symbol.ruby"
2708
2768
  }],
2709
2769
  "sStateWithInterpolation": [{
2710
- token: "constant.other.symbol.ruby",
2770
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
2711
2771
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2712
2772
  if (stack.length && val === stack[0]) {
2713
2773
  stack.unshift(val, state);
@@ -2740,7 +2800,7 @@ var RubyHighlightRules = function () {
2740
2800
  defaultToken: "constant.other.symbol.ruby"
2741
2801
  }],
2742
2802
  "rState": [{
2743
- token: "string.regexp",
2803
+ token: "string.regexp", // excluded nested |^% due to difficulty in realization
2744
2804
  regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2745
2805
  if (stack.length && val === stack[0]) {
2746
2806
  stack.unshift(val, state);