pygments.rb 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.rubocop.yml +7 -0
- data/CHANGELOG.adoc +4 -0
- data/README.adoc +1 -1
- data/bench.rb +1 -1
- data/lib/pygments/popen.rb +3 -7
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +2 -2
- data/test/test_pygments.rb +0 -19
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/AUTHORS +21 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/LICENSE +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/METADATA +19 -11
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +614 -0
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/WHEEL +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/entry_points.txt +0 -1
- data/vendor/pygments-main/bin/pygmentize +1 -1
- data/vendor/pygments-main/pygments/__init__.py +20 -22
- data/vendor/pygments-main/pygments/__main__.py +1 -1
- data/vendor/pygments-main/pygments/cmdline.py +74 -8
- data/vendor/pygments-main/pygments/console.py +1 -1
- data/vendor/pygments-main/pygments/filter.py +1 -1
- data/vendor/pygments-main/pygments/filters/__init__.py +6 -3
- data/vendor/pygments-main/pygments/formatter.py +41 -11
- data/vendor/pygments-main/pygments/formatters/__init__.py +21 -16
- data/vendor/pygments-main/pygments/formatters/_mapping.py +5 -65
- data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
- data/vendor/pygments-main/pygments/formatters/groff.py +170 -0
- data/vendor/pygments-main/pygments/formatters/html.py +54 -32
- data/vendor/pygments-main/pygments/formatters/img.py +9 -5
- data/vendor/pygments-main/pygments/formatters/irc.py +6 -33
- data/vendor/pygments-main/pygments/formatters/latex.py +24 -14
- data/vendor/pygments-main/pygments/formatters/other.py +1 -1
- data/vendor/pygments-main/pygments/formatters/pangomarkup.py +1 -1
- data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
- data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -3
- data/vendor/pygments-main/pygments/formatters/terminal256.py +2 -4
- data/vendor/pygments-main/pygments/lexer.py +101 -32
- data/vendor/pygments-main/pygments/lexers/__init__.py +50 -29
- data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +103 -0
- data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +2 -2
- data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +21 -6
- data/vendor/pygments-main/pygments/lexers/_css_builtins.py +558 -0
- data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +10 -0
- data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +4932 -0
- data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +11 -18
- data/vendor/pygments-main/pygments/lexers/_mapping.py +71 -82
- data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +58 -4
- data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_php_builtins.py +408 -1835
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +70 -8
- data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +666 -0
- data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1609 -0
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +9 -18
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +185 -94
- data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/actionscript.py +15 -14
- data/vendor/pygments-main/pygments/lexers/ada.py +144 -0
- data/vendor/pygments-main/pygments/lexers/agile.py +1 -1
- data/vendor/pygments-main/pygments/lexers/algebra.py +72 -9
- data/vendor/pygments-main/pygments/lexers/ambient.py +8 -7
- data/vendor/pygments-main/pygments/lexers/amdgpu.py +4 -3
- data/vendor/pygments-main/pygments/lexers/ampl.py +10 -8
- data/vendor/pygments-main/pygments/lexers/apdlexer.py +164 -20
- data/vendor/pygments-main/pygments/lexers/apl.py +6 -5
- data/vendor/pygments-main/pygments/lexers/archetype.py +23 -21
- data/vendor/pygments-main/pygments/lexers/arrow.py +10 -9
- data/vendor/pygments-main/pygments/lexers/arturo.py +250 -0
- data/vendor/pygments-main/pygments/lexers/asc.py +9 -5
- data/vendor/pygments-main/pygments/lexers/asm.py +68 -63
- data/vendor/pygments-main/pygments/lexers/automation.py +7 -5
- data/vendor/pygments-main/pygments/lexers/bare.py +20 -21
- data/vendor/pygments-main/pygments/lexers/basic.py +45 -41
- data/vendor/pygments-main/pygments/lexers/bdd.py +58 -0
- data/vendor/pygments-main/pygments/lexers/berry.py +99 -0
- data/vendor/pygments-main/pygments/lexers/bibtex.py +6 -6
- data/vendor/pygments-main/pygments/lexers/boa.py +4 -8
- data/vendor/pygments-main/pygments/lexers/business.py +18 -18
- data/vendor/pygments-main/pygments/lexers/c_cpp.py +80 -40
- data/vendor/pygments-main/pygments/lexers/c_like.py +21 -19
- data/vendor/pygments-main/pygments/lexers/capnproto.py +6 -8
- data/vendor/pygments-main/pygments/lexers/carbon.py +96 -0
- data/vendor/pygments-main/pygments/lexers/cddl.py +16 -33
- data/vendor/pygments-main/pygments/lexers/chapel.py +14 -9
- data/vendor/pygments-main/pygments/lexers/clean.py +3 -2
- data/vendor/pygments-main/pygments/lexers/comal.py +80 -0
- data/vendor/pygments-main/pygments/lexers/compiled.py +3 -2
- data/vendor/pygments-main/pygments/lexers/configs.py +235 -120
- data/vendor/pygments-main/pygments/lexers/console.py +5 -4
- data/vendor/pygments-main/pygments/lexers/cplint.py +44 -0
- data/vendor/pygments-main/pygments/lexers/crystal.py +22 -23
- data/vendor/pygments-main/pygments/lexers/csound.py +19 -17
- data/vendor/pygments-main/pygments/lexers/css.py +67 -159
- data/vendor/pygments-main/pygments/lexers/d.py +15 -12
- data/vendor/pygments-main/pygments/lexers/dalvik.py +14 -11
- data/vendor/pygments-main/pygments/lexers/data.py +119 -49
- data/vendor/pygments-main/pygments/lexers/dax.py +136 -0
- data/vendor/pygments-main/pygments/lexers/devicetree.py +9 -8
- data/vendor/pygments-main/pygments/lexers/diff.py +23 -19
- data/vendor/pygments-main/pygments/lexers/dotnet.py +216 -81
- data/vendor/pygments-main/pygments/lexers/dsls.py +86 -64
- data/vendor/pygments-main/pygments/lexers/dylan.py +16 -15
- data/vendor/pygments-main/pygments/lexers/ecl.py +46 -38
- data/vendor/pygments-main/pygments/lexers/eiffel.py +15 -10
- data/vendor/pygments-main/pygments/lexers/elm.py +12 -8
- data/vendor/pygments-main/pygments/lexers/elpi.py +165 -0
- data/vendor/pygments-main/pygments/lexers/email.py +21 -39
- data/vendor/pygments-main/pygments/lexers/erlang.py +21 -22
- data/vendor/pygments-main/pygments/lexers/esoteric.py +28 -30
- data/vendor/pygments-main/pygments/lexers/ezhil.py +10 -9
- data/vendor/pygments-main/pygments/lexers/factor.py +104 -83
- data/vendor/pygments-main/pygments/lexers/fantom.py +31 -29
- data/vendor/pygments-main/pygments/lexers/felix.py +18 -14
- data/vendor/pygments-main/pygments/lexers/fift.py +67 -0
- data/vendor/pygments-main/pygments/lexers/floscript.py +7 -7
- data/vendor/pygments-main/pygments/lexers/forth.py +8 -6
- data/vendor/pygments-main/pygments/lexers/fortran.py +16 -11
- data/vendor/pygments-main/pygments/lexers/foxpro.py +2 -2
- data/vendor/pygments-main/pygments/lexers/freefem.py +7 -10
- data/vendor/pygments-main/pygments/lexers/func.py +108 -0
- data/vendor/pygments-main/pygments/lexers/functional.py +1 -1
- data/vendor/pygments-main/pygments/lexers/futhark.py +12 -17
- data/vendor/pygments-main/pygments/lexers/gcodelexer.py +1 -2
- data/vendor/pygments-main/pygments/lexers/gdscript.py +76 -233
- data/vendor/pygments-main/pygments/lexers/go.py +12 -14
- data/vendor/pygments-main/pygments/lexers/grammar_notation.py +22 -26
- data/vendor/pygments-main/pygments/lexers/graph.py +36 -15
- data/vendor/pygments-main/pygments/lexers/graphics.py +37 -38
- data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -1
- data/vendor/pygments-main/pygments/lexers/gsql.py +39 -27
- data/vendor/pygments-main/pygments/lexers/haskell.py +73 -71
- data/vendor/pygments-main/pygments/lexers/haxe.py +13 -11
- data/vendor/pygments-main/pygments/lexers/hdl.py +31 -34
- data/vendor/pygments-main/pygments/lexers/hexdump.py +21 -21
- data/vendor/pygments-main/pygments/lexers/html.py +11 -19
- data/vendor/pygments-main/pygments/lexers/idl.py +10 -5
- data/vendor/pygments-main/pygments/lexers/igor.py +3 -2
- data/vendor/pygments-main/pygments/lexers/inferno.py +9 -8
- data/vendor/pygments-main/pygments/lexers/installers.py +39 -33
- data/vendor/pygments-main/pygments/lexers/int_fiction.py +35 -20
- data/vendor/pygments-main/pygments/lexers/iolang.py +9 -9
- data/vendor/pygments-main/pygments/lexers/j.py +20 -13
- data/vendor/pygments-main/pygments/lexers/javascript.py +183 -149
- data/vendor/pygments-main/pygments/lexers/jmespath.py +68 -0
- data/vendor/pygments-main/pygments/lexers/jslt.py +4 -3
- data/vendor/pygments-main/pygments/lexers/jsonnet.py +168 -0
- data/vendor/pygments-main/pygments/lexers/julia.py +44 -32
- data/vendor/pygments-main/pygments/lexers/jvm.py +161 -140
- data/vendor/pygments-main/pygments/lexers/kuin.py +93 -59
- data/vendor/pygments-main/pygments/lexers/lilypond.py +226 -0
- data/vendor/pygments-main/pygments/lexers/lisp.py +244 -107
- data/vendor/pygments-main/pygments/lexers/macaulay2.py +1739 -0
- data/vendor/pygments-main/pygments/lexers/make.py +21 -16
- data/vendor/pygments-main/pygments/lexers/markup.py +752 -11
- data/vendor/pygments-main/pygments/lexers/math.py +1 -1
- data/vendor/pygments-main/pygments/lexers/matlab.py +18 -3
- data/vendor/pygments-main/pygments/lexers/maxima.py +85 -0
- data/vendor/pygments-main/pygments/lexers/meson.py +10 -25
- data/vendor/pygments-main/pygments/lexers/mime.py +2 -2
- data/vendor/pygments-main/pygments/lexers/minecraft.py +394 -0
- data/vendor/pygments-main/pygments/lexers/mips.py +128 -0
- data/vendor/pygments-main/pygments/lexers/ml.py +9 -6
- data/vendor/pygments-main/pygments/lexers/modeling.py +12 -8
- data/vendor/pygments-main/pygments/lexers/modula2.py +3 -2
- data/vendor/pygments-main/pygments/lexers/monte.py +3 -2
- data/vendor/pygments-main/pygments/lexers/mosel.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ncl.py +1 -1
- data/vendor/pygments-main/pygments/lexers/nimrod.py +62 -20
- data/vendor/pygments-main/pygments/lexers/nit.py +3 -2
- data/vendor/pygments-main/pygments/lexers/nix.py +5 -5
- data/vendor/pygments-main/pygments/lexers/oberon.py +2 -2
- data/vendor/pygments-main/pygments/lexers/objective.py +6 -4
- data/vendor/pygments-main/pygments/lexers/ooc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/other.py +1 -1
- data/vendor/pygments-main/pygments/lexers/parasail.py +3 -2
- data/vendor/pygments-main/pygments/lexers/parsers.py +23 -21
- data/vendor/pygments-main/pygments/lexers/pascal.py +196 -198
- data/vendor/pygments-main/pygments/lexers/pawn.py +1 -1
- data/vendor/pygments-main/pygments/lexers/perl.py +17 -15
- data/vendor/pygments-main/pygments/lexers/phix.py +364 -0
- data/vendor/pygments-main/pygments/lexers/php.py +35 -20
- data/vendor/pygments-main/pygments/lexers/pointless.py +3 -2
- data/vendor/pygments-main/pygments/lexers/pony.py +1 -1
- data/vendor/pygments-main/pygments/lexers/praat.py +41 -38
- data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
- data/vendor/pygments-main/pygments/lexers/prolog.py +7 -8
- data/vendor/pygments-main/pygments/lexers/promql.py +5 -12
- data/vendor/pygments-main/pygments/lexers/python.py +145 -119
- data/vendor/pygments-main/pygments/lexers/q.py +188 -0
- data/vendor/pygments-main/pygments/lexers/qlik.py +117 -0
- data/vendor/pygments-main/pygments/lexers/qvt.py +1 -1
- data/vendor/pygments-main/pygments/lexers/r.py +4 -4
- data/vendor/pygments-main/pygments/lexers/rdf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/rebol.py +1 -12
- data/vendor/pygments-main/pygments/lexers/resource.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ride.py +3 -2
- data/vendor/pygments-main/pygments/lexers/rita.py +43 -0
- data/vendor/pygments-main/pygments/lexers/rnc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/roboconf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/robotframework.py +6 -5
- data/vendor/pygments-main/pygments/lexers/ruby.py +24 -24
- data/vendor/pygments-main/pygments/lexers/rust.py +3 -2
- data/vendor/pygments-main/pygments/lexers/sas.py +2 -2
- data/vendor/pygments-main/pygments/lexers/savi.py +170 -0
- data/vendor/pygments-main/pygments/lexers/scdoc.py +4 -7
- data/vendor/pygments-main/pygments/lexers/scripting.py +24 -21
- data/vendor/pygments-main/pygments/lexers/sgf.py +6 -6
- data/vendor/pygments-main/pygments/lexers/shell.py +29 -21
- data/vendor/pygments-main/pygments/lexers/sieve.py +14 -4
- data/vendor/pygments-main/pygments/lexers/slash.py +1 -1
- data/vendor/pygments-main/pygments/lexers/smalltalk.py +5 -3
- data/vendor/pygments-main/pygments/lexers/smithy.py +5 -6
- data/vendor/pygments-main/pygments/lexers/smv.py +1 -1
- data/vendor/pygments-main/pygments/lexers/snobol.py +1 -1
- data/vendor/pygments-main/pygments/lexers/solidity.py +3 -7
- data/vendor/pygments-main/pygments/lexers/sophia.py +103 -0
- data/vendor/pygments-main/pygments/lexers/special.py +2 -5
- data/vendor/pygments-main/pygments/lexers/spice.py +71 -0
- data/vendor/pygments-main/pygments/lexers/sql.py +212 -17
- data/vendor/pygments-main/pygments/lexers/srcinfo.py +62 -0
- data/vendor/pygments-main/pygments/lexers/stata.py +4 -3
- data/vendor/pygments-main/pygments/lexers/supercollider.py +4 -3
- data/vendor/pygments-main/pygments/lexers/tal.py +74 -0
- data/vendor/pygments-main/pygments/lexers/tcl.py +21 -16
- data/vendor/pygments-main/pygments/lexers/teal.py +9 -8
- data/vendor/pygments-main/pygments/lexers/templates.py +62 -29
- data/vendor/pygments-main/pygments/lexers/teraterm.py +12 -20
- data/vendor/pygments-main/pygments/lexers/testing.py +6 -2
- data/vendor/pygments-main/pygments/lexers/text.py +3 -2
- data/vendor/pygments-main/pygments/lexers/textedit.py +41 -7
- data/vendor/pygments-main/pygments/lexers/textfmts.py +7 -5
- data/vendor/pygments-main/pygments/lexers/theorem.py +42 -36
- data/vendor/pygments-main/pygments/lexers/thingsdb.py +2 -4
- data/vendor/pygments-main/pygments/lexers/tlb.py +57 -0
- data/vendor/pygments-main/pygments/lexers/tnt.py +3 -4
- data/vendor/pygments-main/pygments/lexers/trafficscript.py +2 -4
- data/vendor/pygments-main/pygments/lexers/typoscript.py +2 -3
- data/vendor/pygments-main/pygments/lexers/ul4.py +267 -0
- data/vendor/pygments-main/pygments/lexers/unicon.py +1 -1
- data/vendor/pygments-main/pygments/lexers/urbi.py +4 -4
- data/vendor/pygments-main/pygments/lexers/usd.py +2 -1
- data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
- data/vendor/pygments-main/pygments/lexers/verification.py +4 -3
- data/vendor/pygments-main/pygments/lexers/web.py +1 -1
- data/vendor/pygments-main/pygments/lexers/webassembly.py +5 -5
- data/vendor/pygments-main/pygments/lexers/webidl.py +2 -1
- data/vendor/pygments-main/pygments/lexers/webmisc.py +90 -71
- data/vendor/pygments-main/pygments/lexers/wgsl.py +407 -0
- data/vendor/pygments-main/pygments/lexers/whiley.py +2 -1
- data/vendor/pygments-main/pygments/lexers/wowtoc.py +120 -0
- data/vendor/pygments-main/pygments/lexers/wren.py +99 -0
- data/vendor/pygments-main/pygments/lexers/x10.py +5 -6
- data/vendor/pygments-main/pygments/lexers/xorg.py +3 -2
- data/vendor/pygments-main/pygments/lexers/yang.py +6 -5
- data/vendor/pygments-main/pygments/lexers/zig.py +3 -2
- data/vendor/pygments-main/pygments/modeline.py +1 -1
- data/vendor/pygments-main/pygments/plugin.py +28 -9
- data/vendor/pygments-main/pygments/regexopt.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +2 -2
- data/vendor/pygments-main/pygments/sphinxext.py +63 -1
- data/vendor/pygments-main/pygments/style.py +7 -1
- data/vendor/pygments-main/pygments/styles/__init__.py +19 -5
- data/vendor/pygments-main/pygments/styles/abap.py +2 -2
- data/vendor/pygments-main/pygments/styles/algol.py +1 -2
- data/vendor/pygments-main/pygments/styles/algol_nu.py +1 -2
- data/vendor/pygments-main/pygments/styles/arduino.py +2 -3
- data/vendor/pygments-main/pygments/styles/autumn.py +1 -3
- data/vendor/pygments-main/pygments/styles/borland.py +1 -3
- data/vendor/pygments-main/pygments/styles/bw.py +1 -2
- data/vendor/pygments-main/pygments/styles/colorful.py +1 -3
- data/vendor/pygments-main/pygments/styles/default.py +13 -14
- data/vendor/pygments-main/pygments/styles/dracula.py +102 -0
- data/vendor/pygments-main/pygments/styles/emacs.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +75 -0
- data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
- data/vendor/pygments-main/pygments/styles/gh_dark.py +107 -0
- data/vendor/pygments-main/pygments/styles/gruvbox.py +4 -2
- data/vendor/pygments-main/pygments/styles/igor.py +1 -2
- data/vendor/pygments-main/pygments/styles/inkpot.py +3 -2
- data/vendor/pygments-main/pygments/styles/lilypond.py +56 -0
- data/vendor/pygments-main/pygments/styles/lovelace.py +1 -3
- data/vendor/pygments-main/pygments/styles/manni.py +1 -1
- data/vendor/pygments-main/pygments/styles/material.py +1 -2
- data/vendor/pygments-main/pygments/styles/monokai.py +3 -3
- data/vendor/pygments-main/pygments/styles/murphy.py +1 -3
- data/vendor/pygments-main/pygments/styles/native.py +11 -11
- data/vendor/pygments-main/pygments/styles/nord.py +150 -0
- data/vendor/pygments-main/pygments/styles/onedark.py +59 -0
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -6
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -6
- data/vendor/pygments-main/pygments/styles/pastie.py +1 -3
- data/vendor/pygments-main/pygments/styles/perldoc.py +1 -2
- data/vendor/pygments-main/pygments/styles/rainbow_dash.py +3 -3
- data/vendor/pygments-main/pygments/styles/rrt.py +3 -2
- data/vendor/pygments-main/pygments/styles/sas.py +2 -4
- data/vendor/pygments-main/pygments/styles/solarized.py +1 -1
- data/vendor/pygments-main/pygments/styles/staroffice.py +26 -0
- data/vendor/pygments-main/pygments/styles/stata_dark.py +4 -6
- data/vendor/pygments-main/pygments/styles/stata_light.py +1 -2
- data/vendor/pygments-main/pygments/styles/tango.py +2 -3
- data/vendor/pygments-main/pygments/styles/trac.py +1 -3
- data/vendor/pygments-main/pygments/styles/vim.py +1 -2
- data/vendor/pygments-main/pygments/styles/vs.py +1 -2
- data/vendor/pygments-main/pygments/styles/xcode.py +1 -3
- data/vendor/pygments-main/pygments/styles/zenburn.py +4 -6
- data/vendor/pygments-main/pygments/token.py +2 -1
- data/vendor/pygments-main/pygments/unistring.py +4 -6
- data/vendor/pygments-main/pygments/util.py +27 -5
- metadata +59 -14
- data/vendor/pygments-main/Pygments-2.10.0.dist-info/RECORD +0 -524
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/INSTALLER +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/REQUESTED +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/top_level.txt +0 -0
@@ -4,14 +4,14 @@
|
|
4
4
|
|
5
5
|
Lexers for Varnish configuration
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
from pygments.lexer import RegexLexer, include, bygroups, using, this, \
|
12
12
|
inherit, words
|
13
13
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
14
|
-
Number, Punctuation, Literal
|
14
|
+
Number, Punctuation, Literal, Whitespace
|
15
15
|
|
16
16
|
__all__ = ['VCLLexer', 'VCLSnippetLexer']
|
17
17
|
|
@@ -144,15 +144,15 @@ class VCLLexer(RegexLexer):
|
|
144
144
|
'whitespace': [
|
145
145
|
(r'L?"', String, 'string'),
|
146
146
|
(r'\{"', String, 'multistring'),
|
147
|
-
(r'\n',
|
148
|
-
(r'\s+',
|
147
|
+
(r'\n', Whitespace),
|
148
|
+
(r'\s+', Whitespace),
|
149
149
|
(r'\\\n', Text), # line continuation
|
150
150
|
],
|
151
151
|
'root': [
|
152
152
|
include('whitespace'),
|
153
153
|
include('comments'),
|
154
154
|
include('statements'),
|
155
|
-
(r'\s+',
|
155
|
+
(r'\s+', Whitespace),
|
156
156
|
],
|
157
157
|
}
|
158
158
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for Intermediate Verification Languages (IVLs).
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -17,11 +17,12 @@ __all__ = ['BoogieLexer', 'SilverLexer']
|
|
17
17
|
|
18
18
|
class BoogieLexer(RegexLexer):
|
19
19
|
"""
|
20
|
-
For
|
20
|
+
For Boogie source code.
|
21
21
|
|
22
22
|
.. versionadded:: 2.1
|
23
23
|
"""
|
24
24
|
name = 'Boogie'
|
25
|
+
url = 'https://boogie-docs.readthedocs.io/en/latest/'
|
25
26
|
aliases = ['boogie']
|
26
27
|
filenames = ['*.bpl']
|
27
28
|
|
@@ -64,7 +65,7 @@ class BoogieLexer(RegexLexer):
|
|
64
65
|
|
65
66
|
class SilverLexer(RegexLexer):
|
66
67
|
"""
|
67
|
-
For
|
68
|
+
For Silver source code.
|
68
69
|
|
69
70
|
.. versionadded:: 2.2
|
70
71
|
"""
|
@@ -1,7 +1,6 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
"""
|
3
2
|
pygments.lexers.webassembly
|
4
|
-
|
3
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
5
4
|
|
6
5
|
Lexers for the WebAssembly text format.
|
7
6
|
|
@@ -9,12 +8,12 @@
|
|
9
8
|
and https://webassembly.github.io/spec/core/text/.
|
10
9
|
|
11
10
|
|
12
|
-
:copyright: Copyright 2006-
|
11
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
13
12
|
:license: BSD, see LICENSE for details.
|
14
13
|
"""
|
15
14
|
|
16
15
|
from pygments.lexer import RegexLexer, words, bygroups, default
|
17
|
-
from pygments.token import Text, Comment, Operator, Keyword, String, Number, Punctuation,
|
16
|
+
from pygments.token import Text, Comment, Operator, Keyword, String, Number, Punctuation, Name
|
18
17
|
|
19
18
|
__all__ = ['WatLexer']
|
20
19
|
|
@@ -63,12 +62,13 @@ builtins = (
|
|
63
62
|
|
64
63
|
|
65
64
|
class WatLexer(RegexLexer):
|
66
|
-
"""Lexer for the
|
65
|
+
"""Lexer for the WebAssembly text format.
|
67
66
|
|
68
67
|
.. versionadded:: 2.9
|
69
68
|
"""
|
70
69
|
|
71
70
|
name = 'WebAssembly'
|
71
|
+
url = 'https://webassembly.org/'
|
72
72
|
aliases = ['wast', 'wat']
|
73
73
|
filenames = ['*.wat', '*.wast']
|
74
74
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for Web IDL, including some extensions.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -44,6 +44,7 @@ class WebIDLLexer(RegexLexer):
|
|
44
44
|
"""
|
45
45
|
|
46
46
|
name = 'Web IDL'
|
47
|
+
url = 'https://www.w3.org/wiki/Web_IDL'
|
47
48
|
aliases = ['webidl']
|
48
49
|
filenames = ['*.webidl']
|
49
50
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for misc. web stuff.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -13,7 +13,7 @@ import re
|
|
13
13
|
from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, \
|
14
14
|
default, using
|
15
15
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
16
|
-
Number, Punctuation, Literal
|
16
|
+
Number, Punctuation, Literal, Whitespace
|
17
17
|
|
18
18
|
from pygments.lexers.css import _indentation, _starts_block
|
19
19
|
from pygments.lexers.html import HtmlLexer
|
@@ -26,13 +26,12 @@ __all__ = ['DuelLexer', 'SlimLexer', 'XQueryLexer', 'QmlLexer', 'CirruLexer']
|
|
26
26
|
class DuelLexer(RegexLexer):
|
27
27
|
"""
|
28
28
|
Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks.
|
29
|
-
See http://duelengine.org/.
|
30
|
-
See http://jsonml.org/jbst/.
|
31
29
|
|
32
30
|
.. versionadded:: 1.4
|
33
31
|
"""
|
34
32
|
|
35
33
|
name = 'Duel'
|
34
|
+
url = 'http://duelengine.org/'
|
36
35
|
aliases = ['duel', 'jbst', 'jsonml+bst']
|
37
36
|
filenames = ['*.duel', '*.jbst']
|
38
37
|
mimetypes = ['text/x-duel', 'text/x-jbst']
|
@@ -64,6 +63,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
64
63
|
.. versionadded:: 1.4
|
65
64
|
"""
|
66
65
|
name = 'XQuery'
|
66
|
+
url = 'https://www.w3.org/XML/Query/'
|
67
67
|
aliases = ['xquery', 'xqy', 'xq', 'xql', 'xqm']
|
68
68
|
filenames = ['*.xqy', '*.xquery', '*.xq', '*.xql', '*.xqm']
|
69
69
|
mimetypes = ['text/xquery', 'application/xquery']
|
@@ -111,7 +111,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
111
111
|
# aposattrcontentchar
|
112
112
|
# x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
|
113
113
|
|
114
|
-
flags = re.DOTALL | re.MULTILINE
|
114
|
+
flags = re.DOTALL | re.MULTILINE
|
115
115
|
|
116
116
|
def punctuation_root_callback(lexer, match, ctx):
|
117
117
|
yield match.start(), Punctuation, match.group(1)
|
@@ -187,7 +187,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
187
187
|
|
188
188
|
def pushstate_operator_order_callback(lexer, match, ctx):
|
189
189
|
yield match.start(), Keyword, match.group(1)
|
190
|
-
yield match.start(),
|
190
|
+
yield match.start(), Whitespace, match.group(2)
|
191
191
|
yield match.start(), Punctuation, match.group(3)
|
192
192
|
ctx.stack = ['root']
|
193
193
|
lexer.xquery_parse_state.append('operator')
|
@@ -195,7 +195,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
195
195
|
|
196
196
|
def pushstate_operator_map_callback(lexer, match, ctx):
|
197
197
|
yield match.start(), Keyword, match.group(1)
|
198
|
-
yield match.start(),
|
198
|
+
yield match.start(), Whitespace, match.group(2)
|
199
199
|
yield match.start(), Punctuation, match.group(3)
|
200
200
|
ctx.stack = ['root']
|
201
201
|
lexer.xquery_parse_state.append('operator')
|
@@ -203,7 +203,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
203
203
|
|
204
204
|
def pushstate_operator_root_validate(lexer, match, ctx):
|
205
205
|
yield match.start(), Keyword, match.group(1)
|
206
|
-
yield match.start(),
|
206
|
+
yield match.start(), Whitespace, match.group(2)
|
207
207
|
yield match.start(), Punctuation, match.group(3)
|
208
208
|
ctx.stack = ['root']
|
209
209
|
lexer.xquery_parse_state.append('operator')
|
@@ -211,7 +211,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
211
211
|
|
212
212
|
def pushstate_operator_root_validate_withmode(lexer, match, ctx):
|
213
213
|
yield match.start(), Keyword, match.group(1)
|
214
|
-
yield match.start(),
|
214
|
+
yield match.start(), Whitespace, match.group(2)
|
215
215
|
yield match.start(), Keyword, match.group(3)
|
216
216
|
ctx.stack = ['root']
|
217
217
|
lexer.xquery_parse_state.append('operator')
|
@@ -255,7 +255,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
255
255
|
|
256
256
|
def pushstate_kindtest_callback(lexer, match, ctx):
|
257
257
|
yield match.start(), Keyword, match.group(1)
|
258
|
-
yield match.start(),
|
258
|
+
yield match.start(), Whitespace, match.group(2)
|
259
259
|
yield match.start(), Punctuation, match.group(3)
|
260
260
|
lexer.xquery_parse_state.append('kindtest')
|
261
261
|
ctx.stack.append('kindtest')
|
@@ -263,7 +263,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
263
263
|
|
264
264
|
def pushstate_operator_kindtestforpi_callback(lexer, match, ctx):
|
265
265
|
yield match.start(), Keyword, match.group(1)
|
266
|
-
yield match.start(),
|
266
|
+
yield match.start(), Whitespace, match.group(2)
|
267
267
|
yield match.start(), Punctuation, match.group(3)
|
268
268
|
lexer.xquery_parse_state.append('operator')
|
269
269
|
ctx.stack.append('kindtestforpi')
|
@@ -271,7 +271,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
271
271
|
|
272
272
|
def pushstate_operator_kindtest_callback(lexer, match, ctx):
|
273
273
|
yield match.start(), Keyword, match.group(1)
|
274
|
-
yield match.start(),
|
274
|
+
yield match.start(), Whitespace, match.group(2)
|
275
275
|
yield match.start(), Punctuation, match.group(3)
|
276
276
|
lexer.xquery_parse_state.append('operator')
|
277
277
|
ctx.stack.append('kindtest')
|
@@ -279,7 +279,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
279
279
|
|
280
280
|
def pushstate_occurrenceindicator_kindtest_callback(lexer, match, ctx):
|
281
281
|
yield match.start(), Name.Tag, match.group(1)
|
282
|
-
yield match.start(),
|
282
|
+
yield match.start(), Whitespace, match.group(2)
|
283
283
|
yield match.start(), Punctuation, match.group(3)
|
284
284
|
lexer.xquery_parse_state.append('occurrenceindicator')
|
285
285
|
ctx.stack.append('kindtest')
|
@@ -299,7 +299,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
299
299
|
|
300
300
|
def pushstate_operator_root_construct_callback(lexer, match, ctx):
|
301
301
|
yield match.start(), Keyword, match.group(1)
|
302
|
-
yield match.start(),
|
302
|
+
yield match.start(), Whitespace, match.group(2)
|
303
303
|
yield match.start(), Punctuation, match.group(3)
|
304
304
|
lexer.xquery_parse_state.append('operator')
|
305
305
|
ctx.stack = ['root']
|
@@ -317,23 +317,16 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
317
317
|
ctx.stack.append('operator')
|
318
318
|
ctx.pos = match.end()
|
319
319
|
|
320
|
-
def pushstate_operator_callback(lexer, match, ctx):
|
321
|
-
yield match.start(), Keyword, match.group(1)
|
322
|
-
yield match.start(), Text, match.group(2)
|
323
|
-
yield match.start(), Punctuation, match.group(3)
|
324
|
-
lexer.xquery_parse_state.append('operator')
|
325
|
-
ctx.pos = match.end()
|
326
|
-
|
327
320
|
tokens = {
|
328
321
|
'comment': [
|
329
322
|
# xquery comments
|
330
|
-
(r'(
|
331
|
-
(r'
|
332
|
-
(r'
|
333
|
-
(r'(
|
323
|
+
(r'[^:()]+', Comment),
|
324
|
+
(r'\(:', Comment, '#push'),
|
325
|
+
(r':\)', Comment, '#pop'),
|
326
|
+
(r'[:()]', Comment),
|
334
327
|
],
|
335
328
|
'whitespace': [
|
336
|
-
(r'\s+',
|
329
|
+
(r'\s+', Whitespace),
|
337
330
|
],
|
338
331
|
'operator': [
|
339
332
|
include('whitespace'),
|
@@ -355,32 +348,36 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
355
348
|
(r'(::|:|;|\[|//|/|,)',
|
356
349
|
punctuation_root_callback),
|
357
350
|
(r'(castable|cast)(\s+)(as)\b',
|
358
|
-
bygroups(Keyword,
|
351
|
+
bygroups(Keyword, Whitespace, Keyword), 'singletype'),
|
359
352
|
(r'(instance)(\s+)(of)\b',
|
360
|
-
bygroups(Keyword,
|
353
|
+
bygroups(Keyword, Whitespace, Keyword), 'itemtype'),
|
361
354
|
(r'(treat)(\s+)(as)\b',
|
362
|
-
bygroups(Keyword,
|
355
|
+
bygroups(Keyword, Whitespace, Keyword), 'itemtype'),
|
363
356
|
(r'(case)(\s+)(' + stringdouble + ')',
|
364
|
-
bygroups(Keyword,
|
357
|
+
bygroups(Keyword, Whitespace, String.Double), 'itemtype'),
|
365
358
|
(r'(case)(\s+)(' + stringsingle + ')',
|
366
|
-
bygroups(Keyword,
|
359
|
+
bygroups(Keyword, Whitespace, String.Single), 'itemtype'),
|
367
360
|
(r'(case|as)\b', Keyword, 'itemtype'),
|
368
361
|
(r'(\))(\s*)(as)',
|
369
|
-
bygroups(Punctuation,
|
362
|
+
bygroups(Punctuation, Whitespace, Keyword), 'itemtype'),
|
370
363
|
(r'\$', Name.Variable, 'varname'),
|
371
364
|
(r'(for|let|previous|next)(\s+)(\$)',
|
372
|
-
bygroups(Keyword,
|
365
|
+
bygroups(Keyword, Whitespace, Name.Variable), 'varname'),
|
373
366
|
(r'(for)(\s+)(tumbling|sliding)(\s+)(window)(\s+)(\$)',
|
374
|
-
bygroups(Keyword,
|
367
|
+
bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword,
|
368
|
+
Whitespace, Name.Variable),
|
375
369
|
'varname'),
|
376
370
|
# (r'\)|\?|\]', Punctuation, '#push'),
|
377
371
|
(r'\)|\?|\]', Punctuation),
|
378
|
-
(r'(empty)(\s+)(greatest|least)',
|
372
|
+
(r'(empty)(\s+)(greatest|least)',
|
373
|
+
bygroups(Keyword, Whitespace, Keyword)),
|
379
374
|
(r'ascending|descending|default', Keyword, '#push'),
|
380
|
-
(r'(allowing)(\s+)(empty)',
|
375
|
+
(r'(allowing)(\s+)(empty)',
|
376
|
+
bygroups(Keyword, Whitespace, Keyword)),
|
381
377
|
(r'external', Keyword),
|
382
378
|
(r'(start|when|end)', Keyword, 'root'),
|
383
|
-
(r'(only)(\s+)(end)', bygroups(Keyword,
|
379
|
+
(r'(only)(\s+)(end)', bygroups(Keyword, Whitespace, Keyword),
|
380
|
+
'root'),
|
384
381
|
(r'collation', Keyword, 'uritooperator'),
|
385
382
|
|
386
383
|
# eXist specific XQUF
|
@@ -393,7 +390,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
393
390
|
(stringdouble, String.Double),
|
394
391
|
(stringsingle, String.Single),
|
395
392
|
|
396
|
-
(r'(catch)(\s*)', bygroups(Keyword,
|
393
|
+
(r'(catch)(\s*)', bygroups(Keyword, Whitespace), 'root'),
|
397
394
|
],
|
398
395
|
'uritooperator': [
|
399
396
|
(stringdouble, String.Double, '#pop'),
|
@@ -402,8 +399,10 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
402
399
|
'namespacedecl': [
|
403
400
|
include('whitespace'),
|
404
401
|
(r'\(:', Comment, 'comment'),
|
405
|
-
(r'(at)(\s+)('+stringdouble+')',
|
406
|
-
|
402
|
+
(r'(at)(\s+)('+stringdouble+')',
|
403
|
+
bygroups(Keyword, Whitespace, String.Double)),
|
404
|
+
(r"(at)(\s+)("+stringsingle+')',
|
405
|
+
bygroups(Keyword, Whitespace, String.Single)),
|
407
406
|
(stringdouble, String.Double),
|
408
407
|
(stringsingle, String.Single),
|
409
408
|
(r',', Punctuation),
|
@@ -604,7 +603,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
604
603
|
(r'#\)', Punctuation, 'operator'),
|
605
604
|
(r'\t|\r|\n|[\u0020-\uD7FF]|[\uE000-\uFFFD]|[\U00010000-\U0010FFFF]',
|
606
605
|
Literal),
|
607
|
-
(r'(\s+)',
|
606
|
+
(r'(\s+)', Whitespace),
|
608
607
|
],
|
609
608
|
'occurrenceindicator': [
|
610
609
|
include('whitespace'),
|
@@ -655,35 +654,48 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
655
654
|
|
656
655
|
# NAMESPACE DECL
|
657
656
|
(r'(declare)(\s+)(default)(\s+)(collation)',
|
658
|
-
bygroups(Keyword.Declaration,
|
657
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration,
|
658
|
+
Whitespace, Keyword.Declaration)),
|
659
659
|
(r'(module|declare)(\s+)(namespace)',
|
660
|
-
bygroups(Keyword.Declaration,
|
660
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration),
|
661
|
+
'namespacedecl'),
|
661
662
|
(r'(declare)(\s+)(base-uri)',
|
662
|
-
bygroups(Keyword.Declaration,
|
663
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration),
|
664
|
+
'namespacedecl'),
|
663
665
|
|
664
666
|
# NAMESPACE KEYWORD
|
665
667
|
(r'(declare)(\s+)(default)(\s+)(element|function)',
|
666
|
-
bygroups(Keyword.Declaration,
|
668
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration,
|
669
|
+
Whitespace, Keyword.Declaration),
|
667
670
|
'namespacekeyword'),
|
668
671
|
(r'(import)(\s+)(schema|module)',
|
669
|
-
bygroups(Keyword.Pseudo,
|
672
|
+
bygroups(Keyword.Pseudo, Whitespace, Keyword.Pseudo),
|
673
|
+
'namespacekeyword'),
|
670
674
|
(r'(declare)(\s+)(copy-namespaces)',
|
671
|
-
bygroups(Keyword.Declaration,
|
675
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration),
|
676
|
+
'namespacekeyword'),
|
672
677
|
|
673
678
|
# VARNAMEs
|
674
679
|
(r'(for|let|some|every)(\s+)(\$)',
|
675
|
-
bygroups(Keyword,
|
680
|
+
bygroups(Keyword, Whitespace, Name.Variable), 'varname'),
|
676
681
|
(r'(for)(\s+)(tumbling|sliding)(\s+)(window)(\s+)(\$)',
|
677
|
-
bygroups(Keyword,
|
682
|
+
bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword,
|
683
|
+
Whitespace, Name.Variable),
|
684
|
+
'varname'),
|
678
685
|
(r'\$', Name.Variable, 'varname'),
|
679
686
|
(r'(declare)(\s+)(variable)(\s+)(\$)',
|
680
|
-
bygroups(Keyword.Declaration,
|
687
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration,
|
688
|
+
Whitespace, Name.Variable),
|
689
|
+
'varname'),
|
681
690
|
|
682
691
|
# ANNOTATED GLOBAL VARIABLES AND FUNCTIONS
|
683
|
-
(r'(declare)(\s+)(\%)', bygroups(Keyword.Declaration,
|
692
|
+
(r'(declare)(\s+)(\%)', bygroups(Keyword.Declaration, Whitespace,
|
693
|
+
Name.Decorator),
|
694
|
+
'annotationname'),
|
684
695
|
|
685
696
|
# ITEMTYPE
|
686
|
-
(r'(\))(\s+)(as)', bygroups(Operator,
|
697
|
+
(r'(\))(\s+)(as)', bygroups(Operator, Whitespace, Keyword),
|
698
|
+
'itemtype'),
|
687
699
|
|
688
700
|
(r'(element|attribute|schema-element|schema-attribute|comment|'
|
689
701
|
r'text|node|document-node|empty-sequence)(\s+)(\()',
|
@@ -707,8 +719,9 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
707
719
|
(r'(validate)(\s+)(lax|strict)',
|
708
720
|
pushstate_operator_root_validate_withmode),
|
709
721
|
(r'(validate)(\s*)(\{)', pushstate_operator_root_validate),
|
710
|
-
(r'(typeswitch)(\s*)(\()', bygroups(Keyword,
|
711
|
-
|
722
|
+
(r'(typeswitch)(\s*)(\()', bygroups(Keyword, Whitespace,
|
723
|
+
Punctuation)),
|
724
|
+
(r'(switch)(\s*)(\()', bygroups(Keyword, Whitespace, Punctuation)),
|
712
725
|
(r'(element|attribute|namespace)(\s*)(\{)',
|
713
726
|
pushstate_operator_root_construct_callback),
|
714
727
|
|
@@ -716,17 +729,18 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
716
729
|
pushstate_operator_root_construct_callback),
|
717
730
|
# ATTRIBUTE
|
718
731
|
(r'(attribute)(\s+)(?=' + qname + r')',
|
719
|
-
bygroups(Keyword,
|
732
|
+
bygroups(Keyword, Whitespace), 'attribute_qname'),
|
720
733
|
# ELEMENT
|
721
734
|
(r'(element)(\s+)(?=' + qname + r')',
|
722
|
-
bygroups(Keyword,
|
735
|
+
bygroups(Keyword, Whitespace), 'element_qname'),
|
723
736
|
# PROCESSING_INSTRUCTION
|
724
737
|
(r'(processing-instruction|namespace)(\s+)(' + ncname + r')(\s*)(\{)',
|
725
|
-
bygroups(Keyword,
|
738
|
+
bygroups(Keyword, Whitespace, Name.Variable, Whitespace,
|
739
|
+
Punctuation),
|
726
740
|
'operator'),
|
727
741
|
|
728
742
|
(r'(declare|define)(\s+)(function)',
|
729
|
-
bygroups(Keyword.Declaration,
|
743
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration)),
|
730
744
|
|
731
745
|
(r'(\{|\[)', pushstate_operator_root_callback),
|
732
746
|
|
@@ -737,17 +751,21 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
737
751
|
pushstate_operator_map_callback),
|
738
752
|
|
739
753
|
(r'(declare)(\s+)(ordering)',
|
740
|
-
bygroups(Keyword.Declaration,
|
754
|
+
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration),
|
755
|
+
'declareordering'),
|
741
756
|
|
742
757
|
(r'(xquery)(\s+)(version)',
|
743
|
-
bygroups(Keyword.Pseudo,
|
758
|
+
bygroups(Keyword.Pseudo, Whitespace, Keyword.Pseudo),
|
759
|
+
'xqueryversion'),
|
744
760
|
|
745
|
-
(r'(\(#)(\s*)', bygroups(Punctuation,
|
761
|
+
(r'(\(#)(\s*)', bygroups(Punctuation, Whitespace), 'pragma'),
|
746
762
|
|
747
763
|
# sometimes return can occur in root state
|
748
764
|
(r'return', Keyword),
|
749
765
|
|
750
|
-
(r'(declare)(\s+)(option)', bygroups(Keyword.Declaration,
|
766
|
+
(r'(declare)(\s+)(option)', bygroups(Keyword.Declaration,
|
767
|
+
Whitespace,
|
768
|
+
Keyword.Declaration),
|
751
769
|
'option'),
|
752
770
|
|
753
771
|
# URI LITERALS - single and double quoted
|
@@ -759,18 +777,20 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
759
777
|
(r'(descendant|following-sibling|following|parent|preceding-sibling'
|
760
778
|
r'|preceding|self)(::)', bygroups(Keyword, Punctuation)),
|
761
779
|
|
762
|
-
(r'(if)(\s*)(\()', bygroups(Keyword,
|
780
|
+
(r'(if)(\s*)(\()', bygroups(Keyword, Whitespace, Punctuation)),
|
763
781
|
|
764
782
|
(r'then|else', Keyword),
|
765
783
|
|
766
784
|
# eXist specific XQUF
|
767
|
-
(r'(update)(\s*)(insert|delete|replace|value|rename)',
|
785
|
+
(r'(update)(\s*)(insert|delete|replace|value|rename)',
|
786
|
+
bygroups(Keyword, Whitespace, Keyword)),
|
768
787
|
(r'(into|following|preceding|with)', Keyword),
|
769
788
|
|
770
789
|
# Marklogic specific
|
771
|
-
(r'(try)(\s*)', bygroups(Keyword,
|
790
|
+
(r'(try)(\s*)', bygroups(Keyword, Whitespace), 'root'),
|
772
791
|
(r'(catch)(\s*)(\()(\$)',
|
773
|
-
bygroups(Keyword,
|
792
|
+
bygroups(Keyword, Whitespace, Punctuation, Name.Variable),
|
793
|
+
'varname'),
|
774
794
|
|
775
795
|
|
776
796
|
(r'(@'+qname+')', Name.Attribute, 'operator'),
|
@@ -792,7 +812,7 @@ class XQueryLexer(ExtendedRegexLexer):
|
|
792
812
|
|
793
813
|
class QmlLexer(RegexLexer):
|
794
814
|
"""
|
795
|
-
For QML files.
|
815
|
+
For QML files.
|
796
816
|
|
797
817
|
.. versionadded:: 1.6
|
798
818
|
"""
|
@@ -801,6 +821,7 @@ class QmlLexer(RegexLexer):
|
|
801
821
|
# JavascriptLexer above.
|
802
822
|
|
803
823
|
name = 'QML'
|
824
|
+
url = 'https://doc.qt.io/qt-6/qmlapplications.html'
|
804
825
|
aliases = ['qml', 'qbs']
|
805
826
|
filenames = ['*.qml', '*.qbs']
|
806
827
|
mimetypes = ['application/x-qml', 'application/x-qt.qbs+qml']
|
@@ -865,9 +886,6 @@ class QmlLexer(RegexLexer):
|
|
865
886
|
|
866
887
|
class CirruLexer(RegexLexer):
|
867
888
|
r"""
|
868
|
-
Syntax rules of Cirru can be found at:
|
869
|
-
http://cirru.org/
|
870
|
-
|
871
889
|
* using ``()`` for expressions, but restricted in a same line
|
872
890
|
* using ``""`` for strings, with ``\`` for escaping chars
|
873
891
|
* using ``$`` as folding operator
|
@@ -878,6 +896,7 @@ class CirruLexer(RegexLexer):
|
|
878
896
|
"""
|
879
897
|
|
880
898
|
name = 'Cirru'
|
899
|
+
url = 'http://cirru.org/'
|
881
900
|
aliases = ['cirru']
|
882
901
|
filenames = ['*.cirru']
|
883
902
|
mimetypes = ['text/x-cirru']
|
@@ -885,7 +904,7 @@ class CirruLexer(RegexLexer):
|
|
885
904
|
|
886
905
|
tokens = {
|
887
906
|
'string': [
|
888
|
-
(r'[^"\\\n]', String),
|
907
|
+
(r'[^"\\\n]+', String),
|
889
908
|
(r'\\', String.Escape, 'escape'),
|
890
909
|
(r'"', String, '#pop'),
|
891
910
|
],
|