@openui5/sap.ui.codeeditor 1.120.7 → 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.
- package/.reuse/dep5 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +2 -2
- package/src/sap/ui/codeeditor/.library +2 -2
- package/src/sap/ui/codeeditor/CodeEditor.js +41 -27
- package/src/sap/ui/codeeditor/js/ace/ace.js +16262 -16597
- package/src/sap/ui/codeeditor/js/ace/css/ace.css +358 -86
- package/src/sap/ui/codeeditor/js/ace/css/ambiance-3.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/chrome-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/clouds-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/clouds_midnight-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/cobalt-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/crimson_editor-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/dawn-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/dracula-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/dreamweaver-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/eclipse-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/github-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/github_dark-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/github_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gob-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox_dark_hard-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/idle_fingers-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/iplastic-3.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/kr_theme-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/kuroir-1.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/kuroir-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-10.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-11.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-12.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-22.svg +1 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-5.svg +7 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +7 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +9 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-8.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +4 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-9.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +4 -0
- package/src/sap/ui/codeeditor/js/ace/css/merbivore-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/merbivore_soft-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/mono_industrial-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/monokai-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/one_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/pastel_on_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/solarized_dark-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/solarized_light-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/sqlserver-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/terminal-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/textmate-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/ambiance.css +120 -68
- package/src/sap/ui/codeeditor/js/ace/css/theme/chaos.css +79 -66
- package/src/sap/ui/codeeditor/js/ace/css/theme/chrome.css +82 -43
- package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_day.css +160 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night.css +146 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night_low_color.css +134 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/clouds.css +59 -31
- package/src/sap/ui/codeeditor/js/ace/css/theme/clouds_midnight.css +60 -32
- package/src/sap/ui/codeeditor/js/ace/css/theme/cobalt.css +71 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/crimson_editor.css +79 -42
- package/src/sap/ui/codeeditor/js/ace/css/theme/dawn.css +70 -40
- package/src/sap/ui/codeeditor/js/ace/css/theme/dracula.css +95 -49
- package/src/sap/ui/codeeditor/js/ace/css/theme/dreamweaver.css +95 -49
- package/src/sap/ui/codeeditor/js/ace/css/theme/eclipse.css +62 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/github.css +71 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/github_dark.css +134 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/gob.css +68 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox.css +54 -28
- package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_dark_hard.css +163 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_light_hard.css +167 -0
- package/src/sap/ui/codeeditor/js/ace/css/theme/idle_fingers.css +62 -34
- package/src/sap/ui/codeeditor/js/ace/css/theme/iplastic.css +76 -45
- package/src/sap/ui/codeeditor/js/ace/css/theme/katzenmilch.css +91 -53
- package/src/sap/ui/codeeditor/js/ace/css/theme/kr_theme.css +67 -36
- package/src/sap/ui/codeeditor/js/ace/css/theme/kuroir.css +43 -17
- package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore.css +57 -31
- package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore_soft.css +57 -31
- package/src/sap/ui/codeeditor/js/ace/css/theme/mono_industrial.css +66 -36
- package/src/sap/ui/codeeditor/js/ace/css/theme/monokai.css +63 -35
- package/src/sap/ui/codeeditor/js/ace/css/theme/nord_dark.css +55 -29
- package/src/sap/ui/codeeditor/js/ace/css/theme/one_dark.css +88 -47
- package/src/sap/ui/codeeditor/js/ace/css/theme/pastel_on_dark.css +70 -38
- package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +52 -28
- package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_light.css +55 -29
- package/src/sap/ui/codeeditor/js/ace/css/theme/sqlserver.css +90 -48
- package/src/sap/ui/codeeditor/js/ace/css/theme/terminal.css +64 -34
- package/src/sap/ui/codeeditor/js/ace/css/theme/textmate.css +82 -43
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow.css +61 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night.css +61 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_blue.css +59 -32
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_bright.css +71 -40
- package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_eighties.css +61 -33
- package/src/sap/ui/codeeditor/js/ace/css/theme/twilight.css +66 -36
- package/src/sap/ui/codeeditor/js/ace/css/theme/vibrant_ink.css +59 -32
- package/src/sap/ui/codeeditor/js/ace/css/theme/xcode.css +54 -28
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_blue-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_bright-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_eighties-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/twilight-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/vibrant_ink-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/css/xcode-2.png +0 -0
- package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +90 -91
- package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +39 -75
- package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +457 -0
- package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +47 -97
- package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +496 -552
- package/src/sap/ui/codeeditor/js/ace/ext-hardwrap.js +47 -16
- package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +3269 -0
- package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +45 -105
- package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +1438 -1128
- package/src/sap/ui/codeeditor/js/ace/ext-linking.js +8 -16
- package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +198 -185
- package/src/sap/ui/codeeditor/js/ace/ext-options.js +405 -443
- package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +1682 -1508
- package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +26 -28
- package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +160 -332
- package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +409 -446
- package/src/sap/ui/codeeditor/js/ace/ext-simple_tokenizer.js +45 -0
- package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +4 -10
- package/src/sap/ui/codeeditor/js/ace/ext-split.js +41 -63
- package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +19 -27
- package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +45 -41
- package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +62 -83
- package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +442 -551
- package/src/sap/ui/codeeditor/js/ace/keybinding-sublime.js +338 -351
- package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +5242 -4758
- package/src/sap/ui/codeeditor/js/ace/keybinding-vscode.js +228 -235
- package/src/sap/ui/codeeditor/js/ace/mode-abap.js +72 -93
- package/src/sap/ui/codeeditor/js/ace/mode-abc.js +136 -164
- package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +109 -150
- package/src/sap/ui/codeeditor/js/ace/mode-ada.js +45 -74
- package/src/sap/ui/codeeditor/js/ace/mode-alda.js +77 -109
- package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +196 -241
- package/src/sap/ui/codeeditor/js/ace/mode-apex.js +192 -247
- package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +56 -102
- package/src/sap/ui/codeeditor/js/ace/mode-aql.js +85 -95
- package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +120 -158
- package/src/sap/ui/codeeditor/js/ace/mode-asl.js +233 -298
- package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +78 -101
- package/src/sap/ui/codeeditor/js/ace/mode-astro.js +2414 -0
- package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +80 -116
- package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +74 -105
- package/src/sap/ui/codeeditor/js/ace/mode-bibtex.js +318 -0
- package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +72 -115
- package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +171 -257
- package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +97 -115
- package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +126 -119
- package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +48 -67
- package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +203 -268
- package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +1029 -1276
- package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +337 -393
- package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +127 -216
- package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +1539 -1569
- package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +786 -898
- package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +184 -237
- package/src/sap/ui/codeeditor/js/ace/mode-csp.js +37 -37
- package/src/sap/ui/codeeditor/js/ace/mode-css.js +293 -384
- package/src/sap/ui/codeeditor/js/ace/mode-curly.js +1019 -1262
- package/src/sap/ui/codeeditor/js/ace/mode-cuttlefish.js +56 -0
- package/src/sap/ui/codeeditor/js/ace/mode-d.js +163 -233
- package/src/sap/ui/codeeditor/js/ace/mode-dart.js +330 -427
- package/src/sap/ui/codeeditor/js/ace/mode-diff.js +20 -38
- package/src/sap/ui/codeeditor/js/ace/mode-django.js +1032 -1271
- package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +211 -284
- package/src/sap/ui/codeeditor/js/ace/mode-dot.js +131 -200
- package/src/sap/ui/codeeditor/js/ace/mode-drools.js +408 -349
- package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +89 -125
- package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +47 -62
- package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +1350 -1666
- package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +349 -407
- package/src/sap/ui/codeeditor/js/ace/mode-elm.js +136 -168
- package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +707 -881
- package/src/sap/ui/codeeditor/js/ace/mode-flix.js +164 -0
- package/src/sap/ui/codeeditor/js/ace/mode-forth.js +128 -172
- package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +177 -246
- package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +92 -131
- package/src/sap/ui/codeeditor/js/ace/mode-fsl.js +91 -124
- package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +813 -748
- package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +52 -71
- package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +105 -119
- package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +12 -22
- package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +184 -289
- package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +686 -623
- package/src/sap/ui/codeeditor/js/ace/mode-golang.js +167 -239
- package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +48 -88
- package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +577 -471
- package/src/sap/ui/codeeditor/js/ace/mode-haml.js +1062 -1026
- package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +1061 -1305
- package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +199 -255
- package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +81 -87
- package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +111 -184
- package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +164 -199
- package/src/sap/ui/codeeditor/js/ace/mode-html.js +1009 -1239
- package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +1402 -1705
- package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +1390 -1706
- package/src/sap/ui/codeeditor/js/ace/mode-ini.js +58 -82
- package/src/sap/ui/codeeditor/js/ace/mode-io.js +85 -123
- package/src/sap/ui/codeeditor/js/ace/mode-ion.js +477 -0
- package/src/sap/ui/codeeditor/js/ace/mode-jack.js +109 -162
- package/src/sap/ui/codeeditor/js/ace/mode-jade.js +1339 -1344
- package/src/sap/ui/codeeditor/js/ace/mode-java.js +710 -498
- package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +441 -354
- package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +270 -0
- package/src/sap/ui/codeeditor/js/ace/mode-json.js +93 -147
- package/src/sap/ui/codeeditor/js/ace/mode-json5.js +128 -180
- package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +58 -112
- package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +1045 -865
- package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +158 -190
- package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +121 -194
- package/src/sap/ui/codeeditor/js/ace/mode-julia.js +128 -177
- package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +262 -614
- package/src/sap/ui/codeeditor/js/ace/mode-latex.js +94 -138
- package/src/sap/ui/codeeditor/js/ace/mode-latte.js +1120 -1366
- package/src/sap/ui/codeeditor/js/ace/mode-less.js +342 -442
- package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +1353 -1414
- package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +65 -73
- package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +217 -224
- package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +97 -142
- package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +187 -227
- package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +99 -155
- package/src/sap/ui/codeeditor/js/ace/mode-lua.js +152 -211
- package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +1167 -1470
- package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +25 -34
- package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +244 -282
- package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +1858 -2177
- package/src/sap/ui/codeeditor/js/ace/mode-mask.js +964 -1007
- package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +197 -221
- package/src/sap/ui/codeeditor/js/ace/mode-maze.js +127 -163
- package/src/sap/ui/codeeditor/js/ace/mode-mediawiki.js +464 -476
- package/src/sap/ui/codeeditor/js/ace/mode-mel.js +90 -140
- package/src/sap/ui/codeeditor/js/ace/mode-mips.js +101 -134
- package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +63 -75
- package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +537 -576
- package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +85 -102
- package/src/sap/ui/codeeditor/js/ace/mode-nasal.js +513 -0
- package/src/sap/ui/codeeditor/js/ace/mode-nginx.js +119 -155
- package/src/sap/ui/codeeditor/js/ace/mode-nim.js +159 -197
- package/src/sap/ui/codeeditor/js/ace/mode-nix.js +283 -375
- package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +139 -172
- package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +1138 -1378
- package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +400 -514
- package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +77 -120
- package/src/sap/ui/codeeditor/js/ace/mode-odin.js +449 -0
- package/src/sap/ui/codeeditor/js/ace/mode-partiql.js +750 -0
- package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +28 -47
- package/src/sap/ui/codeeditor/js/ace/mode-perl.js +122 -185
- package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +974 -851
- package/src/sap/ui/codeeditor/js/ace/mode-php.js +2282 -1502
- package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +2463 -1696
- package/src/sap/ui/codeeditor/js/ace/mode-pig.js +133 -165
- package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +5 -10
- package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +268 -0
- package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +332 -183
- package/src/sap/ui/codeeditor/js/ace/mode-praat.js +168 -234
- package/src/sap/ui/codeeditor/js/ace/mode-prisma.js +292 -324
- package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +180 -246
- package/src/sap/ui/codeeditor/js/ace/mode-properties.js +26 -37
- package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +232 -327
- package/src/sap/ui/codeeditor/js/ace/mode-prql.js +320 -0
- package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +68 -120
- package/src/sap/ui/codeeditor/js/ace/mode-python.js +338 -370
- package/src/sap/ui/codeeditor/js/ace/mode-qml.js +244 -279
- package/src/sap/ui/codeeditor/js/ace/mode-r.js +295 -220
- package/src/sap/ui/codeeditor/js/ace/mode-raku.js +356 -433
- package/src/sap/ui/codeeditor/js/ace/mode-razor.js +1130 -1374
- package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +214 -171
- package/src/sap/ui/codeeditor/js/ace/mode-red.js +212 -274
- package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +181 -220
- package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +1325 -1443
- package/src/sap/ui/codeeditor/js/ace/mode-robot.js +168 -0
- package/src/sap/ui/codeeditor/js/ace/mode-rst.js +217 -229
- package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +338 -420
- package/src/sap/ui/codeeditor/js/ace/mode-rust.js +258 -155
- package/src/sap/ui/codeeditor/js/ace/mode-sac.js +349 -0
- package/src/sap/ui/codeeditor/js/ace/mode-sass.js +257 -309
- package/src/sap/ui/codeeditor/js/ace/mode-scad.js +127 -191
- package/src/sap/ui/codeeditor/js/ace/mode-scala.js +572 -468
- package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +104 -126
- package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +181 -228
- package/src/sap/ui/codeeditor/js/ace/mode-scss.js +364 -472
- package/src/sap/ui/codeeditor/js/ace/mode-sh.js +204 -266
- package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +477 -405
- package/src/sap/ui/codeeditor/js/ace/mode-slim.js +2631 -3161
- package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +1075 -1334
- package/src/sap/ui/codeeditor/js/ace/mode-smithy.js +276 -327
- package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +78 -102
- package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +1251 -1548
- package/src/sap/ui/codeeditor/js/ace/mode-space.js +47 -63
- package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +139 -171
- package/src/sap/ui/codeeditor/js/ace/mode-sql.js +77 -133
- package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +138 -192
- package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +306 -338
- package/src/sap/ui/codeeditor/js/ace/mode-svg.js +642 -794
- package/src/sap/ui/codeeditor/js/ace/mode-swift.js +96 -150
- package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +151 -200
- package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +78 -132
- package/src/sap/ui/codeeditor/js/ace/mode-tex.js +148 -96
- package/src/sap/ui/codeeditor/js/ace/mode-textile.js +45 -70
- package/src/sap/ui/codeeditor/js/ace/mode-toml.js +63 -87
- package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +462 -384
- package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +119 -151
- package/src/sap/ui/codeeditor/js/ace/mode-twig.js +1099 -1350
- package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +455 -376
- package/src/sap/ui/codeeditor/js/ace/mode-vala.js +382 -505
- package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +231 -264
- package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +1116 -1388
- package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +61 -81
- package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +57 -79
- package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +1046 -1292
- package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +525 -417
- package/src/sap/ui/codeeditor/js/ace/mode-xml.js +182 -389
- package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +58 -112
- package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +202 -137
- package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +237 -274
- package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +5 -34
- package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +5 -160
- package/src/sap/ui/codeeditor/js/ace/snippets/astro.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/bibtex.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +5 -134
- package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +5 -93
- package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +5 -98
- package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +5 -13
- package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +5 -50
- package/src/sap/ui/codeeditor/js/ace/snippets/css.js +5 -970
- package/src/sap/ui/codeeditor/js/ace/snippets/cuttlefish.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +5 -86
- package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +5 -14
- package/src/sap/ui/codeeditor/js/ace/snippets/django.js +5 -111
- package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +5 -22
- package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +8 -246
- package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +5 -163
- package/src/sap/ui/codeeditor/js/ace/snippets/flix.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/fsl.js +6 -4
- package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +5 -1707
- package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +5 -35
- package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +5 -23
- package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +5 -85
- package/src/sap/ui/codeeditor/js/ace/snippets/html.js +5 -856
- package/src/sap/ui/codeeditor/js/ace/snippets/io.js +1 -3
- package/src/sap/ui/codeeditor/js/ace/snippets/ion.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/java.js +5 -243
- package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +5 -198
- package/src/sap/ui/codeeditor/js/ace/snippets/jexl.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +44 -41
- package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +5 -102
- package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +5 -884
- package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +5 -1235
- package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +5 -24
- package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +5 -7
- package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +5 -91
- package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +5 -12
- package/src/sap/ui/codeeditor/js/ace/snippets/nasal.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/odin.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/partiql.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +5 -350
- package/src/sap/ui/codeeditor/js/ace/snippets/php.js +5 -386
- package/src/sap/ui/codeeditor/js/ace/snippets/plsql.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/prql.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/python.js +5 -161
- package/src/sap/ui/codeeditor/js/ace/snippets/r.js +5 -124
- package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +5 -6
- package/src/sap/ui/codeeditor/js/ace/snippets/robot.js +16 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +5 -25
- package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +5 -931
- package/src/sap/ui/codeeditor/js/ace/snippets/sac.js +9 -0
- package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +5 -86
- package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +5 -12
- package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +5 -29
- package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +5 -72
- package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +5 -95
- package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +5 -193
- package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +5 -33
- package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +1 -2
- package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +5 -31
- package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +5 -87
- package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +44 -41
- package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +5 -172
- package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +5 -150
- package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +6 -123
- package/src/sap/ui/codeeditor/js/ace/theme-cloud9_day.js +19 -0
- package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night_low_color.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +6 -90
- package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +6 -91
- package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +6 -108
- package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +6 -113
- package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +6 -122
- package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +7 -137
- package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +6 -92
- package/src/sap/ui/codeeditor/js/ace/theme-github.js +7 -99
- package/src/sap/ui/codeeditor/js/ace/theme-github_dark.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-gob.js +6 -107
- package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +5 -76
- package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_dark_hard.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_light_hard.js +18 -0
- package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +6 -91
- package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +6 -116
- package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +6 -116
- package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +6 -99
- package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +6 -56
- package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +6 -90
- package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +6 -91
- package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +6 -102
- package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +6 -100
- package/src/sap/ui/codeeditor/js/ace/theme-nord_dark.js +6 -89
- package/src/sap/ui/codeeditor/js/ace/theme-one_dark.js +10 -131
- package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +6 -83
- package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +6 -86
- package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +6 -133
- package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +6 -109
- package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +3 -124
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +6 -101
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +6 -116
- package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +6 -103
- package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +6 -104
- package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +6 -89
- package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +6 -83
- package/src/sap/ui/codeeditor/js/ace/worker-base.js +516 -595
- package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-css.js +501 -578
- package/src/sap/ui/codeeditor/js/ace/worker-html.js +515 -584
- package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +2964 -2551
- package/src/sap/ui/codeeditor/js/ace/worker-json.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-lua.js +497 -576
- package/src/sap/ui/codeeditor/js/ace/worker-php.js +2906 -2795
- package/src/sap/ui/codeeditor/js/ace/worker-xml.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +496 -575
- package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +5851 -0
- package/src/sap/ui/codeeditor/library.js +6 -5
- package/LICENSES/BSD-2-Clause.txt +0 -22
|
@@ -1,90 +1,154 @@
|
|
|
1
|
-
ace.define("ace/mode/
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
1
|
+
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";
|
|
4
2
|
var oop = require("../lib/oop");
|
|
5
3
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
6
|
-
|
|
7
|
-
var DocCommentHighlightRules = function() {
|
|
4
|
+
var JsDocCommentHighlightRules = function () {
|
|
8
5
|
this.$rules = {
|
|
9
|
-
"start"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
"start": [
|
|
7
|
+
{
|
|
8
|
+
token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
|
|
9
|
+
regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
|
|
10
|
+
push: [
|
|
11
|
+
{
|
|
12
|
+
token: "lparen.doc",
|
|
13
|
+
regex: "{",
|
|
14
|
+
push: [
|
|
15
|
+
{
|
|
16
|
+
include: "doc-syntax"
|
|
17
|
+
}, {
|
|
18
|
+
token: "rparen.doc",
|
|
19
|
+
regex: "}|(?=$)",
|
|
20
|
+
next: "pop"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}, {
|
|
24
|
+
token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
|
|
25
|
+
regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
|
|
26
|
+
next: "pop"
|
|
27
|
+
}, {
|
|
28
|
+
token: "rparen.doc",
|
|
29
|
+
regex: "}|(?=$)",
|
|
30
|
+
next: "pop"
|
|
31
|
+
}, {
|
|
32
|
+
include: "doc-syntax"
|
|
33
|
+
}, {
|
|
34
|
+
defaultToken: "text.doc"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}, {
|
|
38
|
+
token: ["comment.doc.tag", "text.doc", "lparen.doc"],
|
|
39
|
+
regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
|
|
40
|
+
+ "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
|
|
41
|
+
push: [
|
|
42
|
+
{
|
|
43
|
+
token: "lparen.doc",
|
|
44
|
+
regex: "{",
|
|
45
|
+
push: [
|
|
46
|
+
{
|
|
47
|
+
include: "doc-syntax"
|
|
48
|
+
}, {
|
|
49
|
+
token: "rparen.doc",
|
|
50
|
+
regex: "}|(?=$)",
|
|
51
|
+
next: "pop"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}, {
|
|
55
|
+
token: "rparen.doc",
|
|
56
|
+
regex: "}|(?=$)",
|
|
57
|
+
next: "pop"
|
|
58
|
+
}, {
|
|
59
|
+
include: "doc-syntax"
|
|
60
|
+
}, {
|
|
61
|
+
defaultToken: "text.doc"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}, {
|
|
65
|
+
token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
|
|
66
|
+
regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
|
|
67
|
+
+ "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
|
|
68
|
+
+ "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
|
|
69
|
+
+ "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
|
|
70
|
+
}, {
|
|
71
|
+
token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
|
|
72
|
+
regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
|
|
73
|
+
}, {
|
|
74
|
+
token: "comment.doc.tag",
|
|
75
|
+
regex: "@access\\s+(?:private|public|protected)"
|
|
76
|
+
}, {
|
|
77
|
+
token: "comment.doc.tag",
|
|
78
|
+
regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
|
|
79
|
+
}, {
|
|
80
|
+
token: "comment.doc.tag",
|
|
81
|
+
regex: "@\\w+(?=\\s|$)"
|
|
82
|
+
},
|
|
83
|
+
JsDocCommentHighlightRules.getTagRule(),
|
|
84
|
+
{
|
|
85
|
+
defaultToken: "comment.doc",
|
|
86
|
+
caseInsensitive: true
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"doc-syntax": [{
|
|
90
|
+
token: "operator.doc",
|
|
91
|
+
regex: /[|:]/
|
|
92
|
+
}, {
|
|
93
|
+
token: "paren.doc",
|
|
94
|
+
regex: /[\[\]]/
|
|
95
|
+
}]
|
|
18
96
|
};
|
|
97
|
+
this.normalizeRules();
|
|
19
98
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
DocCommentHighlightRules.getTagRule = function(start) {
|
|
99
|
+
oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
|
|
100
|
+
JsDocCommentHighlightRules.getTagRule = function (start) {
|
|
24
101
|
return {
|
|
25
|
-
token
|
|
26
|
-
regex
|
|
102
|
+
token: "comment.doc.tag.storage.type",
|
|
103
|
+
regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
|
|
27
104
|
};
|
|
28
105
|
};
|
|
29
|
-
|
|
30
|
-
DocCommentHighlightRules.getStartRule = function(start) {
|
|
106
|
+
JsDocCommentHighlightRules.getStartRule = function (start) {
|
|
31
107
|
return {
|
|
32
|
-
token
|
|
33
|
-
regex
|
|
34
|
-
next
|
|
108
|
+
token: "comment.doc",
|
|
109
|
+
regex: "\\/\\*(?=\\*)",
|
|
110
|
+
next: start
|
|
35
111
|
};
|
|
36
112
|
};
|
|
37
|
-
|
|
38
|
-
DocCommentHighlightRules.getEndRule = function (start) {
|
|
113
|
+
JsDocCommentHighlightRules.getEndRule = function (start) {
|
|
39
114
|
return {
|
|
40
|
-
token
|
|
41
|
-
regex
|
|
42
|
-
next
|
|
115
|
+
token: "comment.doc",
|
|
116
|
+
regex: "\\*\\/",
|
|
117
|
+
next: start
|
|
43
118
|
};
|
|
44
119
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
|
120
|
+
exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
|
|
48
121
|
|
|
49
122
|
});
|
|
50
123
|
|
|
51
|
-
ace.define("ace/mode/javascript_highlight_rules",[], function(require, exports, module)
|
|
52
|
-
"use strict";
|
|
53
|
-
|
|
124
|
+
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";
|
|
54
125
|
var oop = require("../lib/oop");
|
|
55
|
-
var DocCommentHighlightRules = require("./
|
|
126
|
+
var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
|
|
56
127
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
57
128
|
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
|
|
58
|
-
|
|
59
|
-
var JavaScriptHighlightRules = function(options) {
|
|
129
|
+
var JavaScriptHighlightRules = function (options) {
|
|
60
130
|
var keywordMapper = this.createKeywordMapper({
|
|
61
|
-
"variable.language":
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"SyntaxError|TypeError|URIError|" +
|
|
131
|
+
"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
|
|
132
|
+
"Namespace|QName|XML|XMLList|" + // E4X
|
|
133
|
+
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
|
134
|
+
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
|
135
|
+
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
|
|
136
|
+
"SyntaxError|TypeError|URIError|" +
|
|
68
137
|
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
|
|
69
|
-
"isNaN|parseFloat|parseInt|"
|
|
70
|
-
"JSON|Math|"
|
|
71
|
-
"this|arguments|prototype|window|document"
|
|
72
|
-
"keyword":
|
|
73
|
-
"const|yield|import|get|set|async|await|" +
|
|
138
|
+
"isNaN|parseFloat|parseInt|" +
|
|
139
|
+
"JSON|Math|" + // Other
|
|
140
|
+
"this|arguments|prototype|window|document",
|
|
141
|
+
"keyword": "const|yield|import|get|set|async|await|" +
|
|
74
142
|
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
|
75
143
|
"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
|
76
144
|
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
|
77
|
-
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
|
|
78
|
-
"storage.type":
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"null|Infinity|NaN|undefined",
|
|
82
|
-
"support.function":
|
|
83
|
-
"alert",
|
|
145
|
+
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
|
|
146
|
+
"storage.type": "const|let|var|function",
|
|
147
|
+
"constant.language": "null|Infinity|NaN|undefined",
|
|
148
|
+
"support.function": "alert",
|
|
84
149
|
"constant.language.boolean": "true|false"
|
|
85
150
|
}, "identifier");
|
|
86
151
|
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
|
|
87
|
-
|
|
88
152
|
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
|
89
153
|
"u[0-9a-fA-F]{4}|" + // unicode
|
|
90
154
|
"u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
|
|
@@ -92,143 +156,142 @@ var JavaScriptHighlightRules = function(options) {
|
|
|
92
156
|
"3[0-7][0-7]?|" + // oct
|
|
93
157
|
"[4-7][0-7]?|" + //oct
|
|
94
158
|
".)";
|
|
95
|
-
|
|
96
159
|
this.$rules = {
|
|
97
|
-
"no_regex"
|
|
160
|
+
"no_regex": [
|
|
98
161
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
|
99
162
|
comments("no_regex"),
|
|
100
163
|
{
|
|
101
|
-
token
|
|
102
|
-
regex
|
|
103
|
-
next
|
|
164
|
+
token: "string",
|
|
165
|
+
regex: "'(?=.)",
|
|
166
|
+
next: "qstring"
|
|
104
167
|
}, {
|
|
105
|
-
token
|
|
106
|
-
regex
|
|
107
|
-
next
|
|
168
|
+
token: "string",
|
|
169
|
+
regex: '"(?=.)',
|
|
170
|
+
next: "qqstring"
|
|
108
171
|
}, {
|
|
109
|
-
token
|
|
110
|
-
regex
|
|
172
|
+
token: "constant.numeric",
|
|
173
|
+
regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
|
|
111
174
|
}, {
|
|
112
|
-
token
|
|
113
|
-
regex
|
|
175
|
+
token: "constant.numeric",
|
|
176
|
+
regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
|
|
114
177
|
}, {
|
|
115
|
-
token
|
|
178
|
+
token: [
|
|
116
179
|
"storage.type", "punctuation.operator", "support.function",
|
|
117
|
-
"punctuation.operator", "entity.name.function", "text","keyword.operator"
|
|
180
|
+
"punctuation.operator", "entity.name.function", "text", "keyword.operator"
|
|
118
181
|
],
|
|
119
|
-
regex
|
|
182
|
+
regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
|
|
120
183
|
next: "function_arguments"
|
|
121
184
|
}, {
|
|
122
|
-
token
|
|
185
|
+
token: [
|
|
123
186
|
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
|
124
187
|
"keyword.operator", "text", "storage.type", "text", "paren.lparen"
|
|
125
188
|
],
|
|
126
|
-
regex
|
|
189
|
+
regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
|
|
127
190
|
next: "function_arguments"
|
|
128
191
|
}, {
|
|
129
|
-
token
|
|
192
|
+
token: [
|
|
130
193
|
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
|
|
131
194
|
"text", "paren.lparen"
|
|
132
195
|
],
|
|
133
|
-
regex
|
|
196
|
+
regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
|
|
134
197
|
next: "function_arguments"
|
|
135
198
|
}, {
|
|
136
|
-
token
|
|
199
|
+
token: [
|
|
137
200
|
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
|
138
201
|
"keyword.operator", "text",
|
|
139
202
|
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
|
140
203
|
],
|
|
141
|
-
regex
|
|
204
|
+
regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
|
|
142
205
|
next: "function_arguments"
|
|
143
206
|
}, {
|
|
144
|
-
token
|
|
207
|
+
token: [
|
|
145
208
|
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
|
146
209
|
],
|
|
147
|
-
regex
|
|
210
|
+
regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
|
|
148
211
|
next: "function_arguments"
|
|
149
212
|
}, {
|
|
150
|
-
token
|
|
213
|
+
token: [
|
|
151
214
|
"entity.name.function", "text", "punctuation.operator",
|
|
152
215
|
"text", "storage.type", "text", "paren.lparen"
|
|
153
216
|
],
|
|
154
|
-
regex
|
|
217
|
+
regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
|
|
155
218
|
next: "function_arguments"
|
|
156
219
|
}, {
|
|
157
|
-
token
|
|
220
|
+
token: [
|
|
158
221
|
"text", "text", "storage.type", "text", "paren.lparen"
|
|
159
222
|
],
|
|
160
|
-
regex
|
|
223
|
+
regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
|
|
161
224
|
next: "function_arguments"
|
|
162
225
|
}, {
|
|
163
|
-
token
|
|
164
|
-
regex
|
|
226
|
+
token: "keyword",
|
|
227
|
+
regex: "from(?=\\s*('|\"))"
|
|
165
228
|
}, {
|
|
166
|
-
token
|
|
167
|
-
regex
|
|
168
|
-
next
|
|
229
|
+
token: "keyword",
|
|
230
|
+
regex: "(?:" + kwBeforeRe + ")\\b",
|
|
231
|
+
next: "start"
|
|
169
232
|
}, {
|
|
170
|
-
token
|
|
171
|
-
regex
|
|
233
|
+
token: "support.constant",
|
|
234
|
+
regex: /that\b/
|
|
172
235
|
}, {
|
|
173
|
-
token
|
|
174
|
-
regex
|
|
236
|
+
token: ["storage.type", "punctuation.operator", "support.function.firebug"],
|
|
237
|
+
regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
|
|
175
238
|
}, {
|
|
176
|
-
token
|
|
177
|
-
regex
|
|
239
|
+
token: keywordMapper,
|
|
240
|
+
regex: identifierRe
|
|
178
241
|
}, {
|
|
179
|
-
token
|
|
180
|
-
regex
|
|
181
|
-
next
|
|
242
|
+
token: "punctuation.operator",
|
|
243
|
+
regex: /[.](?![.])/,
|
|
244
|
+
next: "property"
|
|
182
245
|
}, {
|
|
183
|
-
token
|
|
184
|
-
regex
|
|
185
|
-
next
|
|
246
|
+
token: "storage.type",
|
|
247
|
+
regex: /=>/,
|
|
248
|
+
next: "start"
|
|
186
249
|
}, {
|
|
187
|
-
token
|
|
188
|
-
regex
|
|
189
|
-
next
|
|
250
|
+
token: "keyword.operator",
|
|
251
|
+
regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
|
|
252
|
+
next: "start"
|
|
190
253
|
}, {
|
|
191
|
-
token
|
|
192
|
-
regex
|
|
193
|
-
next
|
|
254
|
+
token: "punctuation.operator",
|
|
255
|
+
regex: /[?:,;.]/,
|
|
256
|
+
next: "start"
|
|
194
257
|
}, {
|
|
195
|
-
token
|
|
196
|
-
regex
|
|
197
|
-
next
|
|
258
|
+
token: "paren.lparen",
|
|
259
|
+
regex: /[\[({]/,
|
|
260
|
+
next: "start"
|
|
198
261
|
}, {
|
|
199
|
-
token
|
|
200
|
-
regex
|
|
262
|
+
token: "paren.rparen",
|
|
263
|
+
regex: /[\])}]/
|
|
201
264
|
}, {
|
|
202
265
|
token: "comment",
|
|
203
266
|
regex: /^#!.*$/
|
|
204
267
|
}
|
|
205
268
|
],
|
|
206
269
|
property: [{
|
|
207
|
-
token
|
|
208
|
-
regex
|
|
270
|
+
token: "text",
|
|
271
|
+
regex: "\\s+"
|
|
209
272
|
}, {
|
|
210
|
-
token
|
|
273
|
+
token: [
|
|
211
274
|
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
|
212
275
|
"keyword.operator", "text",
|
|
213
276
|
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
|
214
277
|
],
|
|
215
|
-
regex
|
|
278
|
+
regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
|
|
216
279
|
next: "function_arguments"
|
|
217
280
|
}, {
|
|
218
|
-
token
|
|
219
|
-
regex
|
|
281
|
+
token: "punctuation.operator",
|
|
282
|
+
regex: /[.](?![.])/
|
|
220
283
|
}, {
|
|
221
|
-
token
|
|
222
|
-
regex
|
|
284
|
+
token: "support.function",
|
|
285
|
+
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(?=\()/
|
|
223
286
|
}, {
|
|
224
|
-
token
|
|
225
|
-
regex
|
|
287
|
+
token: "support.function.dom",
|
|
288
|
+
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(?=\()/
|
|
226
289
|
}, {
|
|
227
|
-
token
|
|
228
|
-
regex
|
|
290
|
+
token: "support.constant",
|
|
291
|
+
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/
|
|
229
292
|
}, {
|
|
230
|
-
token
|
|
231
|
-
regex
|
|
293
|
+
token: "identifier",
|
|
294
|
+
regex: identifierRe
|
|
232
295
|
}, {
|
|
233
296
|
regex: "",
|
|
234
297
|
token: "empty",
|
|
@@ -243,9 +306,9 @@ var JavaScriptHighlightRules = function(options) {
|
|
|
243
306
|
regex: "\\/",
|
|
244
307
|
next: "regex"
|
|
245
308
|
}, {
|
|
246
|
-
token
|
|
247
|
-
regex
|
|
248
|
-
next
|
|
309
|
+
token: "text",
|
|
310
|
+
regex: "\\s+|^$",
|
|
311
|
+
next: "start"
|
|
249
312
|
}, {
|
|
250
313
|
token: "empty",
|
|
251
314
|
regex: "",
|
|
@@ -261,13 +324,13 @@ var JavaScriptHighlightRules = function(options) {
|
|
|
261
324
|
regex: "/[sxngimy]*",
|
|
262
325
|
next: "no_regex"
|
|
263
326
|
}, {
|
|
264
|
-
token
|
|
327
|
+
token: "invalid",
|
|
265
328
|
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
|
266
329
|
}, {
|
|
267
|
-
token
|
|
330
|
+
token: "constant.language.escape",
|
|
268
331
|
regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
|
|
269
332
|
}, {
|
|
270
|
-
token
|
|
333
|
+
token: "constant.language.delimiter",
|
|
271
334
|
regex: /\|/
|
|
272
335
|
}, {
|
|
273
336
|
token: "constant.language.escape",
|
|
@@ -300,13 +363,67 @@ var JavaScriptHighlightRules = function(options) {
|
|
|
300
363
|
defaultToken: "string.regexp.charachterclass"
|
|
301
364
|
}
|
|
302
365
|
],
|
|
366
|
+
"default_parameter": [
|
|
367
|
+
{
|
|
368
|
+
token: "string",
|
|
369
|
+
regex: "'(?=.)",
|
|
370
|
+
push: [
|
|
371
|
+
{
|
|
372
|
+
token: "string",
|
|
373
|
+
regex: "'|$",
|
|
374
|
+
next: "pop"
|
|
375
|
+
}, {
|
|
376
|
+
include: "qstring"
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
}, {
|
|
380
|
+
token: "string",
|
|
381
|
+
regex: '"(?=.)',
|
|
382
|
+
push: [
|
|
383
|
+
{
|
|
384
|
+
token: "string",
|
|
385
|
+
regex: '"|$',
|
|
386
|
+
next: "pop"
|
|
387
|
+
}, {
|
|
388
|
+
include: "qqstring"
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
}, {
|
|
392
|
+
token: "constant.language",
|
|
393
|
+
regex: "null|Infinity|NaN|undefined"
|
|
394
|
+
}, {
|
|
395
|
+
token: "constant.numeric",
|
|
396
|
+
regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
|
|
397
|
+
}, {
|
|
398
|
+
token: "constant.numeric",
|
|
399
|
+
regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
|
|
400
|
+
}, {
|
|
401
|
+
token: "punctuation.operator",
|
|
402
|
+
regex: ",",
|
|
403
|
+
next: "function_arguments"
|
|
404
|
+
}, {
|
|
405
|
+
token: "text",
|
|
406
|
+
regex: "\\s+"
|
|
407
|
+
}, {
|
|
408
|
+
token: "punctuation.operator",
|
|
409
|
+
regex: "$"
|
|
410
|
+
}, {
|
|
411
|
+
token: "empty",
|
|
412
|
+
regex: "",
|
|
413
|
+
next: "no_regex"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
303
416
|
"function_arguments": [
|
|
417
|
+
comments("function_arguments"),
|
|
304
418
|
{
|
|
305
419
|
token: "variable.parameter",
|
|
306
420
|
regex: identifierRe
|
|
307
421
|
}, {
|
|
308
422
|
token: "punctuation.operator",
|
|
309
|
-
regex: "
|
|
423
|
+
regex: ","
|
|
424
|
+
}, {
|
|
425
|
+
token: "text",
|
|
426
|
+
regex: "\\s+"
|
|
310
427
|
}, {
|
|
311
428
|
token: "punctuation.operator",
|
|
312
429
|
regex: "$"
|
|
@@ -316,44 +433,42 @@ var JavaScriptHighlightRules = function(options) {
|
|
|
316
433
|
next: "no_regex"
|
|
317
434
|
}
|
|
318
435
|
],
|
|
319
|
-
"qqstring"
|
|
436
|
+
"qqstring": [
|
|
320
437
|
{
|
|
321
|
-
token
|
|
322
|
-
regex
|
|
438
|
+
token: "constant.language.escape",
|
|
439
|
+
regex: escapedRe
|
|
323
440
|
}, {
|
|
324
|
-
token
|
|
325
|
-
regex
|
|
326
|
-
consumeLineEnd
|
|
441
|
+
token: "string",
|
|
442
|
+
regex: "\\\\$",
|
|
443
|
+
consumeLineEnd: true
|
|
327
444
|
}, {
|
|
328
|
-
token
|
|
329
|
-
regex
|
|
330
|
-
next
|
|
445
|
+
token: "string",
|
|
446
|
+
regex: '"|$',
|
|
447
|
+
next: "no_regex"
|
|
331
448
|
}, {
|
|
332
449
|
defaultToken: "string"
|
|
333
450
|
}
|
|
334
451
|
],
|
|
335
|
-
"qstring"
|
|
452
|
+
"qstring": [
|
|
336
453
|
{
|
|
337
|
-
token
|
|
338
|
-
regex
|
|
454
|
+
token: "constant.language.escape",
|
|
455
|
+
regex: escapedRe
|
|
339
456
|
}, {
|
|
340
|
-
token
|
|
341
|
-
regex
|
|
342
|
-
consumeLineEnd
|
|
457
|
+
token: "string",
|
|
458
|
+
regex: "\\\\$",
|
|
459
|
+
consumeLineEnd: true
|
|
343
460
|
}, {
|
|
344
|
-
token
|
|
345
|
-
regex
|
|
346
|
-
next
|
|
461
|
+
token: "string",
|
|
462
|
+
regex: "'|$",
|
|
463
|
+
next: "no_regex"
|
|
347
464
|
}, {
|
|
348
465
|
defaultToken: "string"
|
|
349
466
|
}
|
|
350
467
|
]
|
|
351
468
|
};
|
|
352
|
-
|
|
353
|
-
|
|
354
469
|
if (!options || !options.noES6) {
|
|
355
470
|
this.$rules.no_regex.unshift({
|
|
356
|
-
regex: "[{}]", onMatch: function(val, state, stack) {
|
|
471
|
+
regex: "[{}]", onMatch: function (val, state, stack) {
|
|
357
472
|
this.next = val == "{" ? this.nextState : "";
|
|
358
473
|
if (val == "{" && stack.length) {
|
|
359
474
|
stack.unshift("start", state);
|
|
@@ -368,40 +483,60 @@ var JavaScriptHighlightRules = function(options) {
|
|
|
368
483
|
},
|
|
369
484
|
nextState: "start"
|
|
370
485
|
}, {
|
|
371
|
-
token
|
|
372
|
-
regex
|
|
373
|
-
push
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
486
|
+
token: "string.quasi.start",
|
|
487
|
+
regex: /`/,
|
|
488
|
+
push: [{
|
|
489
|
+
token: "constant.language.escape",
|
|
490
|
+
regex: escapedRe
|
|
491
|
+
}, {
|
|
492
|
+
token: "paren.quasi.start",
|
|
493
|
+
regex: /\${/,
|
|
494
|
+
push: "start"
|
|
495
|
+
}, {
|
|
496
|
+
token: "string.quasi.end",
|
|
497
|
+
regex: /`/,
|
|
498
|
+
next: "pop"
|
|
499
|
+
}, {
|
|
500
|
+
defaultToken: "string.quasi"
|
|
501
|
+
}]
|
|
502
|
+
}, {
|
|
503
|
+
token: ["variable.parameter", "text"],
|
|
504
|
+
regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
|
|
505
|
+
}, {
|
|
506
|
+
token: "paren.lparen",
|
|
507
|
+
regex: "(\\()(?=.+\\s*=>)",
|
|
508
|
+
next: "function_arguments"
|
|
509
|
+
}, {
|
|
510
|
+
token: "variable.language",
|
|
511
|
+
regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
|
|
512
|
+
});
|
|
513
|
+
this.$rules["function_arguments"].unshift({
|
|
514
|
+
token: "keyword.operator",
|
|
515
|
+
regex: "=",
|
|
516
|
+
next: "default_parameter"
|
|
517
|
+
}, {
|
|
518
|
+
token: "keyword.operator",
|
|
519
|
+
regex: "\\.{3}"
|
|
520
|
+
});
|
|
521
|
+
this.$rules["property"].unshift({
|
|
522
|
+
token: "support.function",
|
|
523
|
+
regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
|
|
524
|
+
+ "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
|
|
525
|
+
}, {
|
|
526
|
+
token: "constant.language",
|
|
527
|
+
regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
|
|
387
528
|
});
|
|
388
|
-
|
|
389
529
|
if (!options || options.jsx != false)
|
|
390
530
|
JSX.call(this);
|
|
391
531
|
}
|
|
392
|
-
|
|
393
|
-
this.embedRules(DocCommentHighlightRules, "doc-",
|
|
394
|
-
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
|
|
395
|
-
|
|
532
|
+
this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
|
|
396
533
|
this.normalizeRules();
|
|
397
534
|
};
|
|
398
|
-
|
|
399
535
|
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
|
400
|
-
|
|
401
536
|
function JSX() {
|
|
402
537
|
var tagRegex = identifierRe.replace("\\d", "\\d\\-");
|
|
403
538
|
var jsxTag = {
|
|
404
|
-
onMatch
|
|
539
|
+
onMatch: function (val, state, stack) {
|
|
405
540
|
var offset = val.charAt(1) == "/" ? 2 : 1;
|
|
406
541
|
if (offset == 1) {
|
|
407
542
|
if (state != this.nextState)
|
|
@@ -409,7 +544,8 @@ function JSX() {
|
|
|
409
544
|
else
|
|
410
545
|
stack.unshift(this.next);
|
|
411
546
|
stack[2]++;
|
|
412
|
-
}
|
|
547
|
+
}
|
|
548
|
+
else if (offset == 2) {
|
|
413
549
|
if (state == this.nextState) {
|
|
414
550
|
stack[1]--;
|
|
415
551
|
if (!stack[1] || stack[1] < 0) {
|
|
@@ -419,14 +555,14 @@ function JSX() {
|
|
|
419
555
|
}
|
|
420
556
|
}
|
|
421
557
|
return [{
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
558
|
+
type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
|
|
559
|
+
value: val.slice(0, offset)
|
|
560
|
+
}, {
|
|
561
|
+
type: "meta.tag.tag-name.xml",
|
|
562
|
+
value: val.substr(offset)
|
|
563
|
+
}];
|
|
428
564
|
},
|
|
429
|
-
regex
|
|
565
|
+
regex: "</?" + tagRegex + "",
|
|
430
566
|
next: "jsxAttributes",
|
|
431
567
|
nextState: "jsx"
|
|
432
568
|
};
|
|
@@ -439,212 +575,177 @@ function JSX() {
|
|
|
439
575
|
this.$rules.jsx = [
|
|
440
576
|
jsxJsRule,
|
|
441
577
|
jsxTag,
|
|
442
|
-
{include
|
|
443
|
-
{defaultToken: "string"}
|
|
578
|
+
{ include: "reference" },
|
|
579
|
+
{ defaultToken: "string" }
|
|
444
580
|
];
|
|
445
581
|
this.$rules.jsxAttributes = [{
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
582
|
+
token: "meta.tag.punctuation.tag-close.xml",
|
|
583
|
+
regex: "/?>",
|
|
584
|
+
onMatch: function (value, currentState, stack) {
|
|
585
|
+
if (currentState == stack[0])
|
|
586
|
+
stack.shift();
|
|
587
|
+
if (value.length == 2) {
|
|
588
|
+
if (stack[0] == this.nextState)
|
|
589
|
+
stack[1]--;
|
|
590
|
+
if (!stack[1] || stack[1] < 0) {
|
|
591
|
+
stack.splice(0, 2);
|
|
592
|
+
}
|
|
456
593
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
594
|
+
this.next = stack[0] || "start";
|
|
595
|
+
return [{ type: this.token, value: value }];
|
|
596
|
+
},
|
|
597
|
+
nextState: "jsx"
|
|
460
598
|
},
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
},
|
|
493
|
-
jsxTag
|
|
599
|
+
jsxJsRule,
|
|
600
|
+
comments("jsxAttributes"),
|
|
601
|
+
{
|
|
602
|
+
token: "entity.other.attribute-name.xml",
|
|
603
|
+
regex: tagRegex
|
|
604
|
+
}, {
|
|
605
|
+
token: "keyword.operator.attribute-equals.xml",
|
|
606
|
+
regex: "="
|
|
607
|
+
}, {
|
|
608
|
+
token: "text.tag-whitespace.xml",
|
|
609
|
+
regex: "\\s+"
|
|
610
|
+
}, {
|
|
611
|
+
token: "string.attribute-value.xml",
|
|
612
|
+
regex: "'",
|
|
613
|
+
stateName: "jsx_attr_q",
|
|
614
|
+
push: [
|
|
615
|
+
{ token: "string.attribute-value.xml", regex: "'", next: "pop" },
|
|
616
|
+
{ include: "reference" },
|
|
617
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
618
|
+
]
|
|
619
|
+
}, {
|
|
620
|
+
token: "string.attribute-value.xml",
|
|
621
|
+
regex: '"',
|
|
622
|
+
stateName: "jsx_attr_qq",
|
|
623
|
+
push: [
|
|
624
|
+
{ token: "string.attribute-value.xml", regex: '"', next: "pop" },
|
|
625
|
+
{ include: "reference" },
|
|
626
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
627
|
+
]
|
|
628
|
+
},
|
|
629
|
+
jsxTag
|
|
494
630
|
];
|
|
495
631
|
this.$rules.reference = [{
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
632
|
+
token: "constant.language.escape.reference.xml",
|
|
633
|
+
regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
634
|
+
}];
|
|
499
635
|
}
|
|
500
|
-
|
|
501
636
|
function comments(next) {
|
|
502
637
|
return [
|
|
503
638
|
{
|
|
504
|
-
token
|
|
505
|
-
regex
|
|
639
|
+
token: "comment",
|
|
640
|
+
regex: /\/\*/,
|
|
506
641
|
next: [
|
|
507
642
|
DocCommentHighlightRules.getTagRule(),
|
|
508
|
-
{token
|
|
509
|
-
{defaultToken
|
|
643
|
+
{ token: "comment", regex: "\\*\\/", next: next || "pop" },
|
|
644
|
+
{ defaultToken: "comment", caseInsensitive: true }
|
|
510
645
|
]
|
|
511
646
|
}, {
|
|
512
|
-
token
|
|
513
|
-
regex
|
|
647
|
+
token: "comment",
|
|
648
|
+
regex: "\\/\\/",
|
|
514
649
|
next: [
|
|
515
650
|
DocCommentHighlightRules.getTagRule(),
|
|
516
|
-
{token
|
|
517
|
-
{defaultToken
|
|
651
|
+
{ token: "comment", regex: "$|^", next: next || "pop" },
|
|
652
|
+
{ defaultToken: "comment", caseInsensitive: true }
|
|
518
653
|
]
|
|
519
654
|
}
|
|
520
655
|
];
|
|
521
656
|
}
|
|
522
657
|
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
|
523
|
-
});
|
|
524
658
|
|
|
525
|
-
|
|
526
|
-
"use strict";
|
|
659
|
+
});
|
|
527
660
|
|
|
661
|
+
ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
|
|
528
662
|
var Range = require("../range").Range;
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
(
|
|
533
|
-
|
|
534
|
-
this.checkOutdent = function(line, input) {
|
|
535
|
-
if (! /^\s+$/.test(line))
|
|
663
|
+
var MatchingBraceOutdent = function () { };
|
|
664
|
+
(function () {
|
|
665
|
+
this.checkOutdent = function (line, input) {
|
|
666
|
+
if (!/^\s+$/.test(line))
|
|
536
667
|
return false;
|
|
537
|
-
|
|
538
668
|
return /^\s*\}/.test(input);
|
|
539
669
|
};
|
|
540
|
-
|
|
541
|
-
this.autoOutdent = function(doc, row) {
|
|
670
|
+
this.autoOutdent = function (doc, row) {
|
|
542
671
|
var line = doc.getLine(row);
|
|
543
672
|
var match = line.match(/^(\s*\})/);
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
673
|
+
if (!match)
|
|
674
|
+
return 0;
|
|
547
675
|
var column = match[1].length;
|
|
548
|
-
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
676
|
+
var openBracePos = doc.findMatchingBracket({ row: row, column: column });
|
|
677
|
+
if (!openBracePos || openBracePos.row == row)
|
|
678
|
+
return 0;
|
|
552
679
|
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
|
553
|
-
doc.replace(new Range(row, 0, row, column-1), indent);
|
|
680
|
+
doc.replace(new Range(row, 0, row, column - 1), indent);
|
|
554
681
|
};
|
|
555
|
-
|
|
556
|
-
this.$getIndent = function(line) {
|
|
682
|
+
this.$getIndent = function (line) {
|
|
557
683
|
return line.match(/^\s*/)[0];
|
|
558
684
|
};
|
|
559
|
-
|
|
560
685
|
}).call(MatchingBraceOutdent.prototype);
|
|
561
|
-
|
|
562
686
|
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
|
563
|
-
});
|
|
564
687
|
|
|
565
|
-
|
|
566
|
-
"use strict";
|
|
688
|
+
});
|
|
567
689
|
|
|
690
|
+
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";
|
|
568
691
|
var oop = require("../../lib/oop");
|
|
569
692
|
var Range = require("../../range").Range;
|
|
570
693
|
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
571
|
-
|
|
572
|
-
var FoldMode = exports.FoldMode = function(commentRegex) {
|
|
694
|
+
var FoldMode = exports.FoldMode = function (commentRegex) {
|
|
573
695
|
if (commentRegex) {
|
|
574
|
-
this.foldingStartMarker = new RegExp(
|
|
575
|
-
|
|
576
|
-
);
|
|
577
|
-
this.foldingStopMarker = new RegExp(
|
|
578
|
-
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
|
579
|
-
);
|
|
696
|
+
this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
|
|
697
|
+
this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
|
|
580
698
|
}
|
|
581
699
|
};
|
|
582
700
|
oop.inherits(FoldMode, BaseFoldMode);
|
|
583
|
-
|
|
584
|
-
(function() {
|
|
585
|
-
|
|
701
|
+
(function () {
|
|
586
702
|
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
|
587
703
|
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
|
588
|
-
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
|
704
|
+
this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
|
|
589
705
|
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
|
590
706
|
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
|
591
707
|
this._getFoldWidgetBase = this.getFoldWidget;
|
|
592
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
|
708
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
593
709
|
var line = session.getLine(row);
|
|
594
|
-
|
|
595
710
|
if (this.singleLineBlockCommentRe.test(line)) {
|
|
596
711
|
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
|
597
712
|
return "";
|
|
598
713
|
}
|
|
599
|
-
|
|
600
714
|
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
|
601
|
-
|
|
602
715
|
if (!fw && this.startRegionRe.test(line))
|
|
603
716
|
return "start"; // lineCommentRegionStart
|
|
604
|
-
|
|
605
717
|
return fw;
|
|
606
718
|
};
|
|
607
|
-
|
|
608
|
-
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
|
719
|
+
this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
|
|
609
720
|
var line = session.getLine(row);
|
|
610
|
-
|
|
611
721
|
if (this.startRegionRe.test(line))
|
|
612
722
|
return this.getCommentRegionBlock(session, line, row);
|
|
613
|
-
|
|
614
723
|
var match = line.match(this.foldingStartMarker);
|
|
615
724
|
if (match) {
|
|
616
725
|
var i = match.index;
|
|
617
|
-
|
|
618
726
|
if (match[1])
|
|
619
727
|
return this.openingBracketBlock(session, match[1], row, i);
|
|
620
|
-
|
|
621
728
|
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
|
622
|
-
|
|
623
729
|
if (range && !range.isMultiLine()) {
|
|
624
730
|
if (forceMultiline) {
|
|
625
731
|
range = this.getSectionRange(session, row);
|
|
626
|
-
}
|
|
732
|
+
}
|
|
733
|
+
else if (foldStyle != "all")
|
|
627
734
|
range = null;
|
|
628
735
|
}
|
|
629
|
-
|
|
630
736
|
return range;
|
|
631
737
|
}
|
|
632
|
-
|
|
633
738
|
if (foldStyle === "markbegin")
|
|
634
739
|
return;
|
|
635
|
-
|
|
636
740
|
var match = line.match(this.foldingStopMarker);
|
|
637
741
|
if (match) {
|
|
638
742
|
var i = match.index + match[0].length;
|
|
639
|
-
|
|
640
743
|
if (match[1])
|
|
641
744
|
return this.closingBracketBlock(session, match[1], row, i);
|
|
642
|
-
|
|
643
745
|
return session.getCommentFoldRange(row, i, -1);
|
|
644
746
|
}
|
|
645
747
|
};
|
|
646
|
-
|
|
647
|
-
this.getSectionRange = function(session, row) {
|
|
748
|
+
this.getSectionRange = function (session, row) {
|
|
648
749
|
var line = session.getLine(row);
|
|
649
750
|
var startIndent = line.search(/\S/);
|
|
650
751
|
var startRow = row;
|
|
@@ -657,54 +758,52 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|
|
657
758
|
var indent = line.search(/\S/);
|
|
658
759
|
if (indent === -1)
|
|
659
760
|
continue;
|
|
660
|
-
if
|
|
761
|
+
if (startIndent > indent)
|
|
661
762
|
break;
|
|
662
763
|
var subRange = this.getFoldWidgetRange(session, "all", row);
|
|
663
|
-
|
|
664
764
|
if (subRange) {
|
|
665
765
|
if (subRange.start.row <= startRow) {
|
|
666
766
|
break;
|
|
667
|
-
}
|
|
767
|
+
}
|
|
768
|
+
else if (subRange.isMultiLine()) {
|
|
668
769
|
row = subRange.end.row;
|
|
669
|
-
}
|
|
770
|
+
}
|
|
771
|
+
else if (startIndent == indent) {
|
|
670
772
|
break;
|
|
671
773
|
}
|
|
672
774
|
}
|
|
673
775
|
endRow = row;
|
|
674
776
|
}
|
|
675
|
-
|
|
676
777
|
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
|
677
778
|
};
|
|
678
|
-
this.getCommentRegionBlock = function(session, line, row) {
|
|
779
|
+
this.getCommentRegionBlock = function (session, line, row) {
|
|
679
780
|
var startColumn = line.search(/\s*$/);
|
|
680
781
|
var maxRow = session.getLength();
|
|
681
782
|
var startRow = row;
|
|
682
|
-
|
|
683
783
|
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
|
684
784
|
var depth = 1;
|
|
685
785
|
while (++row < maxRow) {
|
|
686
786
|
line = session.getLine(row);
|
|
687
787
|
var m = re.exec(line);
|
|
688
|
-
if (!m)
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
788
|
+
if (!m)
|
|
789
|
+
continue;
|
|
790
|
+
if (m[1])
|
|
791
|
+
depth--;
|
|
792
|
+
else
|
|
793
|
+
depth++;
|
|
794
|
+
if (!depth)
|
|
795
|
+
break;
|
|
693
796
|
}
|
|
694
|
-
|
|
695
797
|
var endRow = row;
|
|
696
798
|
if (endRow > startRow) {
|
|
697
799
|
return new Range(startRow, startColumn, endRow, line.length);
|
|
698
800
|
}
|
|
699
801
|
};
|
|
700
|
-
|
|
701
802
|
}).call(FoldMode.prototype);
|
|
702
803
|
|
|
703
804
|
});
|
|
704
805
|
|
|
705
|
-
ace.define("ace/mode/javascript",[], function(require, exports, module)
|
|
706
|
-
"use strict";
|
|
707
|
-
|
|
806
|
+
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";
|
|
708
807
|
var oop = require("../lib/oop");
|
|
709
808
|
var TextMode = require("./text").Mode;
|
|
710
809
|
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
|
@@ -712,39 +811,35 @@ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutd
|
|
|
712
811
|
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
|
713
812
|
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
|
714
813
|
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
|
715
|
-
|
|
716
|
-
var Mode = function() {
|
|
814
|
+
var Mode = function () {
|
|
717
815
|
this.HighlightRules = JavaScriptHighlightRules;
|
|
718
|
-
|
|
719
816
|
this.$outdent = new MatchingBraceOutdent();
|
|
720
817
|
this.$behaviour = new CstyleBehaviour();
|
|
721
818
|
this.foldingRules = new CStyleFoldMode();
|
|
722
819
|
};
|
|
723
820
|
oop.inherits(Mode, TextMode);
|
|
724
|
-
|
|
725
|
-
(function() {
|
|
726
|
-
|
|
821
|
+
(function () {
|
|
727
822
|
this.lineCommentStart = "//";
|
|
728
|
-
this.blockComment = {start: "/*", end: "*/"};
|
|
729
|
-
this.$quotes = {'"': '"', "'": "'", "`": "`"};
|
|
730
|
-
|
|
731
|
-
|
|
823
|
+
this.blockComment = { start: "/*", end: "*/" };
|
|
824
|
+
this.$quotes = { '"': '"', "'": "'", "`": "`" };
|
|
825
|
+
this.$pairQuotesAfter = {
|
|
826
|
+
"`": /\w/
|
|
827
|
+
};
|
|
828
|
+
this.getNextLineIndent = function (state, line, tab) {
|
|
732
829
|
var indent = this.$getIndent(line);
|
|
733
|
-
|
|
734
830
|
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
|
735
831
|
var tokens = tokenizedLine.tokens;
|
|
736
832
|
var endState = tokenizedLine.state;
|
|
737
|
-
|
|
738
|
-
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
|
833
|
+
if (tokens.length && tokens[tokens.length - 1].type == "comment") {
|
|
739
834
|
return indent;
|
|
740
835
|
}
|
|
741
|
-
|
|
742
836
|
if (state == "start" || state == "no_regex") {
|
|
743
837
|
var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
|
|
744
838
|
if (match) {
|
|
745
839
|
indent += tab;
|
|
746
840
|
}
|
|
747
|
-
}
|
|
841
|
+
}
|
|
842
|
+
else if (state == "doc-start") {
|
|
748
843
|
if (endState == "start" || endState == "no_regex") {
|
|
749
844
|
return "";
|
|
750
845
|
}
|
|
@@ -756,58 +851,45 @@ oop.inherits(Mode, TextMode);
|
|
|
756
851
|
indent += "* ";
|
|
757
852
|
}
|
|
758
853
|
}
|
|
759
|
-
|
|
760
854
|
return indent;
|
|
761
855
|
};
|
|
762
|
-
|
|
763
|
-
this.checkOutdent = function(state, line, input) {
|
|
856
|
+
this.checkOutdent = function (state, line, input) {
|
|
764
857
|
return this.$outdent.checkOutdent(line, input);
|
|
765
858
|
};
|
|
766
|
-
|
|
767
|
-
this.autoOutdent = function(state, doc, row) {
|
|
859
|
+
this.autoOutdent = function (state, doc, row) {
|
|
768
860
|
this.$outdent.autoOutdent(doc, row);
|
|
769
861
|
};
|
|
770
|
-
|
|
771
|
-
this.createWorker = function(session) {
|
|
862
|
+
this.createWorker = function (session) {
|
|
772
863
|
var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
|
|
773
864
|
worker.attachToDocument(session.getDocument());
|
|
774
|
-
|
|
775
|
-
worker.on("annotate", function(results) {
|
|
865
|
+
worker.on("annotate", function (results) {
|
|
776
866
|
session.setAnnotations(results.data);
|
|
777
867
|
});
|
|
778
|
-
|
|
779
|
-
worker.on("terminate", function() {
|
|
868
|
+
worker.on("terminate", function () {
|
|
780
869
|
session.clearAnnotations();
|
|
781
870
|
});
|
|
782
|
-
|
|
783
871
|
return worker;
|
|
784
872
|
};
|
|
785
|
-
|
|
786
873
|
this.$id = "ace/mode/javascript";
|
|
787
874
|
this.snippetFileId = "ace/snippets/javascript";
|
|
788
875
|
}).call(Mode.prototype);
|
|
789
|
-
|
|
790
876
|
exports.Mode = Mode;
|
|
791
|
-
});
|
|
792
877
|
|
|
793
|
-
|
|
794
|
-
"use strict";
|
|
878
|
+
});
|
|
795
879
|
|
|
880
|
+
ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
|
|
796
881
|
var oop = require("../lib/oop");
|
|
797
882
|
var lang = require("../lib/lang");
|
|
798
883
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
799
884
|
var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
|
|
800
885
|
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
|
|
801
|
-
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
|
|
886
|
+
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
|
|
802
887
|
var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
|
|
803
888
|
var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
|
|
804
|
-
|
|
805
889
|
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
|
|
806
890
|
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
|
|
807
|
-
var pseudoClasses
|
|
808
|
-
|
|
809
|
-
var CssHighlightRules = function() {
|
|
810
|
-
|
|
891
|
+
var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
|
|
892
|
+
var CssHighlightRules = function () {
|
|
811
893
|
var keywordMapper = this.createKeywordMapper({
|
|
812
894
|
"support.function": supportFunction,
|
|
813
895
|
"support.constant": supportConstant,
|
|
@@ -815,245 +897,232 @@ var CssHighlightRules = function() {
|
|
|
815
897
|
"support.constant.color": supportConstantColor,
|
|
816
898
|
"support.constant.fonts": supportConstantFonts
|
|
817
899
|
}, "text", true);
|
|
818
|
-
|
|
819
900
|
this.$rules = {
|
|
820
|
-
"start"
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
901
|
+
"start": [{
|
|
902
|
+
include: ["strings", "url", "comments"]
|
|
903
|
+
}, {
|
|
904
|
+
token: "paren.lparen",
|
|
905
|
+
regex: "\\{",
|
|
906
|
+
next: "ruleset"
|
|
907
|
+
}, {
|
|
908
|
+
token: "paren.rparen",
|
|
909
|
+
regex: "\\}"
|
|
910
|
+
}, {
|
|
911
|
+
token: "string",
|
|
912
|
+
regex: "@(?!viewport)",
|
|
913
|
+
next: "media"
|
|
914
|
+
}, {
|
|
915
|
+
token: "keyword",
|
|
916
|
+
regex: "#[a-z0-9-_]+"
|
|
917
|
+
}, {
|
|
918
|
+
token: "keyword",
|
|
919
|
+
regex: "%"
|
|
920
|
+
}, {
|
|
921
|
+
token: "variable",
|
|
922
|
+
regex: "\\.[a-z0-9-_]+"
|
|
923
|
+
}, {
|
|
924
|
+
token: "string",
|
|
925
|
+
regex: ":[a-z0-9-_]+"
|
|
926
|
+
}, {
|
|
927
|
+
token: "constant.numeric",
|
|
928
|
+
regex: numRe
|
|
929
|
+
}, {
|
|
930
|
+
token: "constant",
|
|
931
|
+
regex: "[a-z0-9-_]+"
|
|
932
|
+
}, {
|
|
933
|
+
caseInsensitive: true
|
|
934
|
+
}],
|
|
855
935
|
"media": [{
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
936
|
+
include: ["strings", "url", "comments"]
|
|
937
|
+
}, {
|
|
938
|
+
token: "paren.lparen",
|
|
939
|
+
regex: "\\{",
|
|
940
|
+
next: "start"
|
|
941
|
+
}, {
|
|
942
|
+
token: "paren.rparen",
|
|
943
|
+
regex: "\\}",
|
|
944
|
+
next: "start"
|
|
945
|
+
}, {
|
|
946
|
+
token: "string",
|
|
947
|
+
regex: ";",
|
|
948
|
+
next: "start"
|
|
949
|
+
}, {
|
|
950
|
+
token: "keyword",
|
|
951
|
+
regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
|
|
952
|
+
+ "|page|font|keyframes|viewport|counter-style|font-feature-values"
|
|
953
|
+
+ "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
|
|
954
|
+
}],
|
|
955
|
+
"comments": [{
|
|
956
|
+
token: "comment",
|
|
957
|
+
regex: "\\/\\*",
|
|
958
|
+
push: [{
|
|
959
|
+
token: "comment",
|
|
960
|
+
regex: "\\*\\/",
|
|
961
|
+
next: "pop"
|
|
962
|
+
}, {
|
|
963
|
+
defaultToken: "comment"
|
|
964
|
+
}]
|
|
965
|
+
}],
|
|
966
|
+
"ruleset": [{
|
|
967
|
+
regex: "-(webkit|ms|moz|o)-",
|
|
968
|
+
token: "text"
|
|
883
969
|
}, {
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
}],
|
|
887
|
-
|
|
888
|
-
"ruleset" : [{
|
|
889
|
-
regex : "-(webkit|ms|moz|o)-",
|
|
890
|
-
token : "text"
|
|
891
|
-
}, {
|
|
892
|
-
token : "punctuation.operator",
|
|
893
|
-
regex : "[:;]"
|
|
894
|
-
}, {
|
|
895
|
-
token : "paren.rparen",
|
|
896
|
-
regex : "\\}",
|
|
897
|
-
next : "start"
|
|
898
|
-
}, {
|
|
899
|
-
include : ["strings", "url", "comments"]
|
|
900
|
-
}, {
|
|
901
|
-
token : ["constant.numeric", "keyword"],
|
|
902
|
-
regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
|
|
903
|
-
}, {
|
|
904
|
-
token : "constant.numeric",
|
|
905
|
-
regex : numRe
|
|
906
|
-
}, {
|
|
907
|
-
token : "constant.numeric", // hex6 color
|
|
908
|
-
regex : "#[a-f0-9]{6}"
|
|
909
|
-
}, {
|
|
910
|
-
token : "constant.numeric", // hex3 color
|
|
911
|
-
regex : "#[a-f0-9]{3}"
|
|
912
|
-
}, {
|
|
913
|
-
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
|
|
914
|
-
regex : pseudoElements
|
|
915
|
-
}, {
|
|
916
|
-
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
|
|
917
|
-
regex : pseudoClasses
|
|
918
|
-
}, {
|
|
919
|
-
include: "url"
|
|
920
|
-
}, {
|
|
921
|
-
token : keywordMapper,
|
|
922
|
-
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
|
923
|
-
}, {
|
|
924
|
-
caseInsensitive: true
|
|
925
|
-
}],
|
|
926
|
-
|
|
927
|
-
url: [{
|
|
928
|
-
token : "support.function",
|
|
929
|
-
regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
|
|
930
|
-
push: [{
|
|
931
|
-
token : "support.function",
|
|
932
|
-
regex : "\\)",
|
|
933
|
-
next : "pop"
|
|
970
|
+
token: "punctuation.operator",
|
|
971
|
+
regex: "[:;]"
|
|
934
972
|
}, {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
strings: [{
|
|
940
|
-
token : "string.start",
|
|
941
|
-
regex : "'",
|
|
942
|
-
push : [{
|
|
943
|
-
token : "string.end",
|
|
944
|
-
regex : "'|$",
|
|
945
|
-
next: "pop"
|
|
973
|
+
token: "paren.rparen",
|
|
974
|
+
regex: "\\}",
|
|
975
|
+
next: "start"
|
|
946
976
|
}, {
|
|
947
|
-
include
|
|
977
|
+
include: ["strings", "url", "comments"]
|
|
948
978
|
}, {
|
|
949
|
-
token
|
|
950
|
-
regex
|
|
951
|
-
consumeLineEnd: true
|
|
979
|
+
token: ["constant.numeric", "keyword"],
|
|
980
|
+
regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
|
|
952
981
|
}, {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
}, {
|
|
956
|
-
token : "string.start",
|
|
957
|
-
regex : '"',
|
|
958
|
-
push : [{
|
|
959
|
-
token : "string.end",
|
|
960
|
-
regex : '"|$',
|
|
961
|
-
next: "pop"
|
|
982
|
+
token: "constant.numeric",
|
|
983
|
+
regex: numRe
|
|
962
984
|
}, {
|
|
963
|
-
|
|
985
|
+
token: "constant.numeric",
|
|
986
|
+
regex: "#[a-f0-9]{6}"
|
|
964
987
|
}, {
|
|
965
|
-
token
|
|
966
|
-
regex
|
|
967
|
-
consumeLineEnd: true
|
|
988
|
+
token: "constant.numeric",
|
|
989
|
+
regex: "#[a-f0-9]{3}"
|
|
968
990
|
}, {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
991
|
+
token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
|
|
992
|
+
regex: pseudoElements
|
|
993
|
+
}, {
|
|
994
|
+
token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
|
|
995
|
+
regex: pseudoClasses
|
|
996
|
+
}, {
|
|
997
|
+
include: "url"
|
|
998
|
+
}, {
|
|
999
|
+
token: keywordMapper,
|
|
1000
|
+
regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
|
1001
|
+
}, {
|
|
1002
|
+
caseInsensitive: true
|
|
1003
|
+
}],
|
|
1004
|
+
url: [{
|
|
1005
|
+
token: "support.function",
|
|
1006
|
+
regex: "(?:url(:?-prefix)?|domain|regexp)\\(",
|
|
1007
|
+
push: [{
|
|
1008
|
+
token: "support.function",
|
|
1009
|
+
regex: "\\)",
|
|
1010
|
+
next: "pop"
|
|
1011
|
+
}, {
|
|
1012
|
+
defaultToken: "string"
|
|
1013
|
+
}]
|
|
1014
|
+
}],
|
|
1015
|
+
strings: [{
|
|
1016
|
+
token: "string.start",
|
|
1017
|
+
regex: "'",
|
|
1018
|
+
push: [{
|
|
1019
|
+
token: "string.end",
|
|
1020
|
+
regex: "'|$",
|
|
1021
|
+
next: "pop"
|
|
1022
|
+
}, {
|
|
1023
|
+
include: "escapes"
|
|
1024
|
+
}, {
|
|
1025
|
+
token: "constant.language.escape",
|
|
1026
|
+
regex: /\\$/,
|
|
1027
|
+
consumeLineEnd: true
|
|
1028
|
+
}, {
|
|
1029
|
+
defaultToken: "string"
|
|
1030
|
+
}]
|
|
1031
|
+
}, {
|
|
1032
|
+
token: "string.start",
|
|
1033
|
+
regex: '"',
|
|
1034
|
+
push: [{
|
|
1035
|
+
token: "string.end",
|
|
1036
|
+
regex: '"|$',
|
|
1037
|
+
next: "pop"
|
|
1038
|
+
}, {
|
|
1039
|
+
include: "escapes"
|
|
1040
|
+
}, {
|
|
1041
|
+
token: "constant.language.escape",
|
|
1042
|
+
regex: /\\$/,
|
|
1043
|
+
consumeLineEnd: true
|
|
1044
|
+
}, {
|
|
1045
|
+
defaultToken: "string"
|
|
1046
|
+
}]
|
|
1047
|
+
}],
|
|
972
1048
|
escapes: [{
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1049
|
+
token: "constant.language.escape",
|
|
1050
|
+
regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
|
|
1051
|
+
}]
|
|
977
1052
|
};
|
|
978
|
-
|
|
979
1053
|
this.normalizeRules();
|
|
980
1054
|
};
|
|
981
|
-
|
|
982
1055
|
oop.inherits(CssHighlightRules, TextHighlightRules);
|
|
983
|
-
|
|
984
1056
|
exports.CssHighlightRules = CssHighlightRules;
|
|
985
1057
|
|
|
986
1058
|
});
|
|
987
1059
|
|
|
988
|
-
ace.define("ace/mode/css_completions",[], function(require, exports, module)
|
|
989
|
-
"use strict";
|
|
990
|
-
|
|
1060
|
+
ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
|
|
991
1061
|
var propertyMap = {
|
|
992
|
-
"background": {"#$0": 1},
|
|
993
|
-
"background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
|
|
994
|
-
"background-image": {"url('/$0')": 1},
|
|
995
|
-
"background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
|
|
996
|
-
"background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
|
|
997
|
-
"background-attachment": {"scroll": 1, "fixed": 1},
|
|
998
|
-
"background-size": {"cover": 1, "contain": 1},
|
|
999
|
-
"background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
|
|
1000
|
-
"background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
|
|
1001
|
-
"border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
|
|
1002
|
-
"border-color": {"#$0": 1},
|
|
1003
|
-
"border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
|
|
1004
|
-
"border-collapse": {"collapse": 1, "separate": 1},
|
|
1005
|
-
"bottom": {"px": 1, "em": 1, "%": 1},
|
|
1006
|
-
"clear": {"left": 1, "right": 1, "both": 1, "none": 1},
|
|
1007
|
-
"color": {"#$0": 1, "rgb(#$00,0,0)": 1},
|
|
1008
|
-
"cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
|
|
1009
|
-
"display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
|
|
1010
|
-
"empty-cells": {"show": 1, "hide": 1},
|
|
1011
|
-
"float": {"left": 1, "right": 1, "none": 1},
|
|
1012
|
-
"font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
|
|
1013
|
-
"font-size": {"px": 1, "em": 1, "%": 1},
|
|
1014
|
-
"font-weight": {"bold": 1, "normal": 1},
|
|
1015
|
-
"font-style": {"italic": 1, "normal": 1},
|
|
1016
|
-
"font-variant": {"normal": 1, "small-caps": 1},
|
|
1017
|
-
"height": {"px": 1, "em": 1, "%": 1},
|
|
1018
|
-
"left": {"px": 1, "em": 1, "%": 1},
|
|
1019
|
-
"letter-spacing": {"normal": 1},
|
|
1020
|
-
"line-height": {"normal": 1},
|
|
1021
|
-
"list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
|
|
1022
|
-
"margin": {"px": 1, "em": 1, "%": 1},
|
|
1023
|
-
"margin-right": {"px": 1, "em": 1, "%": 1},
|
|
1024
|
-
"margin-left": {"px": 1, "em": 1, "%": 1},
|
|
1025
|
-
"margin-top": {"px": 1, "em": 1, "%": 1},
|
|
1026
|
-
"margin-bottom": {"px": 1, "em": 1, "%": 1},
|
|
1027
|
-
"max-height": {"px": 1, "em": 1, "%": 1},
|
|
1028
|
-
"max-width": {"px": 1, "em": 1, "%": 1},
|
|
1029
|
-
"min-height": {"px": 1, "em": 1, "%": 1},
|
|
1030
|
-
"min-width": {"px": 1, "em": 1, "%": 1},
|
|
1031
|
-
"overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
|
|
1032
|
-
"overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
|
|
1033
|
-
"overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
|
|
1034
|
-
"padding": {"px": 1, "em": 1, "%": 1},
|
|
1035
|
-
"padding-top": {"px": 1, "em": 1, "%": 1},
|
|
1036
|
-
"padding-right": {"px": 1, "em": 1, "%": 1},
|
|
1037
|
-
"padding-bottom": {"px": 1, "em": 1, "%": 1},
|
|
1038
|
-
"padding-left": {"px": 1, "em": 1, "%": 1},
|
|
1039
|
-
"page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
|
|
1040
|
-
"page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
|
|
1041
|
-
"position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
|
|
1042
|
-
"right": {"px": 1, "em": 1, "%": 1},
|
|
1043
|
-
"table-layout": {"fixed": 1, "auto": 1},
|
|
1044
|
-
"text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
|
|
1045
|
-
"text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
|
|
1046
|
-
"text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
|
|
1047
|
-
"top": {"px": 1, "em": 1, "%": 1},
|
|
1048
|
-
"vertical-align": {"top": 1, "bottom": 1},
|
|
1049
|
-
"visibility": {"hidden": 1, "visible": 1},
|
|
1050
|
-
"white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
|
|
1051
|
-
"width": {"px": 1, "em": 1, "%": 1},
|
|
1052
|
-
"word-spacing": {"normal": 1},
|
|
1053
|
-
"filter": {"alpha(opacity=$0100)": 1},
|
|
1054
|
-
|
|
1055
|
-
"text-
|
|
1056
|
-
"text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
|
|
1062
|
+
"background": { "#$0": 1 },
|
|
1063
|
+
"background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
|
|
1064
|
+
"background-image": { "url('/$0')": 1 },
|
|
1065
|
+
"background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
|
|
1066
|
+
"background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
|
|
1067
|
+
"background-attachment": { "scroll": 1, "fixed": 1 },
|
|
1068
|
+
"background-size": { "cover": 1, "contain": 1 },
|
|
1069
|
+
"background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
|
|
1070
|
+
"background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
|
|
1071
|
+
"border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
|
|
1072
|
+
"border-color": { "#$0": 1 },
|
|
1073
|
+
"border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
|
|
1074
|
+
"border-collapse": { "collapse": 1, "separate": 1 },
|
|
1075
|
+
"bottom": { "px": 1, "em": 1, "%": 1 },
|
|
1076
|
+
"clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
|
|
1077
|
+
"color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
|
|
1078
|
+
"cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 },
|
|
1079
|
+
"display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
|
|
1080
|
+
"empty-cells": { "show": 1, "hide": 1 },
|
|
1081
|
+
"float": { "left": 1, "right": 1, "none": 1 },
|
|
1082
|
+
"font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 },
|
|
1083
|
+
"font-size": { "px": 1, "em": 1, "%": 1 },
|
|
1084
|
+
"font-weight": { "bold": 1, "normal": 1 },
|
|
1085
|
+
"font-style": { "italic": 1, "normal": 1 },
|
|
1086
|
+
"font-variant": { "normal": 1, "small-caps": 1 },
|
|
1087
|
+
"height": { "px": 1, "em": 1, "%": 1 },
|
|
1088
|
+
"left": { "px": 1, "em": 1, "%": 1 },
|
|
1089
|
+
"letter-spacing": { "normal": 1 },
|
|
1090
|
+
"line-height": { "normal": 1 },
|
|
1091
|
+
"list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 },
|
|
1092
|
+
"margin": { "px": 1, "em": 1, "%": 1 },
|
|
1093
|
+
"margin-right": { "px": 1, "em": 1, "%": 1 },
|
|
1094
|
+
"margin-left": { "px": 1, "em": 1, "%": 1 },
|
|
1095
|
+
"margin-top": { "px": 1, "em": 1, "%": 1 },
|
|
1096
|
+
"margin-bottom": { "px": 1, "em": 1, "%": 1 },
|
|
1097
|
+
"max-height": { "px": 1, "em": 1, "%": 1 },
|
|
1098
|
+
"max-width": { "px": 1, "em": 1, "%": 1 },
|
|
1099
|
+
"min-height": { "px": 1, "em": 1, "%": 1 },
|
|
1100
|
+
"min-width": { "px": 1, "em": 1, "%": 1 },
|
|
1101
|
+
"overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
|
|
1102
|
+
"overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
|
|
1103
|
+
"overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
|
|
1104
|
+
"padding": { "px": 1, "em": 1, "%": 1 },
|
|
1105
|
+
"padding-top": { "px": 1, "em": 1, "%": 1 },
|
|
1106
|
+
"padding-right": { "px": 1, "em": 1, "%": 1 },
|
|
1107
|
+
"padding-bottom": { "px": 1, "em": 1, "%": 1 },
|
|
1108
|
+
"padding-left": { "px": 1, "em": 1, "%": 1 },
|
|
1109
|
+
"page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
|
|
1110
|
+
"page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
|
|
1111
|
+
"position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
|
|
1112
|
+
"right": { "px": 1, "em": 1, "%": 1 },
|
|
1113
|
+
"table-layout": { "fixed": 1, "auto": 1 },
|
|
1114
|
+
"text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
|
|
1115
|
+
"text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
|
|
1116
|
+
"text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
|
|
1117
|
+
"top": { "px": 1, "em": 1, "%": 1 },
|
|
1118
|
+
"vertical-align": { "top": 1, "bottom": 1 },
|
|
1119
|
+
"visibility": { "hidden": 1, "visible": 1 },
|
|
1120
|
+
"white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
|
|
1121
|
+
"width": { "px": 1, "em": 1, "%": 1 },
|
|
1122
|
+
"word-spacing": { "normal": 1 },
|
|
1123
|
+
"filter": { "alpha(opacity=$0100)": 1 },
|
|
1124
|
+
"text-shadow": { "$02px 2px 2px #777": 1 },
|
|
1125
|
+
"text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
|
|
1057
1126
|
"-moz-border-radius": 1,
|
|
1058
1127
|
"-moz-border-radius-topright": 1,
|
|
1059
1128
|
"-moz-border-radius-bottomright": 1,
|
|
@@ -1066,81 +1135,71 @@ var propertyMap = {
|
|
|
1066
1135
|
"-webkit-border-bottom-left-radius": 1,
|
|
1067
1136
|
"-moz-box-shadow": 1,
|
|
1068
1137
|
"-webkit-box-shadow": 1,
|
|
1069
|
-
"transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
|
|
1070
|
-
"-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
|
|
1071
|
-
"-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
|
|
1138
|
+
"transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
|
|
1139
|
+
"-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
|
|
1140
|
+
"-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
|
|
1072
1141
|
};
|
|
1073
|
-
|
|
1074
|
-
var CssCompletions = function() {
|
|
1075
|
-
|
|
1142
|
+
var CssCompletions = function () {
|
|
1076
1143
|
};
|
|
1077
|
-
|
|
1078
|
-
(function() {
|
|
1079
|
-
|
|
1144
|
+
(function () {
|
|
1080
1145
|
this.completionsDefined = false;
|
|
1081
|
-
|
|
1082
|
-
this.defineCompletions = function() {
|
|
1146
|
+
this.defineCompletions = function () {
|
|
1083
1147
|
if (document) {
|
|
1084
1148
|
var style = document.createElement('c').style;
|
|
1085
|
-
|
|
1086
1149
|
for (var i in style) {
|
|
1087
1150
|
if (typeof style[i] !== 'string')
|
|
1088
1151
|
continue;
|
|
1089
|
-
|
|
1090
|
-
var name = i.replace(/[A-Z]/g, function(x) {
|
|
1152
|
+
var name = i.replace(/[A-Z]/g, function (x) {
|
|
1091
1153
|
return '-' + x.toLowerCase();
|
|
1092
1154
|
});
|
|
1093
|
-
|
|
1094
1155
|
if (!propertyMap.hasOwnProperty(name))
|
|
1095
1156
|
propertyMap[name] = 1;
|
|
1096
1157
|
}
|
|
1097
1158
|
}
|
|
1098
|
-
|
|
1099
1159
|
this.completionsDefined = true;
|
|
1100
1160
|
};
|
|
1101
|
-
|
|
1102
|
-
this.getCompletions = function(state, session, pos, prefix) {
|
|
1161
|
+
this.getCompletions = function (state, session, pos, prefix) {
|
|
1103
1162
|
if (!this.completionsDefined) {
|
|
1104
1163
|
this.defineCompletions();
|
|
1105
1164
|
}
|
|
1106
|
-
|
|
1107
|
-
if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") {
|
|
1165
|
+
if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
|
|
1108
1166
|
var line = session.getLine(pos.row).substr(0, pos.column);
|
|
1167
|
+
var inParens = /\([^)]*$/.test(line);
|
|
1168
|
+
if (inParens) {
|
|
1169
|
+
line = line.substr(line.lastIndexOf('(') + 1);
|
|
1170
|
+
}
|
|
1109
1171
|
if (/:[^;]+$/.test(line)) {
|
|
1110
1172
|
/([\w\-]+):[^:]*$/.test(line);
|
|
1111
|
-
|
|
1112
1173
|
return this.getPropertyValueCompletions(state, session, pos, prefix);
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
return this.getPropertyCompletions(state, session, pos, prefix, inParens);
|
|
1115
1177
|
}
|
|
1116
1178
|
}
|
|
1117
|
-
|
|
1118
1179
|
return [];
|
|
1119
1180
|
};
|
|
1120
|
-
|
|
1121
|
-
|
|
1181
|
+
this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
|
|
1182
|
+
skipSemicolon = skipSemicolon || false;
|
|
1122
1183
|
var properties = Object.keys(propertyMap);
|
|
1123
|
-
return properties.map(function(property){
|
|
1184
|
+
return properties.map(function (property) {
|
|
1124
1185
|
return {
|
|
1125
1186
|
caption: property,
|
|
1126
|
-
snippet: property + ': $0;',
|
|
1187
|
+
snippet: property + ': $0' + (skipSemicolon ? '' : ';'),
|
|
1127
1188
|
meta: "property",
|
|
1128
1189
|
score: 1000000
|
|
1129
1190
|
};
|
|
1130
1191
|
});
|
|
1131
1192
|
};
|
|
1132
|
-
|
|
1133
|
-
this.getPropertyValueCompletions = function(state, session, pos, prefix) {
|
|
1193
|
+
this.getPropertyValueCompletions = function (state, session, pos, prefix) {
|
|
1134
1194
|
var line = session.getLine(pos.row).substr(0, pos.column);
|
|
1135
1195
|
var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
|
|
1136
|
-
|
|
1137
1196
|
if (!property)
|
|
1138
1197
|
return [];
|
|
1139
1198
|
var values = [];
|
|
1140
1199
|
if (property in propertyMap && typeof propertyMap[property] === "object") {
|
|
1141
1200
|
values = Object.keys(propertyMap[property]);
|
|
1142
1201
|
}
|
|
1143
|
-
return values.map(function(value){
|
|
1202
|
+
return values.map(function (value) {
|
|
1144
1203
|
return {
|
|
1145
1204
|
caption: value,
|
|
1146
1205
|
snippet: value,
|
|
@@ -1149,24 +1208,18 @@ var CssCompletions = function() {
|
|
|
1149
1208
|
};
|
|
1150
1209
|
});
|
|
1151
1210
|
};
|
|
1152
|
-
|
|
1153
1211
|
}).call(CssCompletions.prototype);
|
|
1154
|
-
|
|
1155
1212
|
exports.CssCompletions = CssCompletions;
|
|
1156
|
-
});
|
|
1157
1213
|
|
|
1158
|
-
|
|
1159
|
-
"use strict";
|
|
1214
|
+
});
|
|
1160
1215
|
|
|
1216
|
+
ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict";
|
|
1161
1217
|
var oop = require("../../lib/oop");
|
|
1162
1218
|
var Behaviour = require("../behaviour").Behaviour;
|
|
1163
1219
|
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
|
|
1164
1220
|
var TokenIterator = require("../../token_iterator").TokenIterator;
|
|
1165
|
-
|
|
1166
1221
|
var CssBehaviour = function () {
|
|
1167
|
-
|
|
1168
1222
|
this.inherit(CstyleBehaviour);
|
|
1169
|
-
|
|
1170
1223
|
this.add("colon", "insertion", function (state, action, editor, session, text) {
|
|
1171
1224
|
if (text === ':' && editor.selection.isEmpty()) {
|
|
1172
1225
|
var cursor = editor.getCursorPosition();
|
|
@@ -1180,20 +1233,19 @@ var CssBehaviour = function () {
|
|
|
1180
1233
|
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
|
1181
1234
|
if (rightChar === ':') {
|
|
1182
1235
|
return {
|
|
1183
|
-
|
|
1184
|
-
|
|
1236
|
+
text: '',
|
|
1237
|
+
selection: [1, 1]
|
|
1185
1238
|
};
|
|
1186
1239
|
}
|
|
1187
1240
|
if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
|
|
1188
1241
|
return {
|
|
1189
|
-
|
|
1190
|
-
|
|
1242
|
+
text: ':;',
|
|
1243
|
+
selection: [1, 1]
|
|
1191
1244
|
};
|
|
1192
1245
|
}
|
|
1193
1246
|
}
|
|
1194
1247
|
}
|
|
1195
1248
|
});
|
|
1196
|
-
|
|
1197
1249
|
this.add("colon", "deletion", function (state, action, editor, session, range) {
|
|
1198
1250
|
var selected = session.doc.getTextRange(range);
|
|
1199
1251
|
if (!range.isMultiLine() && selected === ':') {
|
|
@@ -1207,13 +1259,12 @@ var CssBehaviour = function () {
|
|
|
1207
1259
|
var line = session.doc.getLine(range.start.row);
|
|
1208
1260
|
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
|
1209
1261
|
if (rightChar === ';') {
|
|
1210
|
-
range.end.column
|
|
1262
|
+
range.end.column++;
|
|
1211
1263
|
return range;
|
|
1212
1264
|
}
|
|
1213
1265
|
}
|
|
1214
1266
|
}
|
|
1215
1267
|
});
|
|
1216
|
-
|
|
1217
1268
|
this.add("semicolon", "insertion", function (state, action, editor, session, text) {
|
|
1218
1269
|
if (text === ';' && editor.selection.isEmpty()) {
|
|
1219
1270
|
var cursor = editor.getCursorPosition();
|
|
@@ -1221,18 +1272,16 @@ var CssBehaviour = function () {
|
|
|
1221
1272
|
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
|
1222
1273
|
if (rightChar === ';') {
|
|
1223
1274
|
return {
|
|
1224
|
-
|
|
1225
|
-
|
|
1275
|
+
text: '',
|
|
1276
|
+
selection: [1, 1]
|
|
1226
1277
|
};
|
|
1227
1278
|
}
|
|
1228
1279
|
}
|
|
1229
1280
|
});
|
|
1230
|
-
|
|
1231
1281
|
this.add("!important", "insertion", function (state, action, editor, session, text) {
|
|
1232
1282
|
if (text === '!' && editor.selection.isEmpty()) {
|
|
1233
1283
|
var cursor = editor.getCursorPosition();
|
|
1234
1284
|
var line = session.doc.getLine(cursor.row);
|
|
1235
|
-
|
|
1236
1285
|
if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
|
|
1237
1286
|
return {
|
|
1238
1287
|
text: '!important',
|
|
@@ -1241,16 +1290,13 @@ var CssBehaviour = function () {
|
|
|
1241
1290
|
}
|
|
1242
1291
|
}
|
|
1243
1292
|
});
|
|
1244
|
-
|
|
1245
1293
|
};
|
|
1246
1294
|
oop.inherits(CssBehaviour, CstyleBehaviour);
|
|
1247
|
-
|
|
1248
1295
|
exports.CssBehaviour = CssBehaviour;
|
|
1249
|
-
});
|
|
1250
1296
|
|
|
1251
|
-
|
|
1252
|
-
"use strict";
|
|
1297
|
+
});
|
|
1253
1298
|
|
|
1299
|
+
ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
|
|
1254
1300
|
var oop = require("../lib/oop");
|
|
1255
1301
|
var TextMode = require("./text").Mode;
|
|
1256
1302
|
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
|
@@ -1259,8 +1305,7 @@ var WorkerClient = require("../worker/worker_client").WorkerClient;
|
|
|
1259
1305
|
var CssCompletions = require("./css_completions").CssCompletions;
|
|
1260
1306
|
var CssBehaviour = require("./behaviour/css").CssBehaviour;
|
|
1261
1307
|
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
|
1262
|
-
|
|
1263
|
-
var Mode = function() {
|
|
1308
|
+
var Mode = function () {
|
|
1264
1309
|
this.HighlightRules = CssHighlightRules;
|
|
1265
1310
|
this.$outdent = new MatchingBraceOutdent();
|
|
1266
1311
|
this.$behaviour = new CssBehaviour();
|
|
@@ -1268,361 +1313,311 @@ var Mode = function() {
|
|
|
1268
1313
|
this.foldingRules = new CStyleFoldMode();
|
|
1269
1314
|
};
|
|
1270
1315
|
oop.inherits(Mode, TextMode);
|
|
1271
|
-
|
|
1272
|
-
(function() {
|
|
1273
|
-
|
|
1316
|
+
(function () {
|
|
1274
1317
|
this.foldingRules = "cStyle";
|
|
1275
|
-
this.blockComment = {start: "/*", end: "*/"};
|
|
1276
|
-
|
|
1277
|
-
this.getNextLineIndent = function(state, line, tab) {
|
|
1318
|
+
this.blockComment = { start: "/*", end: "*/" };
|
|
1319
|
+
this.getNextLineIndent = function (state, line, tab) {
|
|
1278
1320
|
var indent = this.$getIndent(line);
|
|
1279
1321
|
var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
|
|
1280
|
-
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
|
1322
|
+
if (tokens.length && tokens[tokens.length - 1].type == "comment") {
|
|
1281
1323
|
return indent;
|
|
1282
1324
|
}
|
|
1283
|
-
|
|
1284
1325
|
var match = line.match(/^.*\{\s*$/);
|
|
1285
1326
|
if (match) {
|
|
1286
1327
|
indent += tab;
|
|
1287
1328
|
}
|
|
1288
|
-
|
|
1289
1329
|
return indent;
|
|
1290
1330
|
};
|
|
1291
|
-
|
|
1292
|
-
this.checkOutdent = function(state, line, input) {
|
|
1331
|
+
this.checkOutdent = function (state, line, input) {
|
|
1293
1332
|
return this.$outdent.checkOutdent(line, input);
|
|
1294
1333
|
};
|
|
1295
|
-
|
|
1296
|
-
this.autoOutdent = function(state, doc, row) {
|
|
1334
|
+
this.autoOutdent = function (state, doc, row) {
|
|
1297
1335
|
this.$outdent.autoOutdent(doc, row);
|
|
1298
1336
|
};
|
|
1299
|
-
|
|
1300
|
-
this.getCompletions = function(state, session, pos, prefix) {
|
|
1337
|
+
this.getCompletions = function (state, session, pos, prefix) {
|
|
1301
1338
|
return this.$completer.getCompletions(state, session, pos, prefix);
|
|
1302
1339
|
};
|
|
1303
|
-
|
|
1304
|
-
this.createWorker = function(session) {
|
|
1340
|
+
this.createWorker = function (session) {
|
|
1305
1341
|
var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
|
|
1306
1342
|
worker.attachToDocument(session.getDocument());
|
|
1307
|
-
|
|
1308
|
-
worker.on("annotate", function(e) {
|
|
1343
|
+
worker.on("annotate", function (e) {
|
|
1309
1344
|
session.setAnnotations(e.data);
|
|
1310
1345
|
});
|
|
1311
|
-
|
|
1312
|
-
worker.on("terminate", function() {
|
|
1346
|
+
worker.on("terminate", function () {
|
|
1313
1347
|
session.clearAnnotations();
|
|
1314
1348
|
});
|
|
1315
|
-
|
|
1316
1349
|
return worker;
|
|
1317
1350
|
};
|
|
1318
|
-
|
|
1319
1351
|
this.$id = "ace/mode/css";
|
|
1320
1352
|
this.snippetFileId = "ace/snippets/css";
|
|
1321
1353
|
}).call(Mode.prototype);
|
|
1322
|
-
|
|
1323
1354
|
exports.Mode = Mode;
|
|
1324
1355
|
|
|
1325
1356
|
});
|
|
1326
1357
|
|
|
1327
|
-
ace.define("ace/mode/xml_highlight_rules",[], function(require, exports, module)
|
|
1328
|
-
"use strict";
|
|
1329
|
-
|
|
1358
|
+
ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
|
|
1330
1359
|
var oop = require("../lib/oop");
|
|
1331
1360
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
1332
|
-
|
|
1333
|
-
var XmlHighlightRules = function(normalize) {
|
|
1361
|
+
var XmlHighlightRules = function (normalize) {
|
|
1334
1362
|
var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
|
|
1335
|
-
|
|
1336
1363
|
this.$rules = {
|
|
1337
|
-
start
|
|
1338
|
-
{token
|
|
1364
|
+
start: [
|
|
1365
|
+
{ token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
|
|
1339
1366
|
{
|
|
1340
|
-
token
|
|
1341
|
-
regex
|
|
1367
|
+
token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
|
|
1368
|
+
regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
|
|
1342
1369
|
},
|
|
1343
|
-
{token
|
|
1370
|
+
{ token: "comment.start.xml", regex: "<\\!--", next: "comment" },
|
|
1344
1371
|
{
|
|
1345
|
-
token
|
|
1346
|
-
regex
|
|
1372
|
+
token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
|
|
1373
|
+
regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
|
|
1347
1374
|
},
|
|
1348
|
-
{include
|
|
1349
|
-
{token
|
|
1350
|
-
{token
|
|
1351
|
-
{include
|
|
1352
|
-
{defaultToken
|
|
1375
|
+
{ include: "tag" },
|
|
1376
|
+
{ token: "text.end-tag-open.xml", regex: "</" },
|
|
1377
|
+
{ token: "text.tag-open.xml", regex: "<" },
|
|
1378
|
+
{ include: "reference" },
|
|
1379
|
+
{ defaultToken: "text.xml" }
|
|
1353
1380
|
],
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
{
|
|
1373
|
-
{
|
|
1374
|
-
{token
|
|
1375
|
-
{token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
|
|
1376
|
-
{token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
|
|
1381
|
+
processing_instruction: [{
|
|
1382
|
+
token: "entity.other.attribute-name.decl-attribute-name.xml",
|
|
1383
|
+
regex: tagRegex
|
|
1384
|
+
}, {
|
|
1385
|
+
token: "keyword.operator.decl-attribute-equals.xml",
|
|
1386
|
+
regex: "="
|
|
1387
|
+
}, {
|
|
1388
|
+
include: "whitespace"
|
|
1389
|
+
}, {
|
|
1390
|
+
include: "string"
|
|
1391
|
+
}, {
|
|
1392
|
+
token: "punctuation.xml-decl.xml",
|
|
1393
|
+
regex: "\\?>",
|
|
1394
|
+
next: "start"
|
|
1395
|
+
}],
|
|
1396
|
+
doctype: [
|
|
1397
|
+
{ include: "whitespace" },
|
|
1398
|
+
{ include: "string" },
|
|
1399
|
+
{ token: "xml-pe.doctype.xml", regex: ">", next: "start" },
|
|
1400
|
+
{ token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
|
|
1401
|
+
{ token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
|
|
1377
1402
|
],
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
{token
|
|
1403
|
-
{token : "text.xml", regex : "\\s+"},
|
|
1404
|
-
{token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
|
|
1403
|
+
int_subset: [{
|
|
1404
|
+
token: "text.xml",
|
|
1405
|
+
regex: "\\s+"
|
|
1406
|
+
}, {
|
|
1407
|
+
token: "punctuation.int-subset.xml",
|
|
1408
|
+
regex: "]",
|
|
1409
|
+
next: "pop"
|
|
1410
|
+
}, {
|
|
1411
|
+
token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
|
|
1412
|
+
regex: "(<\\!)(" + tagRegex + ")",
|
|
1413
|
+
push: [{
|
|
1414
|
+
token: "text",
|
|
1415
|
+
regex: "\\s+"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
token: "punctuation.markup-decl.xml",
|
|
1419
|
+
regex: ">",
|
|
1420
|
+
next: "pop"
|
|
1421
|
+
},
|
|
1422
|
+
{ include: "string" }]
|
|
1423
|
+
}],
|
|
1424
|
+
cdata: [
|
|
1425
|
+
{ token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
|
|
1426
|
+
{ token: "text.xml", regex: "\\s+" },
|
|
1427
|
+
{ token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
|
|
1405
1428
|
],
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
{
|
|
1409
|
-
{defaultToken : "comment.xml"}
|
|
1429
|
+
comment: [
|
|
1430
|
+
{ token: "comment.end.xml", regex: "-->", next: "start" },
|
|
1431
|
+
{ defaultToken: "comment.xml" }
|
|
1410
1432
|
],
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
}],
|
|
1430
|
-
|
|
1431
|
-
tag_whitespace : [
|
|
1432
|
-
{token : "text.tag-whitespace.xml", regex : "\\s+"}
|
|
1433
|
+
reference: [{
|
|
1434
|
+
token: "constant.language.escape.reference.xml",
|
|
1435
|
+
regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
1436
|
+
}],
|
|
1437
|
+
attr_reference: [{
|
|
1438
|
+
token: "constant.language.escape.reference.attribute-value.xml",
|
|
1439
|
+
regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
1440
|
+
}],
|
|
1441
|
+
tag: [{
|
|
1442
|
+
token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
|
|
1443
|
+
regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
|
|
1444
|
+
next: [
|
|
1445
|
+
{ include: "attributes" },
|
|
1446
|
+
{ token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
|
|
1447
|
+
]
|
|
1448
|
+
}],
|
|
1449
|
+
tag_whitespace: [
|
|
1450
|
+
{ token: "text.tag-whitespace.xml", regex: "\\s+" }
|
|
1433
1451
|
],
|
|
1434
|
-
whitespace
|
|
1435
|
-
{token
|
|
1452
|
+
whitespace: [
|
|
1453
|
+
{ token: "text.whitespace.xml", regex: "\\s+" }
|
|
1436
1454
|
],
|
|
1437
1455
|
string: [{
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1456
|
+
token: "string.xml",
|
|
1457
|
+
regex: "'",
|
|
1458
|
+
push: [
|
|
1459
|
+
{ token: "string.xml", regex: "'", next: "pop" },
|
|
1460
|
+
{ defaultToken: "string.xml" }
|
|
1461
|
+
]
|
|
1462
|
+
}, {
|
|
1463
|
+
token: "string.xml",
|
|
1464
|
+
regex: '"',
|
|
1465
|
+
push: [
|
|
1466
|
+
{ token: "string.xml", regex: '"', next: "pop" },
|
|
1467
|
+
{ defaultToken: "string.xml" }
|
|
1468
|
+
]
|
|
1469
|
+
}],
|
|
1453
1470
|
attributes: [{
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1471
|
+
token: "entity.other.attribute-name.xml",
|
|
1472
|
+
regex: tagRegex
|
|
1473
|
+
}, {
|
|
1474
|
+
token: "keyword.operator.attribute-equals.xml",
|
|
1475
|
+
regex: "="
|
|
1476
|
+
}, {
|
|
1477
|
+
include: "tag_whitespace"
|
|
1478
|
+
}, {
|
|
1479
|
+
include: "attribute_value"
|
|
1480
|
+
}],
|
|
1465
1481
|
attribute_value: [{
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
+
token: "string.attribute-value.xml",
|
|
1483
|
+
regex: "'",
|
|
1484
|
+
push: [
|
|
1485
|
+
{ token: "string.attribute-value.xml", regex: "'", next: "pop" },
|
|
1486
|
+
{ include: "attr_reference" },
|
|
1487
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
1488
|
+
]
|
|
1489
|
+
}, {
|
|
1490
|
+
token: "string.attribute-value.xml",
|
|
1491
|
+
regex: '"',
|
|
1492
|
+
push: [
|
|
1493
|
+
{ token: "string.attribute-value.xml", regex: '"', next: "pop" },
|
|
1494
|
+
{ include: "attr_reference" },
|
|
1495
|
+
{ defaultToken: "string.attribute-value.xml" }
|
|
1496
|
+
]
|
|
1497
|
+
}]
|
|
1482
1498
|
};
|
|
1483
|
-
|
|
1484
1499
|
if (this.constructor === XmlHighlightRules)
|
|
1485
1500
|
this.normalizeRules();
|
|
1486
1501
|
};
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
(function() {
|
|
1490
|
-
|
|
1491
|
-
this.embedTagRules = function(HighlightRules, prefix, tag){
|
|
1502
|
+
(function () {
|
|
1503
|
+
this.embedTagRules = function (HighlightRules, prefix, tag) {
|
|
1492
1504
|
this.$rules.tag.unshift({
|
|
1493
|
-
token
|
|
1494
|
-
regex
|
|
1505
|
+
token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
|
1506
|
+
regex: "(<)(" + tag + "(?=\\s|>|$))",
|
|
1495
1507
|
next: [
|
|
1496
|
-
{include
|
|
1497
|
-
{token
|
|
1508
|
+
{ include: "attributes" },
|
|
1509
|
+
{ token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
|
|
1498
1510
|
]
|
|
1499
1511
|
});
|
|
1500
|
-
|
|
1501
1512
|
this.$rules[tag + "-end"] = [
|
|
1502
|
-
{include
|
|
1503
|
-
{token
|
|
1504
|
-
onMatch
|
|
1513
|
+
{ include: "attributes" },
|
|
1514
|
+
{ token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
|
|
1515
|
+
onMatch: function (value, currentState, stack) {
|
|
1505
1516
|
stack.splice(0);
|
|
1506
1517
|
return this.token;
|
|
1507
|
-
|
|
1518
|
+
} }
|
|
1508
1519
|
];
|
|
1509
|
-
|
|
1510
1520
|
this.embedRules(HighlightRules, prefix, [{
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
+
token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
|
1522
|
+
regex: "(</)(" + tag + "(?=\\s|>|$))",
|
|
1523
|
+
next: tag + "-end"
|
|
1524
|
+
}, {
|
|
1525
|
+
token: "string.cdata.xml",
|
|
1526
|
+
regex: "<\\!\\[CDATA\\["
|
|
1527
|
+
}, {
|
|
1528
|
+
token: "string.cdata.xml",
|
|
1529
|
+
regex: "\\]\\]>"
|
|
1530
|
+
}]);
|
|
1521
1531
|
};
|
|
1522
|
-
|
|
1523
1532
|
}).call(TextHighlightRules.prototype);
|
|
1524
|
-
|
|
1525
1533
|
oop.inherits(XmlHighlightRules, TextHighlightRules);
|
|
1526
|
-
|
|
1527
1534
|
exports.XmlHighlightRules = XmlHighlightRules;
|
|
1528
|
-
});
|
|
1529
1535
|
|
|
1530
|
-
|
|
1531
|
-
"use strict";
|
|
1536
|
+
});
|
|
1532
1537
|
|
|
1538
|
+
ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict";
|
|
1533
1539
|
var oop = require("../lib/oop");
|
|
1534
1540
|
var lang = require("../lib/lang");
|
|
1535
1541
|
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
|
1536
1542
|
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
|
1537
1543
|
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
|
1538
|
-
|
|
1539
1544
|
var tagMap = lang.createMap({
|
|
1540
|
-
a
|
|
1541
|
-
button
|
|
1542
|
-
form
|
|
1543
|
-
img
|
|
1544
|
-
input
|
|
1545
|
-
label
|
|
1546
|
-
option
|
|
1547
|
-
script
|
|
1548
|
-
select
|
|
1549
|
-
textarea
|
|
1550
|
-
style
|
|
1551
|
-
table
|
|
1552
|
-
tbody
|
|
1553
|
-
td
|
|
1554
|
-
tfoot
|
|
1555
|
-
th
|
|
1556
|
-
tr
|
|
1545
|
+
a: 'anchor',
|
|
1546
|
+
button: 'form',
|
|
1547
|
+
form: 'form',
|
|
1548
|
+
img: 'image',
|
|
1549
|
+
input: 'form',
|
|
1550
|
+
label: 'form',
|
|
1551
|
+
option: 'form',
|
|
1552
|
+
script: 'script',
|
|
1553
|
+
select: 'form',
|
|
1554
|
+
textarea: 'form',
|
|
1555
|
+
style: 'style',
|
|
1556
|
+
table: 'table',
|
|
1557
|
+
tbody: 'table',
|
|
1558
|
+
td: 'table',
|
|
1559
|
+
tfoot: 'table',
|
|
1560
|
+
th: 'table',
|
|
1561
|
+
tr: 'table'
|
|
1557
1562
|
});
|
|
1558
|
-
|
|
1559
|
-
var HtmlHighlightRules = function() {
|
|
1563
|
+
var HtmlHighlightRules = function () {
|
|
1560
1564
|
XmlHighlightRules.call(this);
|
|
1561
|
-
|
|
1562
1565
|
this.addRules({
|
|
1563
1566
|
attributes: [{
|
|
1564
|
-
include : "tag_whitespace"
|
|
1565
|
-
}, {
|
|
1566
|
-
token : "entity.other.attribute-name.xml",
|
|
1567
|
-
regex : "[-_a-zA-Z0-9:.]+"
|
|
1568
|
-
}, {
|
|
1569
|
-
token : "keyword.operator.attribute-equals.xml",
|
|
1570
|
-
regex : "=",
|
|
1571
|
-
push : [{
|
|
1572
1567
|
include: "tag_whitespace"
|
|
1573
1568
|
}, {
|
|
1574
|
-
token
|
|
1575
|
-
regex
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1569
|
+
token: "entity.other.attribute-name.xml",
|
|
1570
|
+
regex: "[-_a-zA-Z0-9:.]+"
|
|
1571
|
+
}, {
|
|
1572
|
+
token: "keyword.operator.attribute-equals.xml",
|
|
1573
|
+
regex: "=",
|
|
1574
|
+
push: [{
|
|
1575
|
+
include: "tag_whitespace"
|
|
1576
|
+
}, {
|
|
1577
|
+
token: "string.unquoted.attribute-value.html",
|
|
1578
|
+
regex: "[^<>='\"`\\s]+",
|
|
1579
|
+
next: "pop"
|
|
1580
|
+
}, {
|
|
1581
|
+
token: "empty",
|
|
1582
|
+
regex: "",
|
|
1583
|
+
next: "pop"
|
|
1584
|
+
}]
|
|
1585
|
+
}, {
|
|
1586
|
+
include: "attribute_value"
|
|
1587
|
+
}],
|
|
1585
1588
|
tag: [{
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1589
|
+
token: function (start, tag) {
|
|
1590
|
+
var group = tagMap[tag];
|
|
1591
|
+
return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
|
|
1592
|
+
"meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
|
|
1593
|
+
},
|
|
1594
|
+
regex: "(</?)([-_a-zA-Z0-9:.]+)",
|
|
1595
|
+
next: "tag_stuff"
|
|
1596
|
+
}],
|
|
1594
1597
|
tag_stuff: [
|
|
1595
|
-
{include
|
|
1596
|
-
{token
|
|
1598
|
+
{ include: "attributes" },
|
|
1599
|
+
{ token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
|
|
1597
1600
|
]
|
|
1598
1601
|
});
|
|
1599
|
-
|
|
1600
1602
|
this.embedTagRules(CssHighlightRules, "css-", "style");
|
|
1601
|
-
this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
|
|
1602
|
-
|
|
1603
|
+
this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script");
|
|
1603
1604
|
if (this.constructor === HtmlHighlightRules)
|
|
1604
1605
|
this.normalizeRules();
|
|
1605
1606
|
};
|
|
1606
|
-
|
|
1607
1607
|
oop.inherits(HtmlHighlightRules, XmlHighlightRules);
|
|
1608
|
-
|
|
1609
1608
|
exports.HtmlHighlightRules = HtmlHighlightRules;
|
|
1610
|
-
});
|
|
1611
1609
|
|
|
1612
|
-
|
|
1613
|
-
"use strict";
|
|
1610
|
+
});
|
|
1614
1611
|
|
|
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";
|
|
1615
1613
|
var oop = require("../../lib/oop");
|
|
1616
1614
|
var Behaviour = require("../behaviour").Behaviour;
|
|
1617
1615
|
var TokenIterator = require("../../token_iterator").TokenIterator;
|
|
1618
1616
|
var lang = require("../../lib/lang");
|
|
1619
|
-
|
|
1620
1617
|
function is(token, type) {
|
|
1621
1618
|
return token && token.type.lastIndexOf(type + ".xml") > -1;
|
|
1622
1619
|
}
|
|
1623
|
-
|
|
1624
1620
|
var XmlBehaviour = function () {
|
|
1625
|
-
|
|
1626
1621
|
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
|
1627
1622
|
if (text == '"' || text == "'") {
|
|
1628
1623
|
var quote = text;
|
|
@@ -1633,26 +1628,21 @@ var XmlBehaviour = function () {
|
|
|
1633
1628
|
selection: false
|
|
1634
1629
|
};
|
|
1635
1630
|
}
|
|
1636
|
-
|
|
1637
1631
|
var cursor = editor.getCursorPosition();
|
|
1638
1632
|
var line = session.doc.getLine(cursor.row);
|
|
1639
1633
|
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
|
1640
1634
|
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
|
1641
1635
|
var token = iterator.getCurrentToken();
|
|
1642
|
-
|
|
1643
1636
|
if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
|
|
1644
1637
|
return {
|
|
1645
1638
|
text: "",
|
|
1646
1639
|
selection: [1, 1]
|
|
1647
1640
|
};
|
|
1648
1641
|
}
|
|
1649
|
-
|
|
1650
1642
|
if (!token)
|
|
1651
1643
|
token = iterator.stepBackward();
|
|
1652
|
-
|
|
1653
1644
|
if (!token)
|
|
1654
1645
|
return;
|
|
1655
|
-
|
|
1656
1646
|
while (is(token, "tag-whitespace") || is(token, "whitespace")) {
|
|
1657
1647
|
token = iterator.stepBackward();
|
|
1658
1648
|
}
|
|
@@ -1665,8 +1655,7 @@ var XmlBehaviour = function () {
|
|
|
1665
1655
|
}
|
|
1666
1656
|
}
|
|
1667
1657
|
});
|
|
1668
|
-
|
|
1669
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
|
1658
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
|
1670
1659
|
var selected = session.doc.getTextRange(range);
|
|
1671
1660
|
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
|
1672
1661
|
var line = session.doc.getLine(range.start.row);
|
|
@@ -1677,7 +1666,6 @@ var XmlBehaviour = function () {
|
|
|
1677
1666
|
}
|
|
1678
1667
|
}
|
|
1679
1668
|
});
|
|
1680
|
-
|
|
1681
1669
|
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
|
|
1682
1670
|
if (text == '>') {
|
|
1683
1671
|
var position = editor.getSelectionRange().start;
|
|
@@ -1698,7 +1686,6 @@ var XmlBehaviour = function () {
|
|
|
1698
1686
|
iterator.stepBackward();
|
|
1699
1687
|
}
|
|
1700
1688
|
}
|
|
1701
|
-
|
|
1702
1689
|
if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
|
|
1703
1690
|
return;
|
|
1704
1691
|
while (!is(token, "tag-name")) {
|
|
@@ -1708,63 +1695,54 @@ var XmlBehaviour = function () {
|
|
|
1708
1695
|
break;
|
|
1709
1696
|
}
|
|
1710
1697
|
}
|
|
1711
|
-
|
|
1712
1698
|
var tokenRow = iterator.getCurrentTokenRow();
|
|
1713
1699
|
var tokenColumn = iterator.getCurrentTokenColumn();
|
|
1714
1700
|
if (is(iterator.stepBackward(), "end-tag-open"))
|
|
1715
1701
|
return;
|
|
1716
|
-
|
|
1717
1702
|
var element = token.value;
|
|
1718
1703
|
if (tokenRow == position.row)
|
|
1719
1704
|
element = element.substring(0, position.column - tokenColumn);
|
|
1720
|
-
|
|
1721
1705
|
if (this.voidElements.hasOwnProperty(element.toLowerCase()))
|
|
1722
|
-
|
|
1723
|
-
|
|
1706
|
+
return;
|
|
1724
1707
|
return {
|
|
1725
|
-
|
|
1726
|
-
|
|
1708
|
+
text: ">" + "</" + element + ">",
|
|
1709
|
+
selection: [1, 1]
|
|
1727
1710
|
};
|
|
1728
1711
|
}
|
|
1729
1712
|
});
|
|
1730
|
-
|
|
1731
1713
|
this.add("autoindent", "insertion", function (state, action, editor, session, text) {
|
|
1732
1714
|
if (text == "\n") {
|
|
1733
1715
|
var cursor = editor.getCursorPosition();
|
|
1734
1716
|
var line = session.getLine(cursor.row);
|
|
1735
1717
|
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
|
1736
1718
|
var token = iterator.getCurrentToken();
|
|
1737
|
-
|
|
1738
1719
|
if (token && token.type.indexOf("tag-close") !== -1) {
|
|
1739
1720
|
if (token.value == "/>")
|
|
1740
1721
|
return;
|
|
1741
1722
|
while (token && token.type.indexOf("tag-name") === -1) {
|
|
1742
1723
|
token = iterator.stepBackward();
|
|
1743
1724
|
}
|
|
1744
|
-
|
|
1745
1725
|
if (!token) {
|
|
1746
1726
|
return;
|
|
1747
1727
|
}
|
|
1748
|
-
|
|
1749
1728
|
var tag = token.value;
|
|
1750
1729
|
var row = iterator.getCurrentTokenRow();
|
|
1751
1730
|
token = iterator.stepBackward();
|
|
1752
1731
|
if (!token || token.type.indexOf("end-tag") !== -1) {
|
|
1753
1732
|
return;
|
|
1754
1733
|
}
|
|
1755
|
-
|
|
1756
1734
|
if (this.voidElements && !this.voidElements[tag]) {
|
|
1757
|
-
var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
|
|
1735
|
+
var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
|
1758
1736
|
var line = session.getLine(row);
|
|
1759
1737
|
var nextIndent = this.$getIndent(line);
|
|
1760
1738
|
var indent = nextIndent + session.getTabString();
|
|
1761
|
-
|
|
1762
1739
|
if (nextToken && nextToken.value === "</") {
|
|
1763
1740
|
return {
|
|
1764
1741
|
text: "\n" + indent + "\n" + nextIndent,
|
|
1765
1742
|
selection: [1, indent.length, 1, indent.length]
|
|
1766
1743
|
};
|
|
1767
|
-
}
|
|
1744
|
+
}
|
|
1745
|
+
else {
|
|
1768
1746
|
return {
|
|
1769
1747
|
text: "\n" + indent
|
|
1770
1748
|
};
|
|
@@ -1773,31 +1751,23 @@ var XmlBehaviour = function () {
|
|
|
1773
1751
|
}
|
|
1774
1752
|
}
|
|
1775
1753
|
});
|
|
1776
|
-
|
|
1777
1754
|
};
|
|
1778
|
-
|
|
1779
1755
|
oop.inherits(XmlBehaviour, Behaviour);
|
|
1780
|
-
|
|
1781
1756
|
exports.XmlBehaviour = XmlBehaviour;
|
|
1782
|
-
});
|
|
1783
1757
|
|
|
1784
|
-
|
|
1785
|
-
"use strict";
|
|
1758
|
+
});
|
|
1786
1759
|
|
|
1760
|
+
ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
|
|
1787
1761
|
var oop = require("../../lib/oop");
|
|
1788
1762
|
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
1789
|
-
|
|
1790
|
-
var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
|
|
1763
|
+
var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
|
|
1791
1764
|
this.defaultMode = defaultMode;
|
|
1792
1765
|
this.subModes = subModes;
|
|
1793
1766
|
};
|
|
1794
1767
|
oop.inherits(FoldMode, BaseFoldMode);
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
this.$getMode = function(state) {
|
|
1800
|
-
if (typeof state != "string")
|
|
1768
|
+
(function () {
|
|
1769
|
+
this.$getMode = function (state) {
|
|
1770
|
+
if (typeof state != "string")
|
|
1801
1771
|
state = state[0];
|
|
1802
1772
|
for (var key in this.subModes) {
|
|
1803
1773
|
if (state.indexOf(key) === 0)
|
|
@@ -1805,96 +1775,70 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|
|
1805
1775
|
}
|
|
1806
1776
|
return null;
|
|
1807
1777
|
};
|
|
1808
|
-
|
|
1809
|
-
this.$tryMode = function(state, session, foldStyle, row) {
|
|
1778
|
+
this.$tryMode = function (state, session, foldStyle, row) {
|
|
1810
1779
|
var mode = this.$getMode(state);
|
|
1811
1780
|
return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
|
|
1812
1781
|
};
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
return (
|
|
1816
|
-
this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
|
|
1782
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
1783
|
+
return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
|
|
1817
1784
|
this.$tryMode(session.getState(row), session, foldStyle, row) ||
|
|
1818
|
-
this.defaultMode.getFoldWidget(session, foldStyle, row)
|
|
1819
|
-
);
|
|
1785
|
+
this.defaultMode.getFoldWidget(session, foldStyle, row));
|
|
1820
1786
|
};
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
var mode = this.$getMode(session.getState(row-1));
|
|
1824
|
-
|
|
1787
|
+
this.getFoldWidgetRange = function (session, foldStyle, row) {
|
|
1788
|
+
var mode = this.$getMode(session.getState(row - 1));
|
|
1825
1789
|
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
|
|
1826
1790
|
mode = this.$getMode(session.getState(row));
|
|
1827
|
-
|
|
1828
1791
|
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
|
|
1829
1792
|
mode = this.defaultMode;
|
|
1830
|
-
|
|
1831
1793
|
return mode.getFoldWidgetRange(session, foldStyle, row);
|
|
1832
1794
|
};
|
|
1833
|
-
|
|
1834
1795
|
}).call(FoldMode.prototype);
|
|
1835
1796
|
|
|
1836
1797
|
});
|
|
1837
1798
|
|
|
1838
|
-
ace.define("ace/mode/folding/xml",[], function(require, exports, module)
|
|
1839
|
-
"use strict";
|
|
1840
|
-
|
|
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";
|
|
1841
1800
|
var oop = require("../../lib/oop");
|
|
1842
|
-
var lang = require("../../lib/lang");
|
|
1843
1801
|
var Range = require("../../range").Range;
|
|
1844
1802
|
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
1845
|
-
var
|
|
1846
|
-
|
|
1847
|
-
var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
|
|
1803
|
+
var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
|
|
1848
1804
|
BaseFoldMode.call(this);
|
|
1849
1805
|
this.voidElements = voidElements || {};
|
|
1850
1806
|
this.optionalEndTags = oop.mixin({}, this.voidElements);
|
|
1851
1807
|
if (optionalEndTags)
|
|
1852
1808
|
oop.mixin(this.optionalEndTags, optionalEndTags);
|
|
1853
|
-
|
|
1854
1809
|
};
|
|
1855
1810
|
oop.inherits(FoldMode, BaseFoldMode);
|
|
1856
|
-
|
|
1857
|
-
var Tag = function() {
|
|
1811
|
+
var Tag = function () {
|
|
1858
1812
|
this.tagName = "";
|
|
1859
1813
|
this.closing = false;
|
|
1860
1814
|
this.selfClosing = false;
|
|
1861
|
-
this.start = {row: 0, column: 0};
|
|
1862
|
-
this.end = {row: 0, column: 0};
|
|
1815
|
+
this.start = { row: 0, column: 0 };
|
|
1816
|
+
this.end = { row: 0, column: 0 };
|
|
1863
1817
|
};
|
|
1864
|
-
|
|
1865
1818
|
function is(token, type) {
|
|
1866
1819
|
return token.type.lastIndexOf(type + ".xml") > -1;
|
|
1867
1820
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
|
1821
|
+
(function () {
|
|
1822
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
1872
1823
|
var tag = this._getFirstTagInLine(session, row);
|
|
1873
|
-
|
|
1874
1824
|
if (!tag)
|
|
1875
1825
|
return this.getCommentFoldWidget(session, row);
|
|
1876
|
-
|
|
1877
1826
|
if (tag.closing || (!tag.tagName && tag.selfClosing))
|
|
1878
|
-
return foldStyle
|
|
1879
|
-
|
|
1827
|
+
return foldStyle === "markbeginend" ? "end" : "";
|
|
1880
1828
|
if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
|
|
1881
1829
|
return "";
|
|
1882
|
-
|
|
1883
1830
|
if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
|
|
1884
1831
|
return "";
|
|
1885
|
-
|
|
1886
1832
|
return "start";
|
|
1887
1833
|
};
|
|
1888
|
-
|
|
1889
|
-
this.getCommentFoldWidget = function(session, row) {
|
|
1834
|
+
this.getCommentFoldWidget = function (session, row) {
|
|
1890
1835
|
if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
|
|
1891
1836
|
return "start";
|
|
1892
1837
|
return "";
|
|
1893
1838
|
};
|
|
1894
|
-
this._getFirstTagInLine = function(session, row) {
|
|
1839
|
+
this._getFirstTagInLine = function (session, row) {
|
|
1895
1840
|
var tokens = session.getTokens(row);
|
|
1896
1841
|
var tag = new Tag();
|
|
1897
|
-
|
|
1898
1842
|
for (var i = 0; i < tokens.length; i++) {
|
|
1899
1843
|
var token = tokens[i];
|
|
1900
1844
|
if (is(token, "tag-open")) {
|
|
@@ -1914,17 +1858,16 @@ function is(token, type) {
|
|
|
1914
1858
|
}
|
|
1915
1859
|
}
|
|
1916
1860
|
return tag;
|
|
1917
|
-
}
|
|
1861
|
+
}
|
|
1862
|
+
else if (is(token, "tag-close")) {
|
|
1918
1863
|
tag.selfClosing = token.value == '/>';
|
|
1919
1864
|
return tag;
|
|
1920
1865
|
}
|
|
1921
1866
|
tag.start.column += token.value.length;
|
|
1922
1867
|
}
|
|
1923
|
-
|
|
1924
1868
|
return null;
|
|
1925
1869
|
};
|
|
1926
|
-
|
|
1927
|
-
this._findEndTagInLine = function(session, row, tagName, startColumn) {
|
|
1870
|
+
this._findEndTagInLine = function (session, row, tagName, startColumn) {
|
|
1928
1871
|
var tokens = session.getTokens(row);
|
|
1929
1872
|
var column = 0;
|
|
1930
1873
|
for (var i = 0; i < tokens.length; i++) {
|
|
@@ -1940,174 +1883,37 @@ function is(token, type) {
|
|
|
1940
1883
|
}
|
|
1941
1884
|
return false;
|
|
1942
1885
|
};
|
|
1943
|
-
this.
|
|
1944
|
-
var
|
|
1945
|
-
if (
|
|
1946
|
-
return
|
|
1947
|
-
|
|
1948
|
-
var tag = new Tag();
|
|
1949
|
-
do {
|
|
1950
|
-
if (is(token, "tag-open")) {
|
|
1951
|
-
tag.closing = is(token, "end-tag-open");
|
|
1952
|
-
tag.start.row = iterator.getCurrentTokenRow();
|
|
1953
|
-
tag.start.column = iterator.getCurrentTokenColumn();
|
|
1954
|
-
} else if (is(token, "tag-name")) {
|
|
1955
|
-
tag.tagName = token.value;
|
|
1956
|
-
} else if (is(token, "tag-close")) {
|
|
1957
|
-
tag.selfClosing = token.value == "/>";
|
|
1958
|
-
tag.end.row = iterator.getCurrentTokenRow();
|
|
1959
|
-
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
|
|
1960
|
-
iterator.stepForward();
|
|
1961
|
-
return tag;
|
|
1962
|
-
}
|
|
1963
|
-
} while(token = iterator.stepForward());
|
|
1964
|
-
|
|
1965
|
-
return null;
|
|
1966
|
-
};
|
|
1967
|
-
|
|
1968
|
-
this._readTagBackward = function(iterator) {
|
|
1969
|
-
var token = iterator.getCurrentToken();
|
|
1970
|
-
if (!token)
|
|
1971
|
-
return null;
|
|
1972
|
-
|
|
1973
|
-
var tag = new Tag();
|
|
1974
|
-
do {
|
|
1975
|
-
if (is(token, "tag-open")) {
|
|
1976
|
-
tag.closing = is(token, "end-tag-open");
|
|
1977
|
-
tag.start.row = iterator.getCurrentTokenRow();
|
|
1978
|
-
tag.start.column = iterator.getCurrentTokenColumn();
|
|
1979
|
-
iterator.stepBackward();
|
|
1980
|
-
return tag;
|
|
1981
|
-
} else if (is(token, "tag-name")) {
|
|
1982
|
-
tag.tagName = token.value;
|
|
1983
|
-
} else if (is(token, "tag-close")) {
|
|
1984
|
-
tag.selfClosing = token.value == "/>";
|
|
1985
|
-
tag.end.row = iterator.getCurrentTokenRow();
|
|
1986
|
-
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
|
|
1987
|
-
}
|
|
1988
|
-
} while(token = iterator.stepBackward());
|
|
1989
|
-
|
|
1990
|
-
return null;
|
|
1991
|
-
};
|
|
1992
|
-
|
|
1993
|
-
this._pop = function(stack, tag) {
|
|
1994
|
-
while (stack.length) {
|
|
1995
|
-
|
|
1996
|
-
var top = stack[stack.length-1];
|
|
1997
|
-
if (!tag || top.tagName == tag.tagName) {
|
|
1998
|
-
return stack.pop();
|
|
1999
|
-
}
|
|
2000
|
-
else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
|
|
2001
|
-
stack.pop();
|
|
2002
|
-
continue;
|
|
2003
|
-
} else {
|
|
2004
|
-
return null;
|
|
2005
|
-
}
|
|
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);
|
|
2006
1890
|
}
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
|
2010
|
-
var firstTag = this._getFirstTagInLine(session, row);
|
|
2011
|
-
|
|
2012
|
-
if (!firstTag) {
|
|
1891
|
+
else {
|
|
2013
1892
|
return this.getCommentFoldWidget(session, row)
|
|
2014
1893
|
&& session.getCommentFoldRange(row, session.getLine(row).length);
|
|
2015
1894
|
}
|
|
2016
|
-
|
|
2017
|
-
var isBackward = firstTag.closing || firstTag.selfClosing;
|
|
2018
|
-
var stack = [];
|
|
2019
|
-
var tag;
|
|
2020
|
-
|
|
2021
|
-
if (!isBackward) {
|
|
2022
|
-
var iterator = new TokenIterator(session, row, firstTag.start.column);
|
|
2023
|
-
var start = {
|
|
2024
|
-
row: row,
|
|
2025
|
-
column: firstTag.start.column + firstTag.tagName.length + 2
|
|
2026
|
-
};
|
|
2027
|
-
if (firstTag.start.row == firstTag.end.row)
|
|
2028
|
-
start.column = firstTag.end.column;
|
|
2029
|
-
while (tag = this._readTagForward(iterator)) {
|
|
2030
|
-
if (tag.selfClosing) {
|
|
2031
|
-
if (!stack.length) {
|
|
2032
|
-
tag.start.column += tag.tagName.length + 2;
|
|
2033
|
-
tag.end.column -= 2;
|
|
2034
|
-
return Range.fromPoints(tag.start, tag.end);
|
|
2035
|
-
} else
|
|
2036
|
-
continue;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
if (tag.closing) {
|
|
2040
|
-
this._pop(stack, tag);
|
|
2041
|
-
if (stack.length == 0)
|
|
2042
|
-
return Range.fromPoints(start, tag.start);
|
|
2043
|
-
}
|
|
2044
|
-
else {
|
|
2045
|
-
stack.push(tag);
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
}
|
|
2049
|
-
else {
|
|
2050
|
-
var iterator = new TokenIterator(session, row, firstTag.end.column);
|
|
2051
|
-
var end = {
|
|
2052
|
-
row: row,
|
|
2053
|
-
column: firstTag.start.column
|
|
2054
|
-
};
|
|
2055
|
-
|
|
2056
|
-
while (tag = this._readTagBackward(iterator)) {
|
|
2057
|
-
if (tag.selfClosing) {
|
|
2058
|
-
if (!stack.length) {
|
|
2059
|
-
tag.start.column += tag.tagName.length + 2;
|
|
2060
|
-
tag.end.column -= 2;
|
|
2061
|
-
return Range.fromPoints(tag.start, tag.end);
|
|
2062
|
-
} else
|
|
2063
|
-
continue;
|
|
2064
|
-
}
|
|
2065
|
-
|
|
2066
|
-
if (!tag.closing) {
|
|
2067
|
-
this._pop(stack, tag);
|
|
2068
|
-
if (stack.length == 0) {
|
|
2069
|
-
tag.start.column += tag.tagName.length + 2;
|
|
2070
|
-
if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
|
|
2071
|
-
tag.start.column = tag.end.column;
|
|
2072
|
-
return Range.fromPoints(tag.start, end);
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
else {
|
|
2076
|
-
stack.push(tag);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
1895
|
};
|
|
2082
|
-
|
|
2083
1896
|
}).call(FoldMode.prototype);
|
|
2084
1897
|
|
|
2085
1898
|
});
|
|
2086
1899
|
|
|
2087
|
-
ace.define("ace/mode/folding/html",[], function(require, exports, module)
|
|
2088
|
-
"use strict";
|
|
2089
|
-
|
|
1900
|
+
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";
|
|
2090
1901
|
var oop = require("../../lib/oop");
|
|
2091
1902
|
var MixedFoldMode = require("./mixed").FoldMode;
|
|
2092
1903
|
var XmlFoldMode = require("./xml").FoldMode;
|
|
2093
1904
|
var CStyleFoldMode = require("./cstyle").FoldMode;
|
|
2094
|
-
|
|
2095
|
-
var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
|
|
1905
|
+
var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
|
|
2096
1906
|
MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
|
|
2097
1907
|
"js-": new CStyleFoldMode(),
|
|
2098
1908
|
"css-": new CStyleFoldMode()
|
|
2099
1909
|
});
|
|
2100
1910
|
};
|
|
2101
|
-
|
|
2102
1911
|
oop.inherits(FoldMode, MixedFoldMode);
|
|
2103
1912
|
|
|
2104
1913
|
});
|
|
2105
1914
|
|
|
2106
|
-
ace.define("ace/mode/html_completions",[], function(require, exports, module)
|
|
2107
|
-
"use strict";
|
|
2108
|
-
|
|
1915
|
+
ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict";
|
|
2109
1916
|
var TokenIterator = require("../token_iterator").TokenIterator;
|
|
2110
|
-
|
|
2111
1917
|
var commonAttributes = [
|
|
2112
1918
|
"accesskey",
|
|
2113
1919
|
"class",
|
|
@@ -2131,7 +1937,6 @@ var commonAttributes = [
|
|
|
2131
1937
|
"title",
|
|
2132
1938
|
"translate"
|
|
2133
1939
|
];
|
|
2134
|
-
|
|
2135
1940
|
var eventAttributes = [
|
|
2136
1941
|
"onabort",
|
|
2137
1942
|
"onblur",
|
|
@@ -2189,49 +1994,47 @@ var eventAttributes = [
|
|
|
2189
1994
|
"onvolumechange",
|
|
2190
1995
|
"onwaiting"
|
|
2191
1996
|
];
|
|
2192
|
-
|
|
2193
1997
|
var globalAttributes = commonAttributes.concat(eventAttributes);
|
|
2194
|
-
|
|
2195
1998
|
var attributeMap = {
|
|
2196
|
-
"a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
|
|
1999
|
+
"a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 },
|
|
2197
2000
|
"abbr": {},
|
|
2198
2001
|
"address": {},
|
|
2199
|
-
"area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
|
|
2200
|
-
"article": {"pubdate": 1},
|
|
2002
|
+
"area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 },
|
|
2003
|
+
"article": { "pubdate": 1 },
|
|
2201
2004
|
"aside": {},
|
|
2202
|
-
"audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
|
|
2005
|
+
"audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
|
|
2203
2006
|
"b": {},
|
|
2204
|
-
"base": {"href": 1, "target": 1},
|
|
2007
|
+
"base": { "href": 1, "target": 1 },
|
|
2205
2008
|
"bdi": {},
|
|
2206
2009
|
"bdo": {},
|
|
2207
|
-
"blockquote": {"cite": 1},
|
|
2208
|
-
"body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
|
|
2010
|
+
"blockquote": { "cite": 1 },
|
|
2011
|
+
"body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 },
|
|
2209
2012
|
"br": {},
|
|
2210
|
-
"button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
|
|
2211
|
-
"canvas": {"width": 1, "height": 1},
|
|
2013
|
+
"button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } },
|
|
2014
|
+
"canvas": { "width": 1, "height": 1 },
|
|
2212
2015
|
"caption": {},
|
|
2213
2016
|
"cite": {},
|
|
2214
2017
|
"code": {},
|
|
2215
|
-
"col": {"span": 1},
|
|
2216
|
-
"colgroup": {"span": 1},
|
|
2217
|
-
"command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
|
|
2018
|
+
"col": { "span": 1 },
|
|
2019
|
+
"colgroup": { "span": 1 },
|
|
2020
|
+
"command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 },
|
|
2218
2021
|
"data": {},
|
|
2219
2022
|
"datalist": {},
|
|
2220
2023
|
"dd": {},
|
|
2221
|
-
"del": {"cite": 1, "datetime": 1},
|
|
2222
|
-
"details": {"open": 1},
|
|
2024
|
+
"del": { "cite": 1, "datetime": 1 },
|
|
2025
|
+
"details": { "open": 1 },
|
|
2223
2026
|
"dfn": {},
|
|
2224
|
-
"dialog": {"open": 1},
|
|
2027
|
+
"dialog": { "open": 1 },
|
|
2225
2028
|
"div": {},
|
|
2226
2029
|
"dl": {},
|
|
2227
2030
|
"dt": {},
|
|
2228
2031
|
"em": {},
|
|
2229
|
-
"embed": {"src": 1, "height": 1, "width": 1, "type": 1},
|
|
2230
|
-
"fieldset": {"disabled": 1, "form": 1, "name": 1},
|
|
2032
|
+
"embed": { "src": 1, "height": 1, "width": 1, "type": 1 },
|
|
2033
|
+
"fieldset": { "disabled": 1, "form": 1, "name": 1 },
|
|
2231
2034
|
"figcaption": {},
|
|
2232
2035
|
"figure": {},
|
|
2233
2036
|
"footer": {},
|
|
2234
|
-
"form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
|
|
2037
|
+
"form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } },
|
|
2235
2038
|
"h1": {},
|
|
2236
2039
|
"h2": {},
|
|
2237
2040
|
"h3": {},
|
|
@@ -2241,109 +2044,101 @@ var attributeMap = {
|
|
|
2241
2044
|
"head": {},
|
|
2242
2045
|
"header": {},
|
|
2243
2046
|
"hr": {},
|
|
2244
|
-
"html": {"manifest": 1},
|
|
2047
|
+
"html": { "manifest": 1 },
|
|
2245
2048
|
"i": {},
|
|
2246
|
-
"iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
|
|
2247
|
-
"img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
|
|
2049
|
+
"iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } },
|
|
2050
|
+
"img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 },
|
|
2248
2051
|
"input": {
|
|
2249
|
-
"type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
|
|
2250
|
-
"accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1
|
|
2251
|
-
|
|
2052
|
+
"type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 },
|
|
2053
|
+
"accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1
|
|
2054
|
+
},
|
|
2055
|
+
"ins": { "cite": 1, "datetime": 1 },
|
|
2252
2056
|
"kbd": {},
|
|
2253
|
-
"keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
|
|
2254
|
-
"label": {"form": 1, "for": 1},
|
|
2057
|
+
"keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 },
|
|
2058
|
+
"label": { "form": 1, "for": 1 },
|
|
2255
2059
|
"legend": {},
|
|
2256
|
-
"li": {"value": 1},
|
|
2257
|
-
"link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
|
|
2060
|
+
"li": { "value": 1 },
|
|
2061
|
+
"link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 },
|
|
2258
2062
|
"main": {},
|
|
2259
|
-
"map": {"name": 1},
|
|
2063
|
+
"map": { "name": 1 },
|
|
2260
2064
|
"mark": {},
|
|
2261
2065
|
"math": {},
|
|
2262
|
-
"menu": {"type": 1, "label": 1},
|
|
2263
|
-
"meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
|
|
2264
|
-
"meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
|
|
2066
|
+
"menu": { "type": 1, "label": 1 },
|
|
2067
|
+
"meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 },
|
|
2068
|
+
"meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 },
|
|
2265
2069
|
"nav": {},
|
|
2266
|
-
"noscript": {"href": 1},
|
|
2267
|
-
"object": {"param": 1, "data": 1, "type": 1, "height"
|
|
2268
|
-
"ol": {"start": 1, "reversed": 1},
|
|
2269
|
-
"optgroup": {"disabled": 1, "label": 1},
|
|
2270
|
-
"option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
|
|
2271
|
-
"output": {"for": 1, "form": 1, "name": 1},
|
|
2070
|
+
"noscript": { "href": 1 },
|
|
2071
|
+
"object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 },
|
|
2072
|
+
"ol": { "start": 1, "reversed": 1 },
|
|
2073
|
+
"optgroup": { "disabled": 1, "label": 1 },
|
|
2074
|
+
"option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 },
|
|
2075
|
+
"output": { "for": 1, "form": 1, "name": 1 },
|
|
2272
2076
|
"p": {},
|
|
2273
|
-
"param": {"name": 1, "value": 1},
|
|
2077
|
+
"param": { "name": 1, "value": 1 },
|
|
2274
2078
|
"pre": {},
|
|
2275
|
-
"progress": {"value": 1, "max": 1},
|
|
2276
|
-
"q": {"cite": 1},
|
|
2079
|
+
"progress": { "value": 1, "max": 1 },
|
|
2080
|
+
"q": { "cite": 1 },
|
|
2277
2081
|
"rp": {},
|
|
2278
2082
|
"rt": {},
|
|
2279
2083
|
"ruby": {},
|
|
2280
2084
|
"s": {},
|
|
2281
2085
|
"samp": {},
|
|
2282
|
-
"script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
|
|
2283
|
-
"select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
|
|
2086
|
+
"script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 },
|
|
2087
|
+
"select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } },
|
|
2284
2088
|
"small": {},
|
|
2285
|
-
"source": {"src": 1, "type": 1, "media": 1},
|
|
2089
|
+
"source": { "src": 1, "type": 1, "media": 1 },
|
|
2286
2090
|
"span": {},
|
|
2287
2091
|
"strong": {},
|
|
2288
|
-
"style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
|
|
2092
|
+
"style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 },
|
|
2289
2093
|
"sub": {},
|
|
2290
2094
|
"sup": {},
|
|
2291
2095
|
"svg": {},
|
|
2292
|
-
"table": {"summary": 1},
|
|
2096
|
+
"table": { "summary": 1 },
|
|
2293
2097
|
"tbody": {},
|
|
2294
|
-
"td": {"headers": 1, "rowspan": 1, "colspan": 1},
|
|
2295
|
-
"textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
|
|
2098
|
+
"td": { "headers": 1, "rowspan": 1, "colspan": 1 },
|
|
2099
|
+
"textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } },
|
|
2296
2100
|
"tfoot": {},
|
|
2297
|
-
"th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
|
|
2101
|
+
"th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 },
|
|
2298
2102
|
"thead": {},
|
|
2299
|
-
"time": {"datetime": 1},
|
|
2103
|
+
"time": { "datetime": 1 },
|
|
2300
2104
|
"title": {},
|
|
2301
2105
|
"tr": {},
|
|
2302
|
-
"track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
|
|
2106
|
+
"track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 },
|
|
2303
2107
|
"section": {},
|
|
2304
2108
|
"summary": {},
|
|
2305
2109
|
"u": {},
|
|
2306
2110
|
"ul": {},
|
|
2307
2111
|
"var": {},
|
|
2308
|
-
"video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
|
|
2112
|
+
"video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
|
|
2309
2113
|
"wbr": {}
|
|
2310
2114
|
};
|
|
2311
|
-
|
|
2312
2115
|
var elements = Object.keys(attributeMap);
|
|
2313
|
-
|
|
2314
2116
|
function is(token, type) {
|
|
2315
2117
|
return token.type.lastIndexOf(type + ".xml") > -1;
|
|
2316
2118
|
}
|
|
2317
|
-
|
|
2318
2119
|
function findTagName(session, pos) {
|
|
2319
2120
|
var iterator = new TokenIterator(session, pos.row, pos.column);
|
|
2320
2121
|
var token = iterator.getCurrentToken();
|
|
2321
|
-
while (token && !is(token, "tag-name")){
|
|
2122
|
+
while (token && !is(token, "tag-name")) {
|
|
2322
2123
|
token = iterator.stepBackward();
|
|
2323
2124
|
}
|
|
2324
2125
|
if (token)
|
|
2325
2126
|
return token.value;
|
|
2326
2127
|
}
|
|
2327
|
-
|
|
2328
2128
|
function findAttributeName(session, pos) {
|
|
2329
2129
|
var iterator = new TokenIterator(session, pos.row, pos.column);
|
|
2330
2130
|
var token = iterator.getCurrentToken();
|
|
2331
|
-
while (token && !is(token, "attribute-name")){
|
|
2131
|
+
while (token && !is(token, "attribute-name")) {
|
|
2332
2132
|
token = iterator.stepBackward();
|
|
2333
2133
|
}
|
|
2334
2134
|
if (token)
|
|
2335
2135
|
return token.value;
|
|
2336
2136
|
}
|
|
2337
|
-
|
|
2338
|
-
var HtmlCompletions = function() {
|
|
2339
|
-
|
|
2137
|
+
var HtmlCompletions = function () {
|
|
2340
2138
|
};
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
this.getCompletions = function(state, session, pos, prefix) {
|
|
2139
|
+
(function () {
|
|
2140
|
+
this.getCompletions = function (state, session, pos, prefix) {
|
|
2345
2141
|
var token = session.getTokenAt(pos.row, pos.column);
|
|
2346
|
-
|
|
2347
2142
|
if (!token)
|
|
2348
2143
|
return [];
|
|
2349
2144
|
if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
|
|
@@ -2355,12 +2150,10 @@ var HtmlCompletions = function() {
|
|
|
2355
2150
|
var line = session.getLine(pos.row).substr(0, pos.column);
|
|
2356
2151
|
if (/&[a-z]*$/i.test(line))
|
|
2357
2152
|
return this.getHTMLEntityCompletions(state, session, pos, prefix);
|
|
2358
|
-
|
|
2359
2153
|
return [];
|
|
2360
2154
|
};
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
return elements.map(function(element){
|
|
2155
|
+
this.getTagCompletions = function (state, session, pos, prefix) {
|
|
2156
|
+
return elements.map(function (element) {
|
|
2364
2157
|
return {
|
|
2365
2158
|
value: element,
|
|
2366
2159
|
meta: "tag",
|
|
@@ -2368,8 +2161,7 @@ var HtmlCompletions = function() {
|
|
|
2368
2161
|
};
|
|
2369
2162
|
});
|
|
2370
2163
|
};
|
|
2371
|
-
|
|
2372
|
-
this.getAttributeCompletions = function(state, session, pos, prefix) {
|
|
2164
|
+
this.getAttributeCompletions = function (state, session, pos, prefix) {
|
|
2373
2165
|
var tagName = findTagName(session, pos);
|
|
2374
2166
|
if (!tagName)
|
|
2375
2167
|
return [];
|
|
@@ -2377,7 +2169,7 @@ var HtmlCompletions = function() {
|
|
|
2377
2169
|
if (tagName in attributeMap) {
|
|
2378
2170
|
attributes = attributes.concat(Object.keys(attributeMap[tagName]));
|
|
2379
2171
|
}
|
|
2380
|
-
return attributes.map(function(attribute){
|
|
2172
|
+
return attributes.map(function (attribute) {
|
|
2381
2173
|
return {
|
|
2382
2174
|
caption: attribute,
|
|
2383
2175
|
snippet: attribute + '="$0"',
|
|
@@ -2386,18 +2178,16 @@ var HtmlCompletions = function() {
|
|
|
2386
2178
|
};
|
|
2387
2179
|
});
|
|
2388
2180
|
};
|
|
2389
|
-
|
|
2390
|
-
this.getAttributeValueCompletions = function(state, session, pos, prefix) {
|
|
2181
|
+
this.getAttributeValueCompletions = function (state, session, pos, prefix) {
|
|
2391
2182
|
var tagName = findTagName(session, pos);
|
|
2392
2183
|
var attributeName = findAttributeName(session, pos);
|
|
2393
|
-
|
|
2394
2184
|
if (!tagName)
|
|
2395
2185
|
return [];
|
|
2396
2186
|
var values = [];
|
|
2397
2187
|
if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
|
|
2398
2188
|
values = Object.keys(attributeMap[tagName][attributeName]);
|
|
2399
2189
|
}
|
|
2400
|
-
return values.map(function(value){
|
|
2190
|
+
return values.map(function (value) {
|
|
2401
2191
|
return {
|
|
2402
2192
|
caption: value,
|
|
2403
2193
|
snippet: value,
|
|
@@ -2406,11 +2196,9 @@ var HtmlCompletions = function() {
|
|
|
2406
2196
|
};
|
|
2407
2197
|
});
|
|
2408
2198
|
};
|
|
2409
|
-
|
|
2410
|
-
this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
|
|
2199
|
+
this.getHTMLEntityCompletions = function (state, session, pos, prefix) {
|
|
2411
2200
|
var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
|
|
2412
|
-
|
|
2413
|
-
return values.map(function(value){
|
|
2201
|
+
return values.map(function (value) {
|
|
2414
2202
|
return {
|
|
2415
2203
|
caption: value,
|
|
2416
2204
|
snippet: value,
|
|
@@ -2419,15 +2207,12 @@ var HtmlCompletions = function() {
|
|
|
2419
2207
|
};
|
|
2420
2208
|
});
|
|
2421
2209
|
};
|
|
2422
|
-
|
|
2423
2210
|
}).call(HtmlCompletions.prototype);
|
|
2424
|
-
|
|
2425
2211
|
exports.HtmlCompletions = HtmlCompletions;
|
|
2426
|
-
});
|
|
2427
2212
|
|
|
2428
|
-
|
|
2429
|
-
"use strict";
|
|
2213
|
+
});
|
|
2430
2214
|
|
|
2215
|
+
ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict";
|
|
2431
2216
|
var oop = require("../lib/oop");
|
|
2432
2217
|
var lang = require("../lib/lang");
|
|
2433
2218
|
var TextMode = require("./text").Mode;
|
|
@@ -2440,111 +2225,83 @@ var HtmlCompletions = require("./html_completions").HtmlCompletions;
|
|
|
2440
2225
|
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
|
2441
2226
|
var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
|
|
2442
2227
|
var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
|
|
2443
|
-
|
|
2444
|
-
var Mode = function(options) {
|
|
2228
|
+
var Mode = function (options) {
|
|
2445
2229
|
this.fragmentContext = options && options.fragmentContext;
|
|
2446
2230
|
this.HighlightRules = HtmlHighlightRules;
|
|
2447
2231
|
this.$behaviour = new XmlBehaviour();
|
|
2448
2232
|
this.$completer = new HtmlCompletions();
|
|
2449
|
-
|
|
2450
2233
|
this.createModeDelegates({
|
|
2451
2234
|
"js-": JavaScriptMode,
|
|
2452
2235
|
"css-": CssMode
|
|
2453
2236
|
});
|
|
2454
|
-
|
|
2455
2237
|
this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
|
|
2456
2238
|
};
|
|
2457
2239
|
oop.inherits(Mode, TextMode);
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
this.blockComment = {start: "<!--", end: "-->"};
|
|
2462
|
-
|
|
2240
|
+
(function () {
|
|
2241
|
+
this.blockComment = { start: "<!--", end: "-->" };
|
|
2463
2242
|
this.voidElements = lang.arrayToMap(voidElements);
|
|
2464
|
-
|
|
2465
|
-
this.getNextLineIndent = function(state, line, tab) {
|
|
2243
|
+
this.getNextLineIndent = function (state, line, tab) {
|
|
2466
2244
|
return this.$getIndent(line);
|
|
2467
2245
|
};
|
|
2468
|
-
|
|
2469
|
-
this.checkOutdent = function(state, line, input) {
|
|
2246
|
+
this.checkOutdent = function (state, line, input) {
|
|
2470
2247
|
return false;
|
|
2471
2248
|
};
|
|
2472
|
-
|
|
2473
|
-
this.getCompletions = function(state, session, pos, prefix) {
|
|
2249
|
+
this.getCompletions = function (state, session, pos, prefix) {
|
|
2474
2250
|
return this.$completer.getCompletions(state, session, pos, prefix);
|
|
2475
2251
|
};
|
|
2476
|
-
|
|
2477
|
-
this.createWorker = function(session) {
|
|
2252
|
+
this.createWorker = function (session) {
|
|
2478
2253
|
if (this.constructor != Mode)
|
|
2479
2254
|
return;
|
|
2480
2255
|
var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
|
|
2481
2256
|
worker.attachToDocument(session.getDocument());
|
|
2482
|
-
|
|
2483
2257
|
if (this.fragmentContext)
|
|
2484
|
-
worker.call("setOptions", [{context: this.fragmentContext}]);
|
|
2485
|
-
|
|
2486
|
-
worker.on("error", function(e) {
|
|
2258
|
+
worker.call("setOptions", [{ context: this.fragmentContext }]);
|
|
2259
|
+
worker.on("error", function (e) {
|
|
2487
2260
|
session.setAnnotations(e.data);
|
|
2488
2261
|
});
|
|
2489
|
-
|
|
2490
|
-
worker.on("terminate", function() {
|
|
2262
|
+
worker.on("terminate", function () {
|
|
2491
2263
|
session.clearAnnotations();
|
|
2492
2264
|
});
|
|
2493
|
-
|
|
2494
2265
|
return worker;
|
|
2495
2266
|
};
|
|
2496
|
-
|
|
2497
2267
|
this.$id = "ace/mode/html";
|
|
2498
2268
|
this.snippetFileId = "ace/snippets/html";
|
|
2499
2269
|
}).call(Mode.prototype);
|
|
2500
|
-
|
|
2501
2270
|
exports.Mode = Mode;
|
|
2502
|
-
});
|
|
2503
2271
|
|
|
2504
|
-
|
|
2505
|
-
"use strict";
|
|
2272
|
+
});
|
|
2506
2273
|
|
|
2274
|
+
ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
|
|
2507
2275
|
var oop = require("../lib/oop");
|
|
2508
2276
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
2509
|
-
|
|
2510
|
-
var
|
|
2511
|
-
|
|
2512
|
-
var keywords = (
|
|
2513
|
-
"break|do|else|elseif|end|for|function|if|in|local|repeat|"+
|
|
2514
|
-
"return|then|until|while|or|and|not"
|
|
2515
|
-
);
|
|
2516
|
-
|
|
2277
|
+
var LuaHighlightRules = function () {
|
|
2278
|
+
var keywords = ("break|do|else|elseif|end|for|function|if|in|local|repeat|" +
|
|
2279
|
+
"return|then|until|while|or|and|not");
|
|
2517
2280
|
var builtinConstants = ("true|false|nil|_G|_VERSION");
|
|
2518
|
-
|
|
2519
2281
|
var functions = (
|
|
2520
|
-
|
|
2521
|
-
"getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
|
|
2522
|
-
"collectgarbage|getmetatable|module|rawset|math|debug|"+
|
|
2523
|
-
"pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
|
|
2524
|
-
"pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
|
|
2525
|
-
"load|error|loadfile|"+
|
|
2526
|
-
|
|
2527
|
-
"
|
|
2528
|
-
"
|
|
2529
|
-
"
|
|
2530
|
-
"
|
|
2531
|
-
"
|
|
2532
|
-
"
|
|
2533
|
-
"
|
|
2534
|
-
"
|
|
2535
|
-
"
|
|
2536
|
-
"
|
|
2537
|
-
"
|
|
2538
|
-
"
|
|
2539
|
-
"
|
|
2540
|
-
"
|
|
2541
|
-
"__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"
|
|
2542
|
-
);
|
|
2543
|
-
|
|
2282
|
+
"string|xpcall|package|tostring|print|os|unpack|require|" +
|
|
2283
|
+
"getfenv|setmetatable|next|assert|tonumber|io|rawequal|" +
|
|
2284
|
+
"collectgarbage|getmetatable|module|rawset|math|debug|" +
|
|
2285
|
+
"pcall|table|newproxy|type|coroutine|_G|select|gcinfo|" +
|
|
2286
|
+
"pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|" +
|
|
2287
|
+
"load|error|loadfile|" +
|
|
2288
|
+
"sub|upper|len|gfind|rep|find|match|char|dump|gmatch|" +
|
|
2289
|
+
"reverse|byte|format|gsub|lower|preload|loadlib|loaded|" +
|
|
2290
|
+
"loaders|cpath|config|path|seeall|exit|setlocale|date|" +
|
|
2291
|
+
"getenv|difftime|remove|time|clock|tmpname|rename|execute|" +
|
|
2292
|
+
"lines|write|close|flush|open|output|type|read|stderr|" +
|
|
2293
|
+
"stdin|input|stdout|popen|tmpfile|log|max|acos|huge|" +
|
|
2294
|
+
"ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|" +
|
|
2295
|
+
"frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|" +
|
|
2296
|
+
"atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|" +
|
|
2297
|
+
"gethook|setmetatable|setlocal|traceback|setfenv|getinfo|" +
|
|
2298
|
+
"setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|" +
|
|
2299
|
+
"foreachi|maxn|foreach|concat|sort|remove|resume|yield|" +
|
|
2300
|
+
"status|wrap|create|running|" +
|
|
2301
|
+
"__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|" +
|
|
2302
|
+
"__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber");
|
|
2544
2303
|
var stdLibaries = ("string|package|os|io|math|debug|table|coroutine");
|
|
2545
|
-
|
|
2546
2304
|
var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
|
|
2547
|
-
|
|
2548
2305
|
var keywordMapper = this.createKeywordMapper({
|
|
2549
2306
|
"keyword": keywords,
|
|
2550
2307
|
"support.function": functions,
|
|
@@ -2553,136 +2310,122 @@ var LuaHighlightRules = function() {
|
|
|
2553
2310
|
"constant.language": builtinConstants,
|
|
2554
2311
|
"variable.language": "self"
|
|
2555
2312
|
}, "identifier");
|
|
2556
|
-
|
|
2557
2313
|
var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
|
|
2558
2314
|
var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
|
|
2559
2315
|
var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
|
|
2560
|
-
|
|
2561
2316
|
var fraction = "(?:\\.\\d+)";
|
|
2562
2317
|
var intPart = "(?:\\d+)";
|
|
2563
2318
|
var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
|
|
2564
2319
|
var floatNumber = "(?:" + pointFloat + ")";
|
|
2565
|
-
|
|
2566
2320
|
this.$rules = {
|
|
2567
|
-
"start"
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2321
|
+
"start": [{
|
|
2322
|
+
stateName: "bracketedComment",
|
|
2323
|
+
onMatch: function (value, currentState, stack) {
|
|
2324
|
+
stack.unshift(this.next, value.length - 2, currentState);
|
|
2325
|
+
return "comment";
|
|
2326
|
+
},
|
|
2327
|
+
regex: /\-\-\[=*\[/,
|
|
2328
|
+
next: [
|
|
2329
|
+
{
|
|
2330
|
+
onMatch: function (value, currentState, stack) {
|
|
2331
|
+
if (value.length == stack[1]) {
|
|
2332
|
+
stack.shift();
|
|
2333
|
+
stack.shift();
|
|
2334
|
+
this.next = stack.shift();
|
|
2335
|
+
}
|
|
2336
|
+
else {
|
|
2337
|
+
this.next = "";
|
|
2338
|
+
}
|
|
2339
|
+
return "comment";
|
|
2340
|
+
},
|
|
2341
|
+
regex: /\]=*\]/,
|
|
2342
|
+
next: "start"
|
|
2343
|
+
}, {
|
|
2344
|
+
defaultToken: "comment"
|
|
2345
|
+
}
|
|
2346
|
+
]
|
|
2572
2347
|
},
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
onMatch : function(value, currentState, stack) {
|
|
2577
|
-
if (value.length == stack[1]) {
|
|
2578
|
-
stack.shift();
|
|
2579
|
-
stack.shift();
|
|
2580
|
-
this.next = stack.shift();
|
|
2581
|
-
} else {
|
|
2582
|
-
this.next = "";
|
|
2583
|
-
}
|
|
2584
|
-
return "comment";
|
|
2585
|
-
},
|
|
2586
|
-
regex : /\]=*\]/,
|
|
2587
|
-
next : "start"
|
|
2588
|
-
}, {
|
|
2589
|
-
defaultToken : "comment"
|
|
2590
|
-
}
|
|
2591
|
-
]
|
|
2592
|
-
},
|
|
2593
|
-
|
|
2594
|
-
{
|
|
2595
|
-
token : "comment",
|
|
2596
|
-
regex : "\\-\\-.*$"
|
|
2597
|
-
},
|
|
2598
|
-
{
|
|
2599
|
-
stateName: "bracketedString",
|
|
2600
|
-
onMatch : function(value, currentState, stack){
|
|
2601
|
-
stack.unshift(this.next, value.length, currentState);
|
|
2602
|
-
return "string.start";
|
|
2348
|
+
{
|
|
2349
|
+
token: "comment",
|
|
2350
|
+
regex: "\\-\\-.*$"
|
|
2603
2351
|
},
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
{
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2352
|
+
{
|
|
2353
|
+
stateName: "bracketedString",
|
|
2354
|
+
onMatch: function (value, currentState, stack) {
|
|
2355
|
+
stack.unshift(this.next, value.length, currentState);
|
|
2356
|
+
return "string.start";
|
|
2357
|
+
},
|
|
2358
|
+
regex: /\[=*\[/,
|
|
2359
|
+
next: [
|
|
2360
|
+
{
|
|
2361
|
+
onMatch: function (value, currentState, stack) {
|
|
2362
|
+
if (value.length == stack[1]) {
|
|
2363
|
+
stack.shift();
|
|
2364
|
+
stack.shift();
|
|
2365
|
+
this.next = stack.shift();
|
|
2366
|
+
}
|
|
2367
|
+
else {
|
|
2368
|
+
this.next = "";
|
|
2369
|
+
}
|
|
2370
|
+
return "string.end";
|
|
2371
|
+
},
|
|
2372
|
+
regex: /\]=*\]/,
|
|
2373
|
+
next: "start"
|
|
2374
|
+
}, {
|
|
2375
|
+
defaultToken: "string"
|
|
2376
|
+
}
|
|
2377
|
+
]
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
token: "string",
|
|
2381
|
+
regex: '"(?:[^\\\\]|\\\\.)*?"'
|
|
2382
|
+
}, {
|
|
2383
|
+
token: "string",
|
|
2384
|
+
regex: "'(?:[^\\\\]|\\\\.)*?'"
|
|
2385
|
+
}, {
|
|
2386
|
+
token: "constant.numeric",
|
|
2387
|
+
regex: floatNumber
|
|
2388
|
+
}, {
|
|
2389
|
+
token: "constant.numeric",
|
|
2390
|
+
regex: integer + "\\b"
|
|
2391
|
+
}, {
|
|
2392
|
+
token: keywordMapper,
|
|
2393
|
+
regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
|
2394
|
+
}, {
|
|
2395
|
+
token: "keyword.operator",
|
|
2396
|
+
regex: "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
|
|
2397
|
+
}, {
|
|
2398
|
+
token: "paren.lparen",
|
|
2399
|
+
regex: "[\\[\\(\\{]"
|
|
2400
|
+
}, {
|
|
2401
|
+
token: "paren.rparen",
|
|
2402
|
+
regex: "[\\]\\)\\}]"
|
|
2403
|
+
}, {
|
|
2404
|
+
token: "text",
|
|
2405
|
+
regex: "\\s+|\\w+"
|
|
2406
|
+
}]
|
|
2653
2407
|
};
|
|
2654
|
-
|
|
2655
2408
|
this.normalizeRules();
|
|
2656
2409
|
};
|
|
2657
|
-
|
|
2658
2410
|
oop.inherits(LuaHighlightRules, TextHighlightRules);
|
|
2659
|
-
|
|
2660
2411
|
exports.LuaHighlightRules = LuaHighlightRules;
|
|
2661
|
-
});
|
|
2662
2412
|
|
|
2663
|
-
|
|
2664
|
-
"use strict";
|
|
2413
|
+
});
|
|
2665
2414
|
|
|
2415
|
+
ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict";
|
|
2666
2416
|
var oop = require("../../lib/oop");
|
|
2667
2417
|
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
2668
2418
|
var Range = require("../../range").Range;
|
|
2669
2419
|
var TokenIterator = require("../../token_iterator").TokenIterator;
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
var FoldMode = exports.FoldMode = function() {};
|
|
2673
|
-
|
|
2420
|
+
var FoldMode = exports.FoldMode = function () { };
|
|
2674
2421
|
oop.inherits(FoldMode, BaseFoldMode);
|
|
2675
|
-
|
|
2676
|
-
(function() {
|
|
2677
|
-
|
|
2422
|
+
(function () {
|
|
2678
2423
|
this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/;
|
|
2679
2424
|
this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/;
|
|
2680
|
-
|
|
2681
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
|
2425
|
+
this.getFoldWidget = function (session, foldStyle, row) {
|
|
2682
2426
|
var line = session.getLine(row);
|
|
2683
2427
|
var isStart = this.foldingStartMarker.test(line);
|
|
2684
2428
|
var isEnd = this.foldingStopMarker.test(line);
|
|
2685
|
-
|
|
2686
2429
|
if (isStart && !isEnd) {
|
|
2687
2430
|
var match = line.match(this.foldingStartMarker);
|
|
2688
2431
|
if (match[1] == "then" && /\belseif\b/.test(line))
|
|
@@ -2690,57 +2433,53 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|
|
2690
2433
|
if (match[1]) {
|
|
2691
2434
|
if (session.getTokenAt(row, match.index + 1).type === "keyword")
|
|
2692
2435
|
return "start";
|
|
2693
|
-
}
|
|
2436
|
+
}
|
|
2437
|
+
else if (match[2]) {
|
|
2694
2438
|
var type = session.bgTokenizer.getState(row) || "";
|
|
2695
2439
|
if (type[0] == "bracketedComment" || type[0] == "bracketedString")
|
|
2696
2440
|
return "start";
|
|
2697
|
-
}
|
|
2441
|
+
}
|
|
2442
|
+
else {
|
|
2698
2443
|
return "start";
|
|
2699
2444
|
}
|
|
2700
2445
|
}
|
|
2701
2446
|
if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd)
|
|
2702
2447
|
return "";
|
|
2703
|
-
|
|
2704
2448
|
var match = line.match(this.foldingStopMarker);
|
|
2705
2449
|
if (match[0] === "end") {
|
|
2706
2450
|
if (session.getTokenAt(row, match.index + 1).type === "keyword")
|
|
2707
2451
|
return "end";
|
|
2708
|
-
}
|
|
2452
|
+
}
|
|
2453
|
+
else if (match[0][0] === "]") {
|
|
2709
2454
|
var type = session.bgTokenizer.getState(row - 1) || "";
|
|
2710
2455
|
if (type[0] == "bracketedComment" || type[0] == "bracketedString")
|
|
2711
2456
|
return "end";
|
|
2712
|
-
}
|
|
2457
|
+
}
|
|
2458
|
+
else
|
|
2713
2459
|
return "end";
|
|
2714
2460
|
};
|
|
2715
|
-
|
|
2716
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
|
2461
|
+
this.getFoldWidgetRange = function (session, foldStyle, row) {
|
|
2717
2462
|
var line = session.doc.getLine(row);
|
|
2718
2463
|
var match = this.foldingStartMarker.exec(line);
|
|
2719
2464
|
if (match) {
|
|
2720
2465
|
if (match[1])
|
|
2721
2466
|
return this.luaBlock(session, row, match.index + 1);
|
|
2722
|
-
|
|
2723
2467
|
if (match[2])
|
|
2724
2468
|
return session.getCommentFoldRange(row, match.index + 1);
|
|
2725
|
-
|
|
2726
2469
|
return this.openingBracketBlock(session, "{", row, match.index);
|
|
2727
2470
|
}
|
|
2728
|
-
|
|
2729
2471
|
var match = this.foldingStopMarker.exec(line);
|
|
2730
2472
|
if (match) {
|
|
2731
2473
|
if (match[0] === "end") {
|
|
2732
2474
|
if (session.getTokenAt(row, match.index + 1).type === "keyword")
|
|
2733
2475
|
return this.luaBlock(session, row, match.index + 1);
|
|
2734
2476
|
}
|
|
2735
|
-
|
|
2736
2477
|
if (match[0][0] === "]")
|
|
2737
2478
|
return session.getCommentFoldRange(row, match.index + 1);
|
|
2738
|
-
|
|
2739
2479
|
return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
|
|
2740
2480
|
}
|
|
2741
2481
|
};
|
|
2742
|
-
|
|
2743
|
-
this.luaBlock = function(session, row, column, tokenRange) {
|
|
2482
|
+
this.luaBlock = function (session, row, column, tokenRange) {
|
|
2744
2483
|
var stream = new TokenIterator(session, row, column);
|
|
2745
2484
|
var indentKeywords = {
|
|
2746
2485
|
"function": 1,
|
|
@@ -2751,30 +2490,25 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|
|
2751
2490
|
"repeat": 1,
|
|
2752
2491
|
"until": -1
|
|
2753
2492
|
};
|
|
2754
|
-
|
|
2755
2493
|
var token = stream.getCurrentToken();
|
|
2756
2494
|
if (!token || token.type != "keyword")
|
|
2757
2495
|
return;
|
|
2758
|
-
|
|
2759
2496
|
var val = token.value;
|
|
2760
2497
|
var stack = [val];
|
|
2761
2498
|
var dir = indentKeywords[val];
|
|
2762
|
-
|
|
2763
2499
|
if (!dir)
|
|
2764
2500
|
return;
|
|
2765
|
-
|
|
2766
2501
|
var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
|
|
2767
2502
|
var startRow = row;
|
|
2768
|
-
|
|
2769
2503
|
stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
|
|
2770
|
-
while(token = stream.step()) {
|
|
2504
|
+
while (token = stream.step()) {
|
|
2771
2505
|
if (token.type !== "keyword")
|
|
2772
2506
|
continue;
|
|
2773
2507
|
var level = dir * indentKeywords[token.value];
|
|
2774
|
-
|
|
2775
2508
|
if (level > 0) {
|
|
2776
2509
|
stack.unshift(token.value);
|
|
2777
|
-
}
|
|
2510
|
+
}
|
|
2511
|
+
else if (level <= 0) {
|
|
2778
2512
|
stack.shift();
|
|
2779
2513
|
if (!stack.length && token.value != "elseif")
|
|
2780
2514
|
break;
|
|
@@ -2782,47 +2516,36 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|
|
2782
2516
|
stack.unshift(token.value);
|
|
2783
2517
|
}
|
|
2784
2518
|
}
|
|
2785
|
-
|
|
2786
2519
|
if (!token)
|
|
2787
2520
|
return null;
|
|
2788
|
-
|
|
2789
2521
|
if (tokenRange)
|
|
2790
2522
|
return stream.getCurrentTokenRange();
|
|
2791
|
-
|
|
2792
2523
|
var row = stream.getCurrentTokenRow();
|
|
2793
2524
|
if (dir === -1)
|
|
2794
2525
|
return new Range(row, session.getLine(row).length, startRow, startColumn);
|
|
2795
2526
|
else
|
|
2796
2527
|
return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
|
|
2797
2528
|
};
|
|
2798
|
-
|
|
2799
2529
|
}).call(FoldMode.prototype);
|
|
2800
2530
|
|
|
2801
2531
|
});
|
|
2802
2532
|
|
|
2803
|
-
ace.define("ace/mode/lua",[], function(require, exports, module)
|
|
2804
|
-
"use strict";
|
|
2805
|
-
|
|
2533
|
+
ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module){"use strict";
|
|
2806
2534
|
var oop = require("../lib/oop");
|
|
2807
2535
|
var TextMode = require("./text").Mode;
|
|
2808
2536
|
var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
|
|
2809
2537
|
var LuaFoldMode = require("./folding/lua").FoldMode;
|
|
2810
2538
|
var Range = require("../range").Range;
|
|
2811
2539
|
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
|
2812
|
-
|
|
2813
|
-
var Mode = function() {
|
|
2540
|
+
var Mode = function () {
|
|
2814
2541
|
this.HighlightRules = LuaHighlightRules;
|
|
2815
|
-
|
|
2816
2542
|
this.foldingRules = new LuaFoldMode();
|
|
2817
2543
|
this.$behaviour = this.$defaultBehaviour;
|
|
2818
2544
|
};
|
|
2819
2545
|
oop.inherits(Mode, TextMode);
|
|
2820
|
-
|
|
2821
|
-
(function() {
|
|
2822
|
-
|
|
2546
|
+
(function () {
|
|
2823
2547
|
this.lineCommentStart = "--";
|
|
2824
|
-
this.blockComment = {start: "--[", end: "]
|
|
2825
|
-
|
|
2548
|
+
this.blockComment = { start: "--[[", end: "--]]" };
|
|
2826
2549
|
var indentKeywords = {
|
|
2827
2550
|
"function": 1,
|
|
2828
2551
|
"then": 1,
|
|
@@ -2839,7 +2562,6 @@ oop.inherits(Mode, TextMode);
|
|
|
2839
2562
|
"end",
|
|
2840
2563
|
"until"
|
|
2841
2564
|
];
|
|
2842
|
-
|
|
2843
2565
|
function getNetIndentLevel(tokens) {
|
|
2844
2566
|
var level = 0;
|
|
2845
2567
|
for (var i = 0; i < tokens.length; i++) {
|
|
@@ -2848,115 +2570,101 @@ oop.inherits(Mode, TextMode);
|
|
|
2848
2570
|
if (token.value in indentKeywords) {
|
|
2849
2571
|
level += indentKeywords[token.value];
|
|
2850
2572
|
}
|
|
2851
|
-
}
|
|
2573
|
+
}
|
|
2574
|
+
else if (token.type == "paren.lparen") {
|
|
2852
2575
|
level += token.value.length;
|
|
2853
|
-
}
|
|
2576
|
+
}
|
|
2577
|
+
else if (token.type == "paren.rparen") {
|
|
2854
2578
|
level -= token.value.length;
|
|
2855
2579
|
}
|
|
2856
2580
|
}
|
|
2857
2581
|
if (level < 0) {
|
|
2858
2582
|
return -1;
|
|
2859
|
-
}
|
|
2583
|
+
}
|
|
2584
|
+
else if (level > 0) {
|
|
2860
2585
|
return 1;
|
|
2861
|
-
}
|
|
2586
|
+
}
|
|
2587
|
+
else {
|
|
2862
2588
|
return 0;
|
|
2863
2589
|
}
|
|
2864
2590
|
}
|
|
2865
|
-
|
|
2866
|
-
this.getNextLineIndent = function(state, line, tab) {
|
|
2591
|
+
this.getNextLineIndent = function (state, line, tab) {
|
|
2867
2592
|
var indent = this.$getIndent(line);
|
|
2868
2593
|
var level = 0;
|
|
2869
|
-
|
|
2870
2594
|
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
|
2871
2595
|
var tokens = tokenizedLine.tokens;
|
|
2872
|
-
|
|
2873
2596
|
if (state == "start") {
|
|
2874
2597
|
level = getNetIndentLevel(tokens);
|
|
2875
2598
|
}
|
|
2876
2599
|
if (level > 0) {
|
|
2877
2600
|
return indent + tab;
|
|
2878
|
-
}
|
|
2601
|
+
}
|
|
2602
|
+
else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
|
|
2879
2603
|
if (!this.checkOutdent(state, line, "\n")) {
|
|
2880
2604
|
return indent.substr(0, indent.length - tab.length);
|
|
2881
2605
|
}
|
|
2882
2606
|
}
|
|
2883
2607
|
return indent;
|
|
2884
2608
|
};
|
|
2885
|
-
|
|
2886
|
-
this.checkOutdent = function(state, line, input) {
|
|
2609
|
+
this.checkOutdent = function (state, line, input) {
|
|
2887
2610
|
if (input != "\n" && input != "\r" && input != "\r\n")
|
|
2888
2611
|
return false;
|
|
2889
|
-
|
|
2890
2612
|
if (line.match(/^\s*[\)\}\]]$/))
|
|
2891
2613
|
return true;
|
|
2892
|
-
|
|
2893
2614
|
var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
|
|
2894
|
-
|
|
2895
2615
|
if (!tokens || !tokens.length)
|
|
2896
2616
|
return false;
|
|
2897
|
-
|
|
2898
2617
|
return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
|
|
2899
2618
|
};
|
|
2900
|
-
|
|
2901
|
-
this.getMatching = function(session, row, column) {
|
|
2619
|
+
this.getMatching = function (session, row, column) {
|
|
2902
2620
|
if (row == undefined) {
|
|
2903
2621
|
var pos = session.selection.lead;
|
|
2904
2622
|
column = pos.column;
|
|
2905
2623
|
row = pos.row;
|
|
2906
2624
|
}
|
|
2907
|
-
|
|
2908
2625
|
var startToken = session.getTokenAt(row, column);
|
|
2909
2626
|
if (startToken && startToken.value in indentKeywords)
|
|
2910
2627
|
return this.foldingRules.luaBlock(session, row, column, true);
|
|
2911
2628
|
};
|
|
2912
|
-
|
|
2913
|
-
this.autoOutdent = function(state, session, row) {
|
|
2629
|
+
this.autoOutdent = function (state, session, row) {
|
|
2914
2630
|
var line = session.getLine(row);
|
|
2915
2631
|
var column = line.match(/^\s*/)[0].length;
|
|
2916
|
-
if (!column || !row)
|
|
2917
|
-
|
|
2632
|
+
if (!column || !row)
|
|
2633
|
+
return;
|
|
2918
2634
|
var startRange = this.getMatching(session, row, column + 1);
|
|
2919
2635
|
if (!startRange || startRange.start.row == row)
|
|
2920
|
-
|
|
2636
|
+
return;
|
|
2921
2637
|
var indent = this.$getIndent(session.getLine(startRange.start.row));
|
|
2922
2638
|
if (indent.length != column) {
|
|
2923
2639
|
session.replace(new Range(row, 0, row, column), indent);
|
|
2924
2640
|
session.outdentRows(new Range(row + 1, 0, row + 1, 0));
|
|
2925
2641
|
}
|
|
2926
2642
|
};
|
|
2927
|
-
|
|
2928
|
-
this.createWorker = function(session) {
|
|
2643
|
+
this.createWorker = function (session) {
|
|
2929
2644
|
var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
|
|
2930
2645
|
worker.attachToDocument(session.getDocument());
|
|
2931
|
-
|
|
2932
|
-
worker.on("annotate", function(e) {
|
|
2646
|
+
worker.on("annotate", function (e) {
|
|
2933
2647
|
session.setAnnotations(e.data);
|
|
2934
2648
|
});
|
|
2935
|
-
|
|
2936
|
-
worker.on("terminate", function() {
|
|
2649
|
+
worker.on("terminate", function () {
|
|
2937
2650
|
session.clearAnnotations();
|
|
2938
2651
|
});
|
|
2939
|
-
|
|
2940
2652
|
return worker;
|
|
2941
2653
|
};
|
|
2942
|
-
|
|
2943
2654
|
this.$id = "ace/mode/lua";
|
|
2944
2655
|
this.snippetFileId = "ace/snippets/lua";
|
|
2945
2656
|
}).call(Mode.prototype);
|
|
2946
|
-
|
|
2947
2657
|
exports.Mode = Mode;
|
|
2658
|
+
|
|
2948
2659
|
});
|
|
2949
2660
|
|
|
2950
|
-
ace.define("ace/mode/luapage_highlight_rules",[], function(require, exports, module)
|
|
2661
|
+
ace.define("ace/mode/luapage_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/lua_highlight_rules"], function(require, exports, module){// LuaPage implements the LuaPage markup as described by the Kepler Project's CGILua
|
|
2951
2662
|
"use strict";
|
|
2952
|
-
|
|
2953
2663
|
var oop = require("../lib/oop");
|
|
2954
2664
|
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
|
2955
2665
|
var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
|
|
2956
|
-
|
|
2957
|
-
var LuaPageHighlightRules = function() {
|
|
2666
|
+
var LuaPageHighlightRules = function () {
|
|
2958
2667
|
HtmlHighlightRules.call(this);
|
|
2959
|
-
|
|
2960
2668
|
var startRules = [
|
|
2961
2669
|
{
|
|
2962
2670
|
token: "keyword",
|
|
@@ -2968,7 +2676,6 @@ var LuaPageHighlightRules = function() {
|
|
|
2968
2676
|
push: "lua-start"
|
|
2969
2677
|
}
|
|
2970
2678
|
];
|
|
2971
|
-
|
|
2972
2679
|
var endRules = [
|
|
2973
2680
|
{
|
|
2974
2681
|
token: "keyword",
|
|
@@ -2980,44 +2687,34 @@ var LuaPageHighlightRules = function() {
|
|
|
2980
2687
|
next: "pop"
|
|
2981
2688
|
}
|
|
2982
2689
|
];
|
|
2983
|
-
|
|
2984
2690
|
this.embedRules(LuaHighlightRules, "lua-", endRules, ["start"]);
|
|
2985
|
-
|
|
2986
2691
|
for (var key in this.$rules)
|
|
2987
2692
|
this.$rules[key].unshift.apply(this.$rules[key], startRules);
|
|
2988
|
-
|
|
2989
2693
|
this.normalizeRules();
|
|
2990
2694
|
};
|
|
2991
|
-
|
|
2992
2695
|
oop.inherits(LuaPageHighlightRules, HtmlHighlightRules);
|
|
2993
|
-
|
|
2994
2696
|
exports.LuaPageHighlightRules = LuaPageHighlightRules;
|
|
2995
2697
|
|
|
2996
2698
|
});
|
|
2997
2699
|
|
|
2998
|
-
ace.define("ace/mode/luapage",[], function(require, exports, module)
|
|
2999
|
-
"use strict";
|
|
3000
|
-
|
|
2700
|
+
ace.define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"], function(require, exports, module){"use strict";
|
|
3001
2701
|
var oop = require("../lib/oop");
|
|
3002
2702
|
var HtmlMode = require("./html").Mode;
|
|
3003
2703
|
var LuaMode = require("./lua").Mode;
|
|
3004
2704
|
var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
|
|
3005
|
-
|
|
3006
|
-
var Mode = function() {
|
|
2705
|
+
var Mode = function () {
|
|
3007
2706
|
HtmlMode.call(this);
|
|
3008
|
-
|
|
3009
2707
|
this.HighlightRules = LuaPageHighlightRules;
|
|
3010
2708
|
this.createModeDelegates({
|
|
3011
2709
|
"lua-": LuaMode
|
|
3012
2710
|
});
|
|
3013
2711
|
};
|
|
3014
2712
|
oop.inherits(Mode, HtmlMode);
|
|
3015
|
-
|
|
3016
|
-
(function() {
|
|
2713
|
+
(function () {
|
|
3017
2714
|
this.$id = "ace/mode/luapage";
|
|
3018
2715
|
}).call(Mode.prototype);
|
|
3019
|
-
|
|
3020
2716
|
exports.Mode = Mode;
|
|
2717
|
+
|
|
3021
2718
|
}); (function() {
|
|
3022
2719
|
ace.require(["ace/mode/luapage"], function(m) {
|
|
3023
2720
|
if (typeof module == "object" && typeof exports == "object" && module) {
|