pygments.rb 2.4.0 → 3.0.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 +8 -8
- data/.github/workflows/release.yml +5 -5
- data/.gitignore +2 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.adoc +12 -0
- data/README.adoc +2 -2
- data/lib/pygments/popen.rb +2 -2
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +3 -3
- data/vendor/pygments-main/bin/pygmentize +1 -1
- data/vendor/pygments-main/pygments/__init__.py +2 -2
- data/vendor/pygments-main/pygments/__main__.py +1 -1
- data/vendor/pygments-main/pygments/cmdline.py +12 -12
- data/vendor/pygments-main/pygments/console.py +5 -5
- data/vendor/pygments-main/pygments/filter.py +2 -3
- data/vendor/pygments-main/pygments/filters/__init__.py +4 -4
- data/vendor/pygments-main/pygments/formatter.py +6 -1
- data/vendor/pygments-main/pygments/formatters/__init__.py +7 -8
- data/vendor/pygments-main/pygments/formatters/_mapping.py +0 -0
- data/vendor/pygments-main/pygments/formatters/bbcode.py +2 -2
- data/vendor/pygments-main/pygments/formatters/groff.py +3 -3
- data/vendor/pygments-main/pygments/formatters/html.py +38 -40
- data/vendor/pygments-main/pygments/formatters/img.py +51 -11
- data/vendor/pygments-main/pygments/formatters/irc.py +1 -1
- data/vendor/pygments-main/pygments/formatters/latex.py +24 -27
- data/vendor/pygments-main/pygments/formatters/other.py +3 -4
- data/vendor/pygments-main/pygments/formatters/pangomarkup.py +2 -2
- data/vendor/pygments-main/pygments/formatters/rtf.py +228 -25
- data/vendor/pygments-main/pygments/formatters/svg.py +17 -20
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
- data/vendor/pygments-main/pygments/lexer.py +51 -33
- data/vendor/pygments-main/pygments/lexers/__init__.py +12 -12
- data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +1 -1
- 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 +1 -1
- data/vendor/pygments-main/pygments/lexers/_css_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +5 -5
- data/vendor/pygments-main/pygments/lexers/_luau_builtins.py +62 -0
- data/vendor/pygments-main/pygments/lexers/_mapping.py +41 -11
- data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_php_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +5 -5
- data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +4 -4
- data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +1 -1
- 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 +6 -8
- data/vendor/pygments-main/pygments/lexers/ada.py +3 -3
- data/vendor/pygments-main/pygments/lexers/agile.py +3 -1
- data/vendor/pygments-main/pygments/lexers/algebra.py +9 -13
- data/vendor/pygments-main/pygments/lexers/ambient.py +2 -3
- data/vendor/pygments-main/pygments/lexers/amdgpu.py +3 -3
- data/vendor/pygments-main/pygments/lexers/ampl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/apdlexer.py +4 -3
- data/vendor/pygments-main/pygments/lexers/apl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/archetype.py +8 -12
- data/vendor/pygments-main/pygments/lexers/arrow.py +2 -3
- data/vendor/pygments-main/pygments/lexers/arturo.py +2 -3
- data/vendor/pygments-main/pygments/lexers/asc.py +4 -4
- data/vendor/pygments-main/pygments/lexers/asm.py +28 -15
- data/vendor/pygments-main/pygments/lexers/asn1.py +178 -0
- data/vendor/pygments-main/pygments/lexers/automation.py +6 -8
- data/vendor/pygments-main/pygments/lexers/bare.py +2 -3
- data/vendor/pygments-main/pygments/lexers/basic.py +48 -57
- data/vendor/pygments-main/pygments/lexers/bdd.py +3 -4
- data/vendor/pygments-main/pygments/lexers/berry.py +4 -4
- data/vendor/pygments-main/pygments/lexers/bibtex.py +5 -5
- data/vendor/pygments-main/pygments/lexers/blueprint.py +173 -0
- data/vendor/pygments-main/pygments/lexers/boa.py +4 -4
- data/vendor/pygments-main/pygments/lexers/bqn.py +109 -0
- data/vendor/pygments-main/pygments/lexers/business.py +21 -22
- data/vendor/pygments-main/pygments/lexers/c_cpp.py +9 -4
- data/vendor/pygments-main/pygments/lexers/c_like.py +99 -27
- data/vendor/pygments-main/pygments/lexers/capnproto.py +2 -3
- data/vendor/pygments-main/pygments/lexers/carbon.py +10 -11
- data/vendor/pygments-main/pygments/lexers/cddl.py +8 -9
- data/vendor/pygments-main/pygments/lexers/chapel.py +2 -3
- data/vendor/pygments-main/pygments/lexers/clean.py +2 -1
- data/vendor/pygments-main/pygments/lexers/comal.py +2 -1
- data/vendor/pygments-main/pygments/lexers/compiled.py +2 -1
- data/vendor/pygments-main/pygments/lexers/configs.py +342 -108
- data/vendor/pygments-main/pygments/lexers/console.py +5 -5
- data/vendor/pygments-main/pygments/lexers/cplint.py +2 -3
- data/vendor/pygments-main/pygments/lexers/crystal.py +4 -5
- data/vendor/pygments-main/pygments/lexers/csound.py +6 -8
- data/vendor/pygments-main/pygments/lexers/css.py +5 -5
- data/vendor/pygments-main/pygments/lexers/d.py +4 -3
- data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -3
- data/vendor/pygments-main/pygments/lexers/data.py +8 -12
- data/vendor/pygments-main/pygments/lexers/dax.py +2 -3
- data/vendor/pygments-main/pygments/lexers/devicetree.py +2 -3
- data/vendor/pygments-main/pygments/lexers/diff.py +7 -6
- data/vendor/pygments-main/pygments/lexers/dns.py +109 -0
- data/vendor/pygments-main/pygments/lexers/dotnet.py +19 -14
- data/vendor/pygments-main/pygments/lexers/dsls.py +24 -35
- data/vendor/pygments-main/pygments/lexers/dylan.py +8 -16
- data/vendor/pygments-main/pygments/lexers/ecl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/eiffel.py +3 -4
- data/vendor/pygments-main/pygments/lexers/elm.py +3 -4
- data/vendor/pygments-main/pygments/lexers/elpi.py +28 -21
- data/vendor/pygments-main/pygments/lexers/email.py +3 -3
- data/vendor/pygments-main/pygments/lexers/erlang.py +22 -24
- data/vendor/pygments-main/pygments/lexers/esoteric.py +11 -12
- data/vendor/pygments-main/pygments/lexers/ezhil.py +2 -3
- data/vendor/pygments-main/pygments/lexers/factor.py +2 -3
- data/vendor/pygments-main/pygments/lexers/fantom.py +3 -3
- data/vendor/pygments-main/pygments/lexers/felix.py +9 -10
- data/vendor/pygments-main/pygments/lexers/fift.py +2 -1
- data/vendor/pygments-main/pygments/lexers/floscript.py +2 -3
- data/vendor/pygments-main/pygments/lexers/forth.py +2 -3
- data/vendor/pygments-main/pygments/lexers/fortran.py +6 -7
- data/vendor/pygments-main/pygments/lexers/foxpro.py +3 -3
- data/vendor/pygments-main/pygments/lexers/freefem.py +2 -3
- data/vendor/pygments-main/pygments/lexers/func.py +3 -1
- data/vendor/pygments-main/pygments/lexers/functional.py +2 -1
- data/vendor/pygments-main/pygments/lexers/futhark.py +6 -7
- data/vendor/pygments-main/pygments/lexers/gcodelexer.py +3 -3
- data/vendor/pygments-main/pygments/lexers/gdscript.py +2 -1
- data/vendor/pygments-main/pygments/lexers/go.py +3 -4
- data/vendor/pygments-main/pygments/lexers/grammar_notation.py +6 -9
- data/vendor/pygments-main/pygments/lexers/graph.py +12 -9
- data/vendor/pygments-main/pygments/lexers/graphics.py +13 -17
- data/vendor/pygments-main/pygments/lexers/graphql.py +176 -0
- data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -3
- data/vendor/pygments-main/pygments/lexers/gsql.py +2 -3
- data/vendor/pygments-main/pygments/lexers/haskell.py +27 -32
- data/vendor/pygments-main/pygments/lexers/haxe.py +3 -5
- data/vendor/pygments-main/pygments/lexers/hdl.py +8 -7
- data/vendor/pygments-main/pygments/lexers/hexdump.py +3 -3
- data/vendor/pygments-main/pygments/lexers/html.py +34 -13
- data/vendor/pygments-main/pygments/lexers/idl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/igor.py +305 -290
- data/vendor/pygments-main/pygments/lexers/inferno.py +2 -3
- data/vendor/pygments-main/pygments/lexers/installers.py +7 -9
- data/vendor/pygments-main/pygments/lexers/int_fiction.py +150 -162
- data/vendor/pygments-main/pygments/lexers/iolang.py +2 -3
- data/vendor/pygments-main/pygments/lexers/j.py +2 -3
- data/vendor/pygments-main/pygments/lexers/javascript.py +18 -19
- data/vendor/pygments-main/pygments/lexers/jmespath.py +2 -1
- data/vendor/pygments-main/pygments/lexers/jslt.py +2 -3
- data/vendor/pygments-main/pygments/lexers/jsonnet.py +4 -3
- data/vendor/pygments-main/pygments/lexers/jsx.py +75 -0
- data/vendor/pygments-main/pygments/lexers/julia.py +4 -5
- data/vendor/pygments-main/pygments/lexers/jvm.py +98 -116
- data/vendor/pygments-main/pygments/lexers/kuin.py +2 -3
- data/vendor/pygments-main/pygments/lexers/kusto.py +93 -0
- data/vendor/pygments-main/pygments/lexers/ldap.py +155 -0
- data/vendor/pygments-main/pygments/lexers/lean.py +241 -0
- data/vendor/pygments-main/pygments/lexers/lilypond.py +2 -3
- data/vendor/pygments-main/pygments/lexers/lisp.py +373 -65
- data/vendor/pygments-main/pygments/lexers/macaulay2.py +53 -4
- data/vendor/pygments-main/pygments/lexers/make.py +7 -5
- data/vendor/pygments-main/pygments/lexers/markup.py +242 -91
- data/vendor/pygments-main/pygments/lexers/math.py +2 -1
- data/vendor/pygments-main/pygments/lexers/matlab.py +10 -12
- data/vendor/pygments-main/pygments/lexers/maxima.py +2 -3
- data/vendor/pygments-main/pygments/lexers/meson.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mime.py +4 -4
- data/vendor/pygments-main/pygments/lexers/minecraft.py +24 -27
- data/vendor/pygments-main/pygments/lexers/mips.py +3 -1
- data/vendor/pygments-main/pygments/lexers/ml.py +59 -61
- data/vendor/pygments-main/pygments/lexers/modeling.py +19 -22
- data/vendor/pygments-main/pygments/lexers/modula2.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mojo.py +704 -0
- data/vendor/pygments-main/pygments/lexers/monte.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mosel.py +3 -3
- data/vendor/pygments-main/pygments/lexers/ncl.py +4 -3
- data/vendor/pygments-main/pygments/lexers/nimrod.py +7 -8
- data/vendor/pygments-main/pygments/lexers/nit.py +2 -3
- data/vendor/pygments-main/pygments/lexers/nix.py +40 -31
- data/vendor/pygments-main/pygments/lexers/oberon.py +3 -3
- data/vendor/pygments-main/pygments/lexers/objective.py +14 -6
- data/vendor/pygments-main/pygments/lexers/ooc.py +2 -3
- data/vendor/pygments-main/pygments/lexers/openscad.py +96 -0
- data/vendor/pygments-main/pygments/lexers/other.py +2 -1
- data/vendor/pygments-main/pygments/lexers/parasail.py +2 -3
- data/vendor/pygments-main/pygments/lexers/parsers.py +41 -44
- data/vendor/pygments-main/pygments/lexers/pascal.py +6 -3
- data/vendor/pygments-main/pygments/lexers/pawn.py +5 -5
- data/vendor/pygments-main/pygments/lexers/perl.py +3 -3
- data/vendor/pygments-main/pygments/lexers/phix.py +2 -3
- data/vendor/pygments-main/pygments/lexers/php.py +4 -5
- data/vendor/pygments-main/pygments/lexers/pointless.py +2 -3
- data/vendor/pygments-main/pygments/lexers/pony.py +3 -3
- data/vendor/pygments-main/pygments/lexers/praat.py +2 -3
- data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
- data/vendor/pygments-main/pygments/lexers/prolog.py +23 -9
- data/vendor/pygments-main/pygments/lexers/promql.py +2 -1
- data/vendor/pygments-main/pygments/lexers/prql.py +251 -0
- data/vendor/pygments-main/pygments/lexers/ptx.py +119 -0
- data/vendor/pygments-main/pygments/lexers/python.py +24 -24
- data/vendor/pygments-main/pygments/lexers/q.py +5 -6
- data/vendor/pygments-main/pygments/lexers/qlik.py +3 -3
- data/vendor/pygments-main/pygments/lexers/qvt.py +5 -3
- data/vendor/pygments-main/pygments/lexers/r.py +8 -6
- data/vendor/pygments-main/pygments/lexers/rdf.py +19 -13
- data/vendor/pygments-main/pygments/lexers/rebol.py +7 -7
- data/vendor/pygments-main/pygments/lexers/resource.py +5 -6
- data/vendor/pygments-main/pygments/lexers/ride.py +4 -5
- data/vendor/pygments-main/pygments/lexers/rita.py +2 -3
- data/vendor/pygments-main/pygments/lexers/rnc.py +2 -3
- data/vendor/pygments-main/pygments/lexers/roboconf.py +5 -5
- data/vendor/pygments-main/pygments/lexers/robotframework.py +2 -3
- data/vendor/pygments-main/pygments/lexers/ruby.py +8 -13
- data/vendor/pygments-main/pygments/lexers/rust.py +9 -10
- data/vendor/pygments-main/pygments/lexers/sas.py +3 -3
- data/vendor/pygments-main/pygments/lexers/savi.py +131 -130
- data/vendor/pygments-main/pygments/lexers/scdoc.py +13 -7
- data/vendor/pygments-main/pygments/lexers/scripting.py +354 -42
- data/vendor/pygments-main/pygments/lexers/sgf.py +2 -3
- data/vendor/pygments-main/pygments/lexers/shell.py +107 -129
- data/vendor/pygments-main/pygments/lexers/sieve.py +3 -3
- data/vendor/pygments-main/pygments/lexers/slash.py +4 -5
- data/vendor/pygments-main/pygments/lexers/smalltalk.py +3 -5
- data/vendor/pygments-main/pygments/lexers/smithy.py +2 -3
- data/vendor/pygments-main/pygments/lexers/smv.py +3 -3
- data/vendor/pygments-main/pygments/lexers/snobol.py +3 -3
- data/vendor/pygments-main/pygments/lexers/solidity.py +3 -3
- data/vendor/pygments-main/pygments/lexers/soong.py +78 -0
- data/vendor/pygments-main/pygments/lexers/sophia.py +3 -4
- data/vendor/pygments-main/pygments/lexers/special.py +8 -3
- data/vendor/pygments-main/pygments/lexers/spice.py +15 -16
- data/vendor/pygments-main/pygments/lexers/sql.py +24 -18
- data/vendor/pygments-main/pygments/lexers/srcinfo.py +3 -3
- data/vendor/pygments-main/pygments/lexers/stata.py +2 -3
- data/vendor/pygments-main/pygments/lexers/supercollider.py +2 -3
- data/vendor/pygments-main/pygments/lexers/tact.py +303 -0
- data/vendor/pygments-main/pygments/lexers/tal.py +13 -10
- data/vendor/pygments-main/pygments/lexers/tcl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/teal.py +2 -3
- data/vendor/pygments-main/pygments/lexers/templates.py +131 -72
- data/vendor/pygments-main/pygments/lexers/teraterm.py +2 -3
- data/vendor/pygments-main/pygments/lexers/testing.py +4 -5
- data/vendor/pygments-main/pygments/lexers/text.py +2 -1
- data/vendor/pygments-main/pygments/lexers/textedit.py +9 -6
- data/vendor/pygments-main/pygments/lexers/textfmts.py +20 -15
- data/vendor/pygments-main/pygments/lexers/theorem.py +41 -115
- data/vendor/pygments-main/pygments/lexers/thingsdb.py +50 -26
- data/vendor/pygments-main/pygments/lexers/tlb.py +3 -1
- data/vendor/pygments-main/pygments/lexers/tls.py +54 -0
- data/vendor/pygments-main/pygments/lexers/tnt.py +2 -3
- data/vendor/pygments-main/pygments/lexers/trafficscript.py +3 -3
- data/vendor/pygments-main/pygments/lexers/typoscript.py +6 -7
- data/vendor/pygments-main/pygments/lexers/typst.py +104 -0
- data/vendor/pygments-main/pygments/lexers/ul4.py +47 -5
- data/vendor/pygments-main/pygments/lexers/unicon.py +9 -7
- data/vendor/pygments-main/pygments/lexers/urbi.py +3 -3
- data/vendor/pygments-main/pygments/lexers/usd.py +6 -11
- data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
- data/vendor/pygments-main/pygments/lexers/verification.py +4 -5
- data/vendor/pygments-main/pygments/lexers/verifpal.py +65 -0
- data/vendor/pygments-main/pygments/lexers/vip.py +150 -0
- data/vendor/pygments-main/pygments/lexers/vyper.py +140 -0
- data/vendor/pygments-main/pygments/lexers/web.py +2 -1
- data/vendor/pygments-main/pygments/lexers/webassembly.py +2 -3
- data/vendor/pygments-main/pygments/lexers/webidl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/webmisc.py +11 -15
- data/vendor/pygments-main/pygments/lexers/wgsl.py +6 -7
- data/vendor/pygments-main/pygments/lexers/whiley.py +2 -3
- data/vendor/pygments-main/pygments/lexers/wowtoc.py +3 -3
- data/vendor/pygments-main/pygments/lexers/wren.py +3 -4
- data/vendor/pygments-main/pygments/lexers/x10.py +6 -7
- data/vendor/pygments-main/pygments/lexers/xorg.py +2 -1
- data/vendor/pygments-main/pygments/lexers/yang.py +2 -3
- data/vendor/pygments-main/pygments/lexers/yara.py +69 -0
- data/vendor/pygments-main/pygments/lexers/zig.py +2 -1
- data/vendor/pygments-main/pygments/modeline.py +4 -4
- data/vendor/pygments-main/pygments/plugin.py +3 -19
- data/vendor/pygments-main/pygments/regexopt.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +1 -1
- data/vendor/pygments-main/pygments/sphinxext.py +38 -8
- data/vendor/pygments-main/pygments/style.py +8 -2
- data/vendor/pygments-main/pygments/styles/__init__.py +17 -59
- data/vendor/pygments-main/pygments/styles/_mapping.py +54 -0
- data/vendor/pygments-main/pygments/styles/abap.py +5 -1
- data/vendor/pygments-main/pygments/styles/algol.py +5 -1
- data/vendor/pygments-main/pygments/styles/algol_nu.py +5 -1
- data/vendor/pygments-main/pygments/styles/arduino.py +76 -72
- data/vendor/pygments-main/pygments/styles/autumn.py +6 -1
- data/vendor/pygments-main/pygments/styles/borland.py +6 -1
- data/vendor/pygments-main/pygments/styles/bw.py +6 -1
- data/vendor/pygments-main/pygments/styles/coffee.py +80 -0
- data/vendor/pygments-main/pygments/styles/colorful.py +6 -1
- data/vendor/pygments-main/pygments/styles/default.py +6 -1
- data/vendor/pygments-main/pygments/styles/dracula.py +68 -80
- data/vendor/pygments-main/pygments/styles/emacs.py +6 -1
- data/vendor/pygments-main/pygments/styles/friendly.py +6 -1
- data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +6 -1
- data/vendor/pygments-main/pygments/styles/fruity.py +7 -1
- data/vendor/pygments-main/pygments/styles/gh_dark.py +7 -1
- data/vendor/pygments-main/pygments/styles/gruvbox.py +10 -1
- data/vendor/pygments-main/pygments/styles/igor.py +6 -1
- data/vendor/pygments-main/pygments/styles/inkpot.py +7 -2
- data/vendor/pygments-main/pygments/styles/lightbulb.py +110 -0
- data/vendor/pygments-main/pygments/styles/lilypond.py +8 -2
- data/vendor/pygments-main/pygments/styles/lovelace.py +16 -10
- data/vendor/pygments-main/pygments/styles/manni.py +7 -2
- data/vendor/pygments-main/pygments/styles/material.py +21 -14
- data/vendor/pygments-main/pygments/styles/monokai.py +16 -10
- data/vendor/pygments-main/pygments/styles/murphy.py +7 -2
- data/vendor/pygments-main/pygments/styles/native.py +10 -5
- data/vendor/pygments-main/pygments/styles/nord.py +9 -3
- data/vendor/pygments-main/pygments/styles/onedark.py +6 -2
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +7 -2
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +7 -2
- data/vendor/pygments-main/pygments/styles/pastie.py +7 -1
- data/vendor/pygments-main/pygments/styles/perldoc.py +7 -1
- data/vendor/pygments-main/pygments/styles/rainbow_dash.py +26 -19
- data/vendor/pygments-main/pygments/styles/rrt.py +8 -2
- data/vendor/pygments-main/pygments/styles/sas.py +6 -1
- data/vendor/pygments-main/pygments/styles/solarized.py +9 -1
- data/vendor/pygments-main/pygments/styles/staroffice.py +6 -1
- data/vendor/pygments-main/pygments/styles/stata_dark.py +6 -2
- data/vendor/pygments-main/pygments/styles/stata_light.py +6 -1
- data/vendor/pygments-main/pygments/styles/tango.py +7 -3
- data/vendor/pygments-main/pygments/styles/trac.py +7 -1
- data/vendor/pygments-main/pygments/styles/vim.py +7 -1
- data/vendor/pygments-main/pygments/styles/vs.py +7 -2
- data/vendor/pygments-main/pygments/styles/xcode.py +6 -1
- data/vendor/pygments-main/pygments/styles/zenburn.py +6 -1
- data/vendor/pygments-main/pygments/token.py +2 -1
- data/vendor/pygments-main/pygments/unistring.py +5 -5
- data/vendor/pygments-main/pygments/util.py +13 -19
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/METADATA +14 -13
- data/vendor/pygments-main/pygments-2.18.0.dist-info/RECORD +663 -0
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/WHEEL +1 -2
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/AUTHORS +13 -0
- metadata +41 -17
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +0 -614
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/top_level.txt +0 -1
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/INSTALLER +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/REQUESTED +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/entry_points.txt +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/LICENSE +0 -0
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Pygments lexers for JVM languages.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -33,6 +33,7 @@ class JavaLexer(RegexLexer):
|
|
33
33
|
aliases = ['java']
|
34
34
|
filenames = ['*.java']
|
35
35
|
mimetypes = ['text/x-java']
|
36
|
+
version_added = ''
|
36
37
|
|
37
38
|
flags = re.MULTILINE | re.DOTALL
|
38
39
|
|
@@ -118,8 +119,6 @@ class JavaLexer(RegexLexer):
|
|
118
119
|
class AspectJLexer(JavaLexer):
|
119
120
|
"""
|
120
121
|
For AspectJ source code.
|
121
|
-
|
122
|
-
.. versionadded:: 1.6
|
123
122
|
"""
|
124
123
|
|
125
124
|
name = 'AspectJ'
|
@@ -127,6 +126,7 @@ class AspectJLexer(JavaLexer):
|
|
127
126
|
aliases = ['aspectj']
|
128
127
|
filenames = ['*.aj']
|
129
128
|
mimetypes = ['text/x-aspectj']
|
129
|
+
version_added = '1.6'
|
130
130
|
|
131
131
|
aj_keywords = {
|
132
132
|
'aspect', 'pointcut', 'privileged', 'call', 'execution',
|
@@ -165,21 +165,22 @@ class ScalaLexer(RegexLexer):
|
|
165
165
|
aliases = ['scala']
|
166
166
|
filenames = ['*.scala']
|
167
167
|
mimetypes = ['text/x-scala']
|
168
|
+
version_added = ''
|
168
169
|
|
169
170
|
flags = re.MULTILINE | re.DOTALL
|
170
171
|
|
171
172
|
opchar = '[!#%&*\\-\\/:?@^' + uni.combine('Sm', 'So') + ']'
|
172
173
|
letter = '[_\\$' + uni.combine('Ll', 'Lu', 'Lo', 'Nl', 'Lt') + ']'
|
173
174
|
upperLetter = '[' + uni.combine('Lu', 'Lt') + ']'
|
174
|
-
letterOrDigit = '(
|
175
|
-
letterOrDigitNoDollarSign = '(
|
176
|
-
alphaId = '
|
177
|
-
simpleInterpolatedVariable = '
|
178
|
-
idrest = '
|
179
|
-
idUpper = '
|
180
|
-
plainid = '(
|
175
|
+
letterOrDigit = f'(?:{letter}|[0-9])'
|
176
|
+
letterOrDigitNoDollarSign = '(?:{}|[0-9])'.format(letter.replace('\\$', ''))
|
177
|
+
alphaId = f'{letter}+'
|
178
|
+
simpleInterpolatedVariable = f'{letter}{letterOrDigitNoDollarSign}*'
|
179
|
+
idrest = f'{letter}{letterOrDigit}*(?:(?<=_){opchar}+)?'
|
180
|
+
idUpper = f'{upperLetter}{letterOrDigit}*(?:(?<=_){opchar}+)?'
|
181
|
+
plainid = f'(?:{idrest}|{opchar}+)'
|
181
182
|
backQuotedId = r'`[^`]+`'
|
182
|
-
anyId =
|
183
|
+
anyId = rf'(?:{plainid}|{backQuotedId})'
|
183
184
|
notStartOfComment = r'(?!//|/\*)'
|
184
185
|
endOfLineMaybeWithComment = r'(?=\s*(//|$))'
|
185
186
|
|
@@ -256,7 +257,7 @@ class ScalaLexer(RegexLexer):
|
|
256
257
|
r'(def|val|var|given|type|class|trait|object|enum)\b)', Keyword),
|
257
258
|
],
|
258
259
|
'annotations': [
|
259
|
-
(
|
260
|
+
(rf'@{idrest}', Name.Decorator),
|
260
261
|
],
|
261
262
|
'using': [
|
262
263
|
# using is a soft keyword, can only be used in the first position of
|
@@ -264,29 +265,26 @@ class ScalaLexer(RegexLexer):
|
|
264
265
|
(r'(\()(\s*)(using)(\s)', bygroups(Punctuation, Whitespace, Keyword, Whitespace)),
|
265
266
|
],
|
266
267
|
'declarations': [
|
267
|
-
(
|
268
|
+
(rf'\b(def)\b(\s*){notStartOfComment}({anyId})?',
|
268
269
|
bygroups(Keyword, Whitespace, Name.Function)),
|
269
|
-
(
|
270
|
+
(rf'\b(trait)\b(\s*){notStartOfComment}({anyId})?',
|
270
271
|
bygroups(Keyword, Whitespace, Name.Class)),
|
271
|
-
(
|
272
|
-
(notStartOfComment, anyId),
|
272
|
+
(rf'\b(?:(case)(\s+))?(class|object|enum)\b(\s*){notStartOfComment}({anyId})?',
|
273
273
|
bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Class)),
|
274
|
-
(
|
274
|
+
(rf'(?<!\.)\b(type)\b(\s*){notStartOfComment}({anyId})?',
|
275
275
|
bygroups(Keyword, Whitespace, Name.Class)),
|
276
276
|
(r'\b(val|var)\b', Keyword.Declaration),
|
277
|
-
(
|
278
|
-
(notStartOfComment, anyId),
|
277
|
+
(rf'\b(package)(\s+)(object)\b(\s*){notStartOfComment}({anyId})?',
|
279
278
|
bygroups(Keyword, Whitespace, Keyword, Whitespace, Name.Namespace)),
|
280
279
|
(r'\b(package)(\s+)', bygroups(Keyword, Whitespace), 'package'),
|
281
|
-
(
|
280
|
+
(rf'\b(given)\b(\s*)({idUpper})',
|
282
281
|
bygroups(Keyword, Whitespace, Name.Class)),
|
283
|
-
(
|
282
|
+
(rf'\b(given)\b(\s*)({anyId})?',
|
284
283
|
bygroups(Keyword, Whitespace, Name)),
|
285
284
|
],
|
286
285
|
'inheritance': [
|
287
286
|
(r'\b(extends|with|derives)\b(\s*)'
|
288
|
-
|
289
|
-
(idUpper, backQuotedId, plainid),
|
287
|
+
rf'({idUpper}|{backQuotedId}|(?=\([^\)]+=>)|(?={plainid})|(?="))?',
|
290
288
|
bygroups(Keyword, Whitespace, Name.Class)),
|
291
289
|
],
|
292
290
|
'extension': [
|
@@ -296,10 +294,9 @@ class ScalaLexer(RegexLexer):
|
|
296
294
|
# end is a soft keyword, should only be highlighted in certain cases
|
297
295
|
(r'\b(end)(\s+)(if|while|for|match|new|extension|val|var)\b',
|
298
296
|
bygroups(Keyword, Whitespace, Keyword)),
|
299
|
-
(
|
297
|
+
(rf'\b(end)(\s+)({idUpper}){endOfLineMaybeWithComment}',
|
300
298
|
bygroups(Keyword, Whitespace, Name.Class)),
|
301
|
-
(
|
302
|
-
(backQuotedId, plainid, endOfLineMaybeWithComment),
|
299
|
+
(rf'\b(end)(\s+)({backQuotedId}|{plainid})?{endOfLineMaybeWithComment}',
|
303
300
|
bygroups(Keyword, Whitespace, Name.Namespace)),
|
304
301
|
],
|
305
302
|
'punctuation': [
|
@@ -310,10 +307,10 @@ class ScalaLexer(RegexLexer):
|
|
310
307
|
(words(keywords, prefix=r'\b', suffix=r'\b'), Keyword),
|
311
308
|
],
|
312
309
|
'operators': [
|
313
|
-
(
|
310
|
+
(rf'({opchar}{{2,}})(\s+)', bygroups(Operator, Whitespace)),
|
314
311
|
(r'/(?![/*])', Operator),
|
315
312
|
(words(operators), Operator),
|
316
|
-
(
|
313
|
+
(rf'(?<!{opchar})(!|&&|\|\|)(?!{opchar})', Operator),
|
317
314
|
],
|
318
315
|
'constants': [
|
319
316
|
(r'\b(this|super)\b', Name.Builtin.Pseudo),
|
@@ -336,7 +333,7 @@ class ScalaLexer(RegexLexer):
|
|
336
333
|
(r'raw"(\\\\|\\"|[^"])*"', String),
|
337
334
|
],
|
338
335
|
'symbols': [
|
339
|
-
(
|
336
|
+
(rf"('{plainid})(?!')", String.Symbol),
|
340
337
|
],
|
341
338
|
'singleton-type': [
|
342
339
|
(r'(\.)(type)\b', bygroups(Punctuation, Keyword)),
|
@@ -344,7 +341,7 @@ class ScalaLexer(RegexLexer):
|
|
344
341
|
'inline': [
|
345
342
|
# inline is a soft modifier, only highlighted if followed by if,
|
346
343
|
# match or parameters.
|
347
|
-
(
|
344
|
+
(rf'\b(inline)(?=\s+({plainid}|{backQuotedId})\s*:)',
|
348
345
|
Keyword),
|
349
346
|
(r'\b(inline)\b(?=(?:.(?!\b(?:val|def|given)\b))*\b(if|match)\b)',
|
350
347
|
Keyword),
|
@@ -427,7 +424,7 @@ class ScalaLexer(RegexLexer):
|
|
427
424
|
# Helpers
|
428
425
|
'qualified-name': [
|
429
426
|
(idUpper, Name.Class),
|
430
|
-
(
|
427
|
+
(rf'({anyId})(\.)', bygroups(Name.Namespace, Punctuation)),
|
431
428
|
(r'\.', Punctuation),
|
432
429
|
(anyId, Name),
|
433
430
|
(r'[^\S\n]+', Whitespace),
|
@@ -435,7 +432,7 @@ class ScalaLexer(RegexLexer):
|
|
435
432
|
'interpolated-string-common': [
|
436
433
|
(r'[^"$\\]+', String),
|
437
434
|
(r'\$\$', String.Escape),
|
438
|
-
(
|
435
|
+
(rf'(\$)({simpleInterpolatedVariable})',
|
439
436
|
bygroups(String.Interpol, Name)),
|
440
437
|
(r'\$\{', String.Interpol, 'interpolated-string-brace'),
|
441
438
|
(r'\\.', String),
|
@@ -446,14 +443,14 @@ class ScalaLexer(RegexLexer):
|
|
446
443
|
class GosuLexer(RegexLexer):
|
447
444
|
"""
|
448
445
|
For Gosu source code.
|
449
|
-
|
450
|
-
.. versionadded:: 1.5
|
451
446
|
"""
|
452
447
|
|
453
448
|
name = 'Gosu'
|
454
449
|
aliases = ['gosu']
|
455
450
|
filenames = ['*.gs', '*.gsx', '*.gsp', '*.vark']
|
456
451
|
mimetypes = ['text/x-gosu']
|
452
|
+
url = 'https://gosu-lang.github.io'
|
453
|
+
version_added = '1.5'
|
457
454
|
|
458
455
|
flags = re.MULTILINE | re.DOTALL
|
459
456
|
|
@@ -525,14 +522,14 @@ class GosuLexer(RegexLexer):
|
|
525
522
|
class GosuTemplateLexer(Lexer):
|
526
523
|
"""
|
527
524
|
For Gosu templates.
|
528
|
-
|
529
|
-
.. versionadded:: 1.5
|
530
525
|
"""
|
531
526
|
|
532
527
|
name = 'Gosu Template'
|
533
528
|
aliases = ['gst']
|
534
529
|
filenames = ['*.gst']
|
535
530
|
mimetypes = ['text/x-gosu-template']
|
531
|
+
url = 'https://gosu-lang.github.io'
|
532
|
+
version_added = '1.5'
|
536
533
|
|
537
534
|
def get_tokens_unprocessed(self, text):
|
538
535
|
lexer = GosuLexer()
|
@@ -543,8 +540,6 @@ class GosuTemplateLexer(Lexer):
|
|
543
540
|
class GroovyLexer(RegexLexer):
|
544
541
|
"""
|
545
542
|
For Groovy source code.
|
546
|
-
|
547
|
-
.. versionadded:: 1.5
|
548
543
|
"""
|
549
544
|
|
550
545
|
name = 'Groovy'
|
@@ -552,6 +547,7 @@ class GroovyLexer(RegexLexer):
|
|
552
547
|
aliases = ['groovy']
|
553
548
|
filenames = ['*.groovy','*.gradle']
|
554
549
|
mimetypes = ['text/x-groovy']
|
550
|
+
version_added = '1.5'
|
555
551
|
|
556
552
|
flags = re.MULTILINE | re.DOTALL
|
557
553
|
|
@@ -622,14 +618,13 @@ class IokeLexer(RegexLexer):
|
|
622
618
|
"""
|
623
619
|
For Ioke (a strongly typed, dynamic,
|
624
620
|
prototype based programming language) source.
|
625
|
-
|
626
|
-
.. versionadded:: 1.4
|
627
621
|
"""
|
628
622
|
name = 'Ioke'
|
629
623
|
url = 'https://ioke.org/'
|
630
624
|
filenames = ['*.ik']
|
631
625
|
aliases = ['ioke', 'ik']
|
632
626
|
mimetypes = ['text/x-iokesrc']
|
627
|
+
version_added = '1.4'
|
633
628
|
tokens = {
|
634
629
|
'interpolatableText': [
|
635
630
|
(r'(\\b|\\e|\\t|\\n|\\f|\\r|\\"|\\\\|\\#|\\\Z|\\u[0-9a-fA-F]{1,4}'
|
@@ -813,14 +808,13 @@ class IokeLexer(RegexLexer):
|
|
813
808
|
class ClojureLexer(RegexLexer):
|
814
809
|
"""
|
815
810
|
Lexer for Clojure source code.
|
816
|
-
|
817
|
-
.. versionadded:: 0.11
|
818
811
|
"""
|
819
812
|
name = 'Clojure'
|
820
813
|
url = 'http://clojure.org/'
|
821
814
|
aliases = ['clojure', 'clj']
|
822
815
|
filenames = ['*.clj', '*.cljc']
|
823
816
|
mimetypes = ['text/x-clojure', 'application/x-clojure']
|
817
|
+
version_added = '0.11'
|
824
818
|
|
825
819
|
special_forms = (
|
826
820
|
'.', 'def', 'do', 'fn', 'if', 'let', 'new', 'quote', 'var', 'loop'
|
@@ -954,14 +948,13 @@ class ClojureLexer(RegexLexer):
|
|
954
948
|
class ClojureScriptLexer(ClojureLexer):
|
955
949
|
"""
|
956
950
|
Lexer for ClojureScript source code.
|
957
|
-
|
958
|
-
.. versionadded:: 2.0
|
959
951
|
"""
|
960
952
|
name = 'ClojureScript'
|
961
953
|
url = 'http://clojure.org/clojurescript'
|
962
954
|
aliases = ['clojurescript', 'cljs']
|
963
955
|
filenames = ['*.cljs']
|
964
956
|
mimetypes = ['text/x-clojurescript', 'application/x-clojurescript']
|
957
|
+
version_added = '2.0'
|
965
958
|
|
966
959
|
|
967
960
|
class TeaLangLexer(RegexLexer):
|
@@ -1014,8 +1007,6 @@ class TeaLangLexer(RegexLexer):
|
|
1014
1007
|
class CeylonLexer(RegexLexer):
|
1015
1008
|
"""
|
1016
1009
|
For Ceylon source code.
|
1017
|
-
|
1018
|
-
.. versionadded:: 1.6
|
1019
1010
|
"""
|
1020
1011
|
|
1021
1012
|
name = 'Ceylon'
|
@@ -1023,6 +1014,7 @@ class CeylonLexer(RegexLexer):
|
|
1023
1014
|
aliases = ['ceylon']
|
1024
1015
|
filenames = ['*.ceylon']
|
1025
1016
|
mimetypes = ['text/x-ceylon']
|
1017
|
+
version_added = '1.6'
|
1026
1018
|
|
1027
1019
|
flags = re.MULTILINE | re.DOTALL
|
1028
1020
|
|
@@ -1094,8 +1086,6 @@ class CeylonLexer(RegexLexer):
|
|
1094
1086
|
class KotlinLexer(RegexLexer):
|
1095
1087
|
"""
|
1096
1088
|
For Kotlin source code.
|
1097
|
-
|
1098
|
-
.. versionadded:: 1.5
|
1099
1089
|
"""
|
1100
1090
|
|
1101
1091
|
name = 'Kotlin'
|
@@ -1103,6 +1093,7 @@ class KotlinLexer(RegexLexer):
|
|
1103
1093
|
aliases = ['kotlin']
|
1104
1094
|
filenames = ['*.kt', '*.kts']
|
1105
1095
|
mimetypes = ['text/x-kotlin']
|
1096
|
+
version_added = '1.5'
|
1106
1097
|
|
1107
1098
|
flags = re.MULTILINE | re.DOTALL
|
1108
1099
|
|
@@ -1250,8 +1241,6 @@ class KotlinLexer(RegexLexer):
|
|
1250
1241
|
class XtendLexer(RegexLexer):
|
1251
1242
|
"""
|
1252
1243
|
For Xtend source code.
|
1253
|
-
|
1254
|
-
.. versionadded:: 1.6
|
1255
1244
|
"""
|
1256
1245
|
|
1257
1246
|
name = 'Xtend'
|
@@ -1259,6 +1248,7 @@ class XtendLexer(RegexLexer):
|
|
1259
1248
|
aliases = ['xtend']
|
1260
1249
|
filenames = ['*.xtend']
|
1261
1250
|
mimetypes = ['text/x-xtend']
|
1251
|
+
version_added = '1.6'
|
1262
1252
|
|
1263
1253
|
flags = re.MULTILINE | re.DOTALL
|
1264
1254
|
|
@@ -1279,7 +1269,7 @@ class XtendLexer(RegexLexer):
|
|
1279
1269
|
Keyword),
|
1280
1270
|
(r'(def|abstract|const|enum|extends|final|implements|native|private|'
|
1281
1271
|
r'protected|public|static|strictfp|super|synchronized|throws|'
|
1282
|
-
r'transient|volatile)\b', Keyword.Declaration),
|
1272
|
+
r'transient|volatile|val|var)\b', Keyword.Declaration),
|
1283
1273
|
(r'(boolean|byte|char|double|float|int|long|short|void)\b',
|
1284
1274
|
Keyword.Type),
|
1285
1275
|
(r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace)),
|
@@ -1316,8 +1306,6 @@ class XtendLexer(RegexLexer):
|
|
1316
1306
|
class PigLexer(RegexLexer):
|
1317
1307
|
"""
|
1318
1308
|
For Pig Latin source code.
|
1319
|
-
|
1320
|
-
.. versionadded:: 2.0
|
1321
1309
|
"""
|
1322
1310
|
|
1323
1311
|
name = 'Pig'
|
@@ -1325,6 +1313,7 @@ class PigLexer(RegexLexer):
|
|
1325
1313
|
aliases = ['pig']
|
1326
1314
|
filenames = ['*.pig']
|
1327
1315
|
mimetypes = ['text/x-pig']
|
1316
|
+
version_added = '2.0'
|
1328
1317
|
|
1329
1318
|
flags = re.MULTILINE | re.IGNORECASE
|
1330
1319
|
|
@@ -1384,14 +1373,13 @@ class PigLexer(RegexLexer):
|
|
1384
1373
|
class GoloLexer(RegexLexer):
|
1385
1374
|
"""
|
1386
1375
|
For Golo source code.
|
1387
|
-
|
1388
|
-
.. versionadded:: 2.0
|
1389
1376
|
"""
|
1390
1377
|
|
1391
1378
|
name = 'Golo'
|
1392
1379
|
url = 'http://golo-lang.org/'
|
1393
1380
|
filenames = ['*.golo']
|
1394
1381
|
aliases = ['golo']
|
1382
|
+
version_added = '2.0'
|
1395
1383
|
|
1396
1384
|
tokens = {
|
1397
1385
|
'root': [
|
@@ -1498,21 +1486,20 @@ class GoloLexer(RegexLexer):
|
|
1498
1486
|
class JasminLexer(RegexLexer):
|
1499
1487
|
"""
|
1500
1488
|
For Jasmin assembly code.
|
1501
|
-
|
1502
|
-
.. versionadded:: 2.0
|
1503
1489
|
"""
|
1504
1490
|
|
1505
1491
|
name = 'Jasmin'
|
1506
1492
|
url = 'http://jasmin.sourceforge.net/'
|
1507
1493
|
aliases = ['jasmin', 'jasminxt']
|
1508
1494
|
filenames = ['*.j']
|
1495
|
+
version_added = '2.0'
|
1509
1496
|
|
1510
1497
|
_whitespace = r' \n\t\r'
|
1511
|
-
_ws =
|
1512
|
-
_separator =
|
1513
|
-
_break =
|
1514
|
-
_name =
|
1515
|
-
_unqualified_name =
|
1498
|
+
_ws = rf'(?:[{_whitespace}]+)'
|
1499
|
+
_separator = rf'{_whitespace}:='
|
1500
|
+
_break = rf'(?=[{_separator}]|$)'
|
1501
|
+
_name = rf'[^{_separator}]+'
|
1502
|
+
_unqualified_name = rf'(?:[^{_separator}.;\[/]+)'
|
1516
1503
|
|
1517
1504
|
tokens = {
|
1518
1505
|
'default': [
|
@@ -1523,36 +1510,36 @@ class JasminLexer(RegexLexer):
|
|
1523
1510
|
(r':', Punctuation, 'label'),
|
1524
1511
|
(_ws, Whitespace),
|
1525
1512
|
(r';.*', Comment.Single),
|
1526
|
-
(
|
1527
|
-
(
|
1513
|
+
(rf'(\$[-+])?0x-?[\da-fA-F]+{_break}', Number.Hex),
|
1514
|
+
(rf'(\$[-+]|\+)?-?\d+{_break}', Number.Integer),
|
1528
1515
|
(r'-?(\d+\.\d*|\.\d+)([eE][-+]?\d+)?[fFdD]?'
|
1529
|
-
|
1530
|
-
(
|
1516
|
+
rf'[\x00-\x08\x0b\x0c\x0e-\x1f]*{_break}', Number.Float),
|
1517
|
+
(rf'\${_name}', Name.Variable),
|
1531
1518
|
|
1532
1519
|
# Directives
|
1533
|
-
(
|
1520
|
+
(rf'\.annotation{_break}', Keyword.Reserved, 'annotation'),
|
1534
1521
|
(r'(\.attribute|\.bytecode|\.debug|\.deprecated|\.enclosing|'
|
1535
1522
|
r'\.interface|\.line|\.signature|\.source|\.stack|\.var|abstract|'
|
1536
1523
|
r'annotation|bridge|class|default|enum|field|final|fpstrict|'
|
1537
1524
|
r'interface|native|private|protected|public|signature|static|'
|
1538
|
-
|
1525
|
+
rf'synchronized|synthetic|transient|varargs|volatile){_break}',
|
1539
1526
|
Keyword.Reserved),
|
1540
|
-
(
|
1527
|
+
(rf'\.catch{_break}', Keyword.Reserved, 'caught-exception'),
|
1541
1528
|
(r'(\.class|\.implements|\.inner|\.super|inner|invisible|'
|
1542
|
-
|
1529
|
+
rf'invisibleparam|outer|visible|visibleparam){_break}',
|
1543
1530
|
Keyword.Reserved, 'class/convert-dots'),
|
1544
|
-
(
|
1531
|
+
(rf'\.field{_break}', Keyword.Reserved,
|
1545
1532
|
('descriptor/convert-dots', 'field')),
|
1546
|
-
(
|
1533
|
+
(rf'(\.end|\.limit|use){_break}', Keyword.Reserved,
|
1547
1534
|
'no-verification'),
|
1548
|
-
(
|
1549
|
-
(
|
1550
|
-
(
|
1551
|
-
(
|
1552
|
-
(
|
1535
|
+
(rf'\.method{_break}', Keyword.Reserved, 'method'),
|
1536
|
+
(rf'\.set{_break}', Keyword.Reserved, 'var'),
|
1537
|
+
(rf'\.throws{_break}', Keyword.Reserved, 'exception'),
|
1538
|
+
(rf'(from|offset|to|using){_break}', Keyword.Reserved, 'label'),
|
1539
|
+
(rf'is{_break}', Keyword.Reserved,
|
1553
1540
|
('descriptor/convert-dots', 'var')),
|
1554
|
-
(
|
1555
|
-
(
|
1541
|
+
(rf'(locals|stack){_break}', Keyword.Reserved, 'verification'),
|
1542
|
+
(rf'method{_break}', Keyword.Reserved, 'enclosing-method'),
|
1556
1543
|
|
1557
1544
|
# Instructions
|
1558
1545
|
(words((
|
@@ -1578,14 +1565,14 @@ class JasminLexer(RegexLexer):
|
|
1578
1565
|
'lstore_1', 'lstore_2', 'lstore_3', 'lstore_w', 'lsub', 'lushr', 'lxor',
|
1579
1566
|
'monitorenter', 'monitorexit', 'nop', 'pop', 'pop2', 'ret', 'ret_w', 'return', 'saload',
|
1580
1567
|
'sastore', 'sipush', 'swap'), suffix=_break), Keyword.Reserved),
|
1581
|
-
(
|
1568
|
+
(rf'(anewarray|checkcast|instanceof|ldc|ldc_w|new){_break}',
|
1582
1569
|
Keyword.Reserved, 'class/no-dots'),
|
1583
1570
|
(r'invoke(dynamic|interface|nonvirtual|special|'
|
1584
|
-
|
1571
|
+
rf'static|virtual){_break}', Keyword.Reserved,
|
1585
1572
|
'invocation'),
|
1586
|
-
(
|
1573
|
+
(rf'(getfield|putfield){_break}', Keyword.Reserved,
|
1587
1574
|
('descriptor/no-dots', 'field')),
|
1588
|
-
(
|
1575
|
+
(rf'(getstatic|putstatic){_break}', Keyword.Reserved,
|
1589
1576
|
('descriptor/no-dots', 'static')),
|
1590
1577
|
(words((
|
1591
1578
|
'goto', 'goto_w', 'if_acmpeq', 'if_acmpne', 'if_icmpeq',
|
@@ -1593,9 +1580,9 @@ class JasminLexer(RegexLexer):
|
|
1593
1580
|
'ifeq', 'ifge', 'ifgt', 'ifle', 'iflt', 'ifne', 'ifnonnull',
|
1594
1581
|
'ifnull', 'jsr', 'jsr_w'), suffix=_break),
|
1595
1582
|
Keyword.Reserved, 'label'),
|
1596
|
-
(
|
1583
|
+
(rf'(multianewarray|newarray){_break}', Keyword.Reserved,
|
1597
1584
|
'descriptor/convert-dots'),
|
1598
|
-
(
|
1585
|
+
(rf'tableswitch{_break}', Keyword.Reserved, 'table')
|
1599
1586
|
],
|
1600
1587
|
'quote': [
|
1601
1588
|
(r"'", String.Single, '#pop'),
|
@@ -1612,25 +1599,25 @@ class JasminLexer(RegexLexer):
|
|
1612
1599
|
(r'\n+', Whitespace),
|
1613
1600
|
(r"'", String.Single, 'quote'),
|
1614
1601
|
include('default'),
|
1615
|
-
(
|
1602
|
+
(rf'({_name})([ \t\r]*)(:)',
|
1616
1603
|
bygroups(Name.Label, Whitespace, Punctuation)),
|
1617
1604
|
(_name, String.Other)
|
1618
1605
|
],
|
1619
1606
|
'annotation': [
|
1620
1607
|
(r'\n', Whitespace, ('#pop', 'annotation-body')),
|
1621
|
-
(
|
1608
|
+
(rf'default{_break}', Keyword.Reserved,
|
1622
1609
|
('#pop', 'annotation-default')),
|
1623
1610
|
include('default')
|
1624
1611
|
],
|
1625
1612
|
'annotation-body': [
|
1626
1613
|
(r'\n+', Whitespace),
|
1627
|
-
(
|
1614
|
+
(rf'\.end{_break}', Keyword.Reserved, '#pop'),
|
1628
1615
|
include('default'),
|
1629
1616
|
(_name, String.Other, ('annotation-items', 'descriptor/no-dots'))
|
1630
1617
|
],
|
1631
1618
|
'annotation-default': [
|
1632
1619
|
(r'\n+', Whitespace),
|
1633
|
-
(
|
1620
|
+
(rf'\.end{_break}', Keyword.Reserved, '#pop'),
|
1634
1621
|
include('default'),
|
1635
1622
|
default(('annotation-items', 'descriptor/no-dots'))
|
1636
1623
|
],
|
@@ -1640,42 +1627,42 @@ class JasminLexer(RegexLexer):
|
|
1640
1627
|
(_name, String.Other)
|
1641
1628
|
],
|
1642
1629
|
'caught-exception': [
|
1643
|
-
(
|
1630
|
+
(rf'all{_break}', Keyword, '#pop'),
|
1644
1631
|
include('exception')
|
1645
1632
|
],
|
1646
1633
|
'class/convert-dots': [
|
1647
1634
|
include('default'),
|
1648
|
-
(
|
1635
|
+
(rf'(L)((?:{_unqualified_name}[/.])*)({_name})(;)',
|
1649
1636
|
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
1650
1637
|
'#pop'),
|
1651
|
-
(
|
1638
|
+
(rf'((?:{_unqualified_name}[/.])*)({_name})',
|
1652
1639
|
bygroups(Name.Namespace, Name.Class), '#pop')
|
1653
1640
|
],
|
1654
1641
|
'class/no-dots': [
|
1655
1642
|
include('default'),
|
1656
1643
|
(r'\[+', Punctuation, ('#pop', 'descriptor/no-dots')),
|
1657
|
-
(
|
1644
|
+
(rf'(L)((?:{_unqualified_name}/)*)({_name})(;)',
|
1658
1645
|
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
1659
1646
|
'#pop'),
|
1660
|
-
(
|
1647
|
+
(rf'((?:{_unqualified_name}/)*)({_name})',
|
1661
1648
|
bygroups(Name.Namespace, Name.Class), '#pop')
|
1662
1649
|
],
|
1663
1650
|
'descriptor/convert-dots': [
|
1664
1651
|
include('default'),
|
1665
1652
|
(r'\[+', Punctuation),
|
1666
|
-
(
|
1653
|
+
(rf'(L)((?:{_unqualified_name}[/.])*)({_name}?)(;)',
|
1667
1654
|
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
1668
1655
|
'#pop'),
|
1669
|
-
(
|
1656
|
+
(rf'[^{_separator}\[)L]+', Keyword.Type, '#pop'),
|
1670
1657
|
default('#pop')
|
1671
1658
|
],
|
1672
1659
|
'descriptor/no-dots': [
|
1673
1660
|
include('default'),
|
1674
1661
|
(r'\[+', Punctuation),
|
1675
|
-
(
|
1662
|
+
(rf'(L)((?:{_unqualified_name}/)*)({_name})(;)',
|
1676
1663
|
bygroups(Keyword.Type, Name.Namespace, Name.Class, Punctuation),
|
1677
1664
|
'#pop'),
|
1678
|
-
(
|
1665
|
+
(rf'[^{_separator}\[)L]+', Keyword.Type, '#pop'),
|
1679
1666
|
default('#pop')
|
1680
1667
|
],
|
1681
1668
|
'descriptors/convert-dots': [
|
@@ -1684,26 +1671,24 @@ class JasminLexer(RegexLexer):
|
|
1684
1671
|
],
|
1685
1672
|
'enclosing-method': [
|
1686
1673
|
(_ws, Whitespace),
|
1687
|
-
(
|
1674
|
+
(rf'(?=[^{_separator}]*\()', Text, ('#pop', 'invocation')),
|
1688
1675
|
default(('#pop', 'class/convert-dots'))
|
1689
1676
|
],
|
1690
1677
|
'exception': [
|
1691
1678
|
include('default'),
|
1692
|
-
(
|
1679
|
+
(rf'((?:{_unqualified_name}[/.])*)({_name})',
|
1693
1680
|
bygroups(Name.Namespace, Name.Exception), '#pop')
|
1694
1681
|
],
|
1695
1682
|
'field': [
|
1696
|
-
(
|
1683
|
+
(rf'static{_break}', Keyword.Reserved, ('#pop', 'static')),
|
1697
1684
|
include('default'),
|
1698
|
-
(
|
1699
|
-
(_unqualified_name, _separator, _unqualified_name, _name),
|
1685
|
+
(rf'((?:{_unqualified_name}[/.](?=[^{_separator}]*[/.]))*)({_unqualified_name}[/.])?({_name})',
|
1700
1686
|
bygroups(Name.Namespace, Name.Class, Name.Variable.Instance),
|
1701
1687
|
'#pop')
|
1702
1688
|
],
|
1703
1689
|
'invocation': [
|
1704
1690
|
include('default'),
|
1705
|
-
(
|
1706
|
-
(_unqualified_name, _separator, _unqualified_name, _name),
|
1691
|
+
(rf'((?:{_unqualified_name}[/.](?=[^{_separator}(]*[/.]))*)({_unqualified_name}[/.])?({_name})(\()',
|
1707
1692
|
bygroups(Name.Namespace, Name.Class, Name.Function, Punctuation),
|
1708
1693
|
('#pop', 'descriptor/convert-dots', 'descriptors/convert-dots',
|
1709
1694
|
'descriptor/convert-dots'))
|
@@ -1714,23 +1699,22 @@ class JasminLexer(RegexLexer):
|
|
1714
1699
|
],
|
1715
1700
|
'method': [
|
1716
1701
|
include('default'),
|
1717
|
-
(
|
1702
|
+
(rf'({_name})(\()', bygroups(Name.Function, Punctuation),
|
1718
1703
|
('#pop', 'descriptor/convert-dots', 'descriptors/convert-dots',
|
1719
1704
|
'descriptor/convert-dots'))
|
1720
1705
|
],
|
1721
1706
|
'no-verification': [
|
1722
|
-
(
|
1707
|
+
(rf'(locals|method|stack){_break}', Keyword.Reserved, '#pop'),
|
1723
1708
|
include('default')
|
1724
1709
|
],
|
1725
1710
|
'static': [
|
1726
1711
|
include('default'),
|
1727
|
-
(
|
1728
|
-
(_unqualified_name, _separator, _unqualified_name, _name),
|
1712
|
+
(rf'((?:{_unqualified_name}[/.](?=[^{_separator}]*[/.]))*)({_unqualified_name}[/.])?({_name})',
|
1729
1713
|
bygroups(Name.Namespace, Name.Class, Name.Variable.Class), '#pop')
|
1730
1714
|
],
|
1731
1715
|
'table': [
|
1732
1716
|
(r'\n+', Whitespace),
|
1733
|
-
(
|
1717
|
+
(rf'default{_break}', Keyword.Reserved, '#pop'),
|
1734
1718
|
include('default'),
|
1735
1719
|
(_name, Name.Label)
|
1736
1720
|
],
|
@@ -1740,10 +1724,9 @@ class JasminLexer(RegexLexer):
|
|
1740
1724
|
],
|
1741
1725
|
'verification': [
|
1742
1726
|
include('default'),
|
1743
|
-
(
|
1744
|
-
|
1745
|
-
(
|
1746
|
-
(r'Uninitialized%s' % _break, Keyword, ('#pop', 'label'))
|
1727
|
+
(rf'(Double|Float|Integer|Long|Null|Top|UninitializedThis){_break}', Keyword, '#pop'),
|
1728
|
+
(rf'Object{_break}', Keyword, ('#pop', 'class/no-dots')),
|
1729
|
+
(rf'Uninitialized{_break}', Keyword, ('#pop', 'label'))
|
1747
1730
|
]
|
1748
1731
|
}
|
1749
1732
|
|
@@ -1763,8 +1746,6 @@ class JasminLexer(RegexLexer):
|
|
1763
1746
|
class SarlLexer(RegexLexer):
|
1764
1747
|
"""
|
1765
1748
|
For SARL source code.
|
1766
|
-
|
1767
|
-
.. versionadded:: 2.4
|
1768
1749
|
"""
|
1769
1750
|
|
1770
1751
|
name = 'SARL'
|
@@ -1772,6 +1753,7 @@ class SarlLexer(RegexLexer):
|
|
1772
1753
|
aliases = ['sarl']
|
1773
1754
|
filenames = ['*.sarl']
|
1774
1755
|
mimetypes = ['text/x-sarl']
|
1756
|
+
version_added = '2.4'
|
1775
1757
|
|
1776
1758
|
flags = re.MULTILINE | re.DOTALL
|
1777
1759
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for the Kuin language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -18,13 +18,12 @@ __all__ = ['KuinLexer']
|
|
18
18
|
class KuinLexer(RegexLexer):
|
19
19
|
"""
|
20
20
|
For Kuin source code.
|
21
|
-
|
22
|
-
.. versionadded:: 2.9
|
23
21
|
"""
|
24
22
|
name = 'Kuin'
|
25
23
|
url = 'https://github.com/kuina/Kuin'
|
26
24
|
aliases = ['kuin']
|
27
25
|
filenames = ['*.kn']
|
26
|
+
version_added = '2.9'
|
28
27
|
|
29
28
|
tokens = {
|
30
29
|
'root': [
|