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
|
Lexers for .net 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
|
import re
|
@@ -50,6 +50,7 @@ class CSharpLexer(RegexLexer):
|
|
50
50
|
aliases = ['csharp', 'c#', 'cs']
|
51
51
|
filenames = ['*.cs']
|
52
52
|
mimetypes = ['text/x-csharp'] # inferred
|
53
|
+
version_added = ''
|
53
54
|
|
54
55
|
flags = re.MULTILINE | re.DOTALL
|
55
56
|
|
@@ -164,8 +165,6 @@ class NemerleLexer(RegexLexer):
|
|
164
165
|
``Lo`` category has more than 40,000 characters in it!
|
165
166
|
|
166
167
|
The default value is ``basic``.
|
167
|
-
|
168
|
-
.. versionadded:: 1.5
|
169
168
|
"""
|
170
169
|
|
171
170
|
name = 'Nemerle'
|
@@ -173,6 +172,7 @@ class NemerleLexer(RegexLexer):
|
|
173
172
|
aliases = ['nemerle']
|
174
173
|
filenames = ['*.n']
|
175
174
|
mimetypes = ['text/x-nemerle'] # inferred
|
175
|
+
version_added = '1.5'
|
176
176
|
|
177
177
|
flags = re.MULTILINE | re.DOTALL
|
178
178
|
|
@@ -333,6 +333,7 @@ class BooLexer(RegexLexer):
|
|
333
333
|
aliases = ['boo']
|
334
334
|
filenames = ['*.boo']
|
335
335
|
mimetypes = ['text/x-boo']
|
336
|
+
version_added = ''
|
336
337
|
|
337
338
|
tokens = {
|
338
339
|
'root': [
|
@@ -399,9 +400,10 @@ class VbNetLexer(RegexLexer):
|
|
399
400
|
|
400
401
|
name = 'VB.net'
|
401
402
|
url = 'https://docs.microsoft.com/en-us/dotnet/visual-basic/'
|
402
|
-
aliases = ['vb.net', 'vbnet', 'lobas', 'oobas', 'sobas']
|
403
|
+
aliases = ['vb.net', 'vbnet', 'lobas', 'oobas', 'sobas', 'visual-basic', 'visualbasic']
|
403
404
|
filenames = ['*.vb', '*.bas']
|
404
405
|
mimetypes = ['text/x-vbnet', 'text/x-vba'] # (?)
|
406
|
+
version_added = ''
|
405
407
|
|
406
408
|
uni_name = '[_' + uni.combine('Ll', 'Lt', 'Lm', 'Nl') + ']' + \
|
407
409
|
'[' + uni.combine('Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
|
@@ -510,6 +512,7 @@ class GenericAspxLexer(RegexLexer):
|
|
510
512
|
name = 'aspx-gen'
|
511
513
|
filenames = []
|
512
514
|
mimetypes = []
|
515
|
+
url = 'https://dotnet.microsoft.com/en-us/apps/aspnet'
|
513
516
|
|
514
517
|
flags = re.DOTALL
|
515
518
|
|
@@ -535,6 +538,8 @@ class CSharpAspxLexer(DelegatingLexer):
|
|
535
538
|
aliases = ['aspx-cs']
|
536
539
|
filenames = ['*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd']
|
537
540
|
mimetypes = []
|
541
|
+
url = 'https://dotnet.microsoft.com/en-us/apps/aspnet'
|
542
|
+
version_added = ''
|
538
543
|
|
539
544
|
def __init__(self, **options):
|
540
545
|
super().__init__(CSharpLexer, GenericAspxLexer, **options)
|
@@ -555,6 +560,8 @@ class VbNetAspxLexer(DelegatingLexer):
|
|
555
560
|
aliases = ['aspx-vb']
|
556
561
|
filenames = ['*.aspx', '*.asax', '*.ascx', '*.ashx', '*.asmx', '*.axd']
|
557
562
|
mimetypes = []
|
563
|
+
url = 'https://dotnet.microsoft.com/en-us/apps/aspnet'
|
564
|
+
version_added = ''
|
558
565
|
|
559
566
|
def __init__(self, **options):
|
560
567
|
super().__init__(VbNetLexer, GenericAspxLexer, **options)
|
@@ -570,8 +577,6 @@ class VbNetAspxLexer(DelegatingLexer):
|
|
570
577
|
class FSharpLexer(RegexLexer):
|
571
578
|
"""
|
572
579
|
For the F# language (version 3.0).
|
573
|
-
|
574
|
-
.. versionadded:: 1.5
|
575
580
|
"""
|
576
581
|
|
577
582
|
name = 'F#'
|
@@ -579,6 +584,7 @@ class FSharpLexer(RegexLexer):
|
|
579
584
|
aliases = ['fsharp', 'f#']
|
580
585
|
filenames = ['*.fs', '*.fsi', '*.fsx']
|
581
586
|
mimetypes = ['text/x-fsharp']
|
587
|
+
version_added = '1.5'
|
582
588
|
|
583
589
|
keywords = [
|
584
590
|
'abstract', 'as', 'assert', 'base', 'begin', 'class', 'default',
|
@@ -649,12 +655,12 @@ class FSharpLexer(RegexLexer):
|
|
649
655
|
bygroups(Keyword, Whitespace, Name.Class)),
|
650
656
|
(r'\b(member|override)(\s+)(\w+)(\.)(\w+)',
|
651
657
|
bygroups(Keyword, Whitespace, Name, Punctuation, Name.Function)),
|
652
|
-
(r'\b(
|
658
|
+
(r'\b({})\b'.format('|'.join(keywords)), Keyword),
|
653
659
|
(r'``([^`\n\r\t]|`[^`\n\r\t])+``', Name),
|
654
|
-
(r'(
|
655
|
-
(
|
656
|
-
(r'\b(
|
657
|
-
(r'\b(
|
660
|
+
(r'({})'.format('|'.join(keyopts)), Operator),
|
661
|
+
(rf'({infix_syms}|{prefix_syms})?{operators}', Operator),
|
662
|
+
(r'\b({})\b'.format('|'.join(word_operators)), Operator.Word),
|
663
|
+
(r'\b({})\b'.format('|'.join(primitives)), Keyword.Type),
|
658
664
|
(r'(#)([ \t]*)(if|endif|else|line|nowarn|light|\d+)\b(.*?)(\n)',
|
659
665
|
bygroups(Comment.Preproc, Whitespace, Comment.Preproc,
|
660
666
|
Comment.Preproc, Whitespace)),
|
@@ -733,21 +739,20 @@ class XppLexer(RegexLexer):
|
|
733
739
|
|
734
740
|
"""
|
735
741
|
For X++ source code. This is based loosely on the CSharpLexer
|
736
|
-
|
737
|
-
.. versionadded:: 2.15
|
738
742
|
"""
|
739
743
|
|
740
744
|
name = 'X++'
|
741
745
|
url = 'https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-language-reference'
|
742
746
|
aliases = ['xpp', 'x++']
|
743
747
|
filenames = ['*.xpp']
|
748
|
+
version_added = '2.15'
|
744
749
|
|
745
750
|
flags = re.MULTILINE
|
746
751
|
|
747
752
|
XPP_CHARS = ('@?(?:_|[^' +
|
748
753
|
uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl') + '])' +
|
749
754
|
'[^' + uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl',
|
750
|
-
'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*')
|
755
|
+
'Nd', 'Pc', 'Cf', 'Mn', 'Mc') + ']*')
|
751
756
|
# Temporary, see
|
752
757
|
# https://github.com/thatch/regexlint/pull/49
|
753
758
|
XPP_CHARS = XPP_CHARS.replace('\x00', '\x01')
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for various domain-specific 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
|
|
@@ -23,14 +23,13 @@ __all__ = ['ProtoBufLexer', 'ZeekLexer', 'PuppetLexer', 'RslLexer',
|
|
23
23
|
class ProtoBufLexer(RegexLexer):
|
24
24
|
"""
|
25
25
|
Lexer for Protocol Buffer definition files.
|
26
|
-
|
27
|
-
.. versionadded:: 1.4
|
28
26
|
"""
|
29
27
|
|
30
28
|
name = 'Protocol Buffer'
|
31
29
|
url = 'https://developers.google.com/protocol-buffers/'
|
32
30
|
aliases = ['protobuf', 'proto']
|
33
31
|
filenames = ['*.proto']
|
32
|
+
version_added = '1.4'
|
34
33
|
|
35
34
|
tokens = {
|
36
35
|
'root': [
|
@@ -85,14 +84,13 @@ class ProtoBufLexer(RegexLexer):
|
|
85
84
|
class ThriftLexer(RegexLexer):
|
86
85
|
"""
|
87
86
|
For Thrift interface definitions.
|
88
|
-
|
89
|
-
.. versionadded:: 2.1
|
90
87
|
"""
|
91
88
|
name = 'Thrift'
|
92
89
|
url = 'https://thrift.apache.org/'
|
93
90
|
aliases = ['thrift']
|
94
91
|
filenames = ['*.thrift']
|
95
92
|
mimetypes = ['application/x-thrift']
|
93
|
+
version_added = '2.1'
|
96
94
|
|
97
95
|
tokens = {
|
98
96
|
'root': [
|
@@ -191,13 +189,12 @@ class ThriftLexer(RegexLexer):
|
|
191
189
|
class ZeekLexer(RegexLexer):
|
192
190
|
"""
|
193
191
|
For Zeek scripts.
|
194
|
-
|
195
|
-
.. versionadded:: 2.5
|
196
192
|
"""
|
197
193
|
name = 'Zeek'
|
198
194
|
url = 'https://www.zeek.org/'
|
199
195
|
aliases = ['zeek', 'bro']
|
200
196
|
filenames = ['*.zeek', '*.bro']
|
197
|
+
version_added = '2.5'
|
201
198
|
|
202
199
|
_hex = r'[0-9a-fA-F]'
|
203
200
|
_float = r'((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?'
|
@@ -353,13 +350,12 @@ BroLexer = ZeekLexer
|
|
353
350
|
class PuppetLexer(RegexLexer):
|
354
351
|
"""
|
355
352
|
For Puppet configuration DSL.
|
356
|
-
|
357
|
-
.. versionadded:: 1.6
|
358
353
|
"""
|
359
354
|
name = 'Puppet'
|
360
355
|
url = 'https://puppet.com/'
|
361
356
|
aliases = ['puppet']
|
362
357
|
filenames = ['*.pp']
|
358
|
+
version_added = '1.6'
|
363
359
|
|
364
360
|
tokens = {
|
365
361
|
'root': [
|
@@ -443,14 +439,13 @@ class RslLexer(RegexLexer):
|
|
443
439
|
RSL is the formal specification
|
444
440
|
language used in RAISE (Rigorous Approach to Industrial Software Engineering)
|
445
441
|
method.
|
446
|
-
|
447
|
-
.. versionadded:: 2.0
|
448
442
|
"""
|
449
443
|
name = 'RSL'
|
450
444
|
url = 'http://en.wikipedia.org/wiki/RAISE'
|
451
445
|
aliases = ['rsl']
|
452
446
|
filenames = ['*.rsl']
|
453
447
|
mimetypes = ['text/rsl']
|
448
|
+
version_added = '2.0'
|
454
449
|
|
455
450
|
flags = re.MULTILINE | re.DOTALL
|
456
451
|
|
@@ -505,13 +500,12 @@ class RslLexer(RegexLexer):
|
|
505
500
|
class MscgenLexer(RegexLexer):
|
506
501
|
"""
|
507
502
|
For Mscgen files.
|
508
|
-
|
509
|
-
.. versionadded:: 1.6
|
510
503
|
"""
|
511
504
|
name = 'Mscgen'
|
512
505
|
url = 'http://www.mcternan.me.uk/mscgen/'
|
513
506
|
aliases = ['mscgen', 'msc']
|
514
507
|
filenames = ['*.msc']
|
508
|
+
version_added = '1.6'
|
515
509
|
|
516
510
|
_var = r'(\w+|"(?:\\"|[^"])*")'
|
517
511
|
|
@@ -555,13 +549,12 @@ class MscgenLexer(RegexLexer):
|
|
555
549
|
class VGLLexer(RegexLexer):
|
556
550
|
"""
|
557
551
|
For SampleManager VGL source code.
|
558
|
-
|
559
|
-
.. versionadded:: 1.6
|
560
552
|
"""
|
561
553
|
name = 'VGL'
|
562
554
|
url = 'http://www.thermoscientific.com/samplemanager'
|
563
555
|
aliases = ['vgl']
|
564
556
|
filenames = ['*.rpf']
|
557
|
+
version_added = '1.6'
|
565
558
|
|
566
559
|
flags = re.MULTILINE | re.DOTALL | re.IGNORECASE
|
567
560
|
|
@@ -589,8 +582,6 @@ class VGLLexer(RegexLexer):
|
|
589
582
|
class AlloyLexer(RegexLexer):
|
590
583
|
"""
|
591
584
|
For Alloy source code.
|
592
|
-
|
593
|
-
.. versionadded:: 2.0
|
594
585
|
"""
|
595
586
|
|
596
587
|
name = 'Alloy'
|
@@ -598,6 +589,7 @@ class AlloyLexer(RegexLexer):
|
|
598
589
|
aliases = ['alloy']
|
599
590
|
filenames = ['*.als']
|
600
591
|
mimetypes = ['text/x-alloy']
|
592
|
+
version_added = '2.0'
|
601
593
|
|
602
594
|
flags = re.MULTILINE | re.DOTALL
|
603
595
|
|
@@ -660,14 +652,13 @@ class PanLexer(RegexLexer):
|
|
660
652
|
Lexer for pan source files.
|
661
653
|
|
662
654
|
Based on tcsh lexer.
|
663
|
-
|
664
|
-
.. versionadded:: 2.0
|
665
655
|
"""
|
666
656
|
|
667
657
|
name = 'Pan'
|
668
658
|
url = 'https://github.com/quattor/pan/'
|
669
659
|
aliases = ['pan']
|
670
660
|
filenames = ['*.pan']
|
661
|
+
version_added = '2.0'
|
671
662
|
|
672
663
|
tokens = {
|
673
664
|
'root': [
|
@@ -727,14 +718,13 @@ class PanLexer(RegexLexer):
|
|
727
718
|
class CrmshLexer(RegexLexer):
|
728
719
|
"""
|
729
720
|
Lexer for crmsh configuration files for Pacemaker clusters.
|
730
|
-
|
731
|
-
.. versionadded:: 2.1
|
732
721
|
"""
|
733
722
|
name = 'Crmsh'
|
734
723
|
url = 'http://crmsh.github.io/'
|
735
724
|
aliases = ['crmsh', 'pcmk']
|
736
725
|
filenames = ['*.crmsh', '*.pcmk']
|
737
726
|
mimetypes = []
|
727
|
+
version_added = '2.1'
|
738
728
|
|
739
729
|
elem = words((
|
740
730
|
'node', 'primitive', 'group', 'clone', 'ms', 'location',
|
@@ -773,7 +763,7 @@ class CrmshLexer(RegexLexer):
|
|
773
763
|
(sub, Keyword),
|
774
764
|
(acl, Keyword),
|
775
765
|
# binary operators
|
776
|
-
(
|
766
|
+
(rf'(?:{val_qual}:)?({bin_ops})(?![\w#$-])', Operator.Word),
|
777
767
|
# other operators
|
778
768
|
(bin_rel, Operator.Word),
|
779
769
|
(un_ops, Operator.Word),
|
@@ -781,11 +771,11 @@ class CrmshLexer(RegexLexer):
|
|
781
771
|
# builtin attributes (e.g. #uname)
|
782
772
|
(r'#[a-z]+(?![\w#$-])', Name.Builtin),
|
783
773
|
# acl_mod:blah
|
784
|
-
(
|
774
|
+
(rf'({acl_mod})(:)("(?:""|[^"])*"|\S+)',
|
785
775
|
bygroups(Keyword, Punctuation, Name)),
|
786
776
|
# rsc_id[:(role|action)]
|
787
777
|
# NB: this matches all other identifiers
|
788
|
-
(
|
778
|
+
(rf'([\w#$-]+)(?:(:)({rsc_role_action}))?(?![\w#$-])',
|
789
779
|
bygroups(Name, Punctuation, Operator.Word)),
|
790
780
|
# punctuation
|
791
781
|
(r'(\\(?=\n)|[\[\](){}/:@])', Punctuation),
|
@@ -797,14 +787,13 @@ class CrmshLexer(RegexLexer):
|
|
797
787
|
class FlatlineLexer(RegexLexer):
|
798
788
|
"""
|
799
789
|
Lexer for Flatline expressions.
|
800
|
-
|
801
|
-
.. versionadded:: 2.2
|
802
790
|
"""
|
803
791
|
name = 'Flatline'
|
804
792
|
url = 'https://github.com/bigmlcom/flatline'
|
805
793
|
aliases = ['flatline']
|
806
794
|
filenames = []
|
807
795
|
mimetypes = ['text/x-flatline']
|
796
|
+
version_added = '2.2'
|
808
797
|
|
809
798
|
special_forms = ('let',)
|
810
799
|
|
@@ -874,14 +863,13 @@ class FlatlineLexer(RegexLexer):
|
|
874
863
|
class SnowballLexer(ExtendedRegexLexer):
|
875
864
|
"""
|
876
865
|
Lexer for Snowball source code.
|
877
|
-
|
878
|
-
.. versionadded:: 2.2
|
879
866
|
"""
|
880
867
|
|
881
868
|
name = 'Snowball'
|
882
|
-
url = '
|
869
|
+
url = 'https://snowballstem.org/'
|
883
870
|
aliases = ['snowball']
|
884
871
|
filenames = ['*.sbl']
|
872
|
+
version_added = '2.2'
|
885
873
|
|
886
874
|
_ws = r'\n\r\t '
|
887
875
|
|
@@ -897,8 +885,8 @@ class SnowballLexer(ExtendedRegexLexer):
|
|
897
885
|
def callback(lexer, match, ctx):
|
898
886
|
s = match.start()
|
899
887
|
text = match.group()
|
900
|
-
string = re.compile(
|
901
|
-
escape = re.compile(
|
888
|
+
string = re.compile(rf'([^{re.escape(lexer._start)}]*)(.)').match
|
889
|
+
escape = re.compile(rf'([^{re.escape(lexer._end)}]*)(.)').match
|
902
890
|
pos = 0
|
903
891
|
do_string = do_string_first
|
904
892
|
while pos < len(text):
|
@@ -929,11 +917,12 @@ class SnowballLexer(ExtendedRegexLexer):
|
|
929
917
|
|
930
918
|
tokens = {
|
931
919
|
'root': [
|
932
|
-
(
|
920
|
+
(r'len\b', Name.Builtin),
|
921
|
+
(r'lenof\b', Operator.Word),
|
933
922
|
include('root1'),
|
934
923
|
],
|
935
924
|
'root1': [
|
936
|
-
(
|
925
|
+
(rf'[{_ws}]+', Whitespace),
|
937
926
|
(r'\d+', Number.Integer),
|
938
927
|
(r"'", String.Single, 'string'),
|
939
928
|
(r'[()]', Punctuation),
|
@@ -956,9 +945,9 @@ class SnowballLexer(ExtendedRegexLexer):
|
|
956
945
|
(words(('size', 'limit', 'cursor', 'maxint', 'minint'),
|
957
946
|
suffix=r'\b'),
|
958
947
|
Name.Builtin),
|
959
|
-
(
|
948
|
+
(rf'(stringdef\b)([{_ws}]*)([^{_ws}]+)',
|
960
949
|
bygroups(Keyword.Reserved, Whitespace, String.Escape)),
|
961
|
-
(
|
950
|
+
(rf'(stringescapes\b)([{_ws}]*)(.)([{_ws}]*)(.)',
|
962
951
|
_stringescapes),
|
963
952
|
(r'[A-Za-z]\w*', Name),
|
964
953
|
],
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for the Dylan 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
|
|
@@ -21,8 +21,6 @@ __all__ = ['DylanLexer', 'DylanConsoleLexer', 'DylanLidLexer']
|
|
21
21
|
class DylanLexer(RegexLexer):
|
22
22
|
"""
|
23
23
|
For the Dylan language.
|
24
|
-
|
25
|
-
.. versionadded:: 0.7
|
26
24
|
"""
|
27
25
|
|
28
26
|
name = 'Dylan'
|
@@ -30,6 +28,7 @@ class DylanLexer(RegexLexer):
|
|
30
28
|
aliases = ['dylan']
|
31
29
|
filenames = ['*.dylan', '*.dyl', '*.intr']
|
32
30
|
mimetypes = ['text/x-dylan']
|
31
|
+
version_added = '0.7'
|
33
32
|
|
34
33
|
flags = re.IGNORECASE
|
35
34
|
|
@@ -214,15 +213,14 @@ class DylanLexer(RegexLexer):
|
|
214
213
|
class DylanLidLexer(RegexLexer):
|
215
214
|
"""
|
216
215
|
For Dylan LID (Library Interchange Definition) files.
|
217
|
-
|
218
|
-
.. versionadded:: 1.6
|
219
216
|
"""
|
220
217
|
|
221
218
|
name = 'DylanLID'
|
222
219
|
aliases = ['dylan-lid', 'lid']
|
223
220
|
filenames = ['*.lid', '*.hdp']
|
224
221
|
mimetypes = ['text/x-dylan-lid']
|
225
|
-
|
222
|
+
url = 'http://www.opendylan.org/'
|
223
|
+
version_added = '1.6'
|
226
224
|
flags = re.IGNORECASE
|
227
225
|
|
228
226
|
tokens = {
|
@@ -242,23 +240,17 @@ class DylanLidLexer(RegexLexer):
|
|
242
240
|
|
243
241
|
class DylanConsoleLexer(Lexer):
|
244
242
|
"""
|
245
|
-
For Dylan interactive console output
|
246
|
-
|
247
|
-
.. sourcecode:: dylan-console
|
248
|
-
|
249
|
-
? let a = 1;
|
250
|
-
=> 1
|
251
|
-
? a
|
252
|
-
=> 1
|
243
|
+
For Dylan interactive console output.
|
253
244
|
|
254
245
|
This is based on a copy of the RubyConsoleLexer.
|
255
|
-
|
256
|
-
.. versionadded:: 1.6
|
257
246
|
"""
|
258
247
|
name = 'Dylan session'
|
259
248
|
aliases = ['dylan-console', 'dylan-repl']
|
260
249
|
filenames = ['*.dylan-console']
|
261
250
|
mimetypes = ['text/x-dylan-console']
|
251
|
+
url = 'http://www.opendylan.org/'
|
252
|
+
version_added = '1.6'
|
253
|
+
_example = 'dylan-console/console'
|
262
254
|
|
263
255
|
_prompt_re = re.compile(r'\?| ')
|
264
256
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for the ECL 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
|
|
@@ -20,8 +20,6 @@ __all__ = ['ECLLexer']
|
|
20
20
|
class ECLLexer(RegexLexer):
|
21
21
|
"""
|
22
22
|
Lexer for the declarative big-data ECL language.
|
23
|
-
|
24
|
-
.. versionadded:: 1.5
|
25
23
|
"""
|
26
24
|
|
27
25
|
name = 'ECL'
|
@@ -29,6 +27,7 @@ class ECLLexer(RegexLexer):
|
|
29
27
|
aliases = ['ecl']
|
30
28
|
filenames = ['*.ecl']
|
31
29
|
mimetypes = ['application/x-ecl']
|
30
|
+
version_added = '1.5'
|
32
31
|
|
33
32
|
flags = re.IGNORECASE | re.MULTILINE
|
34
33
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for the Eiffel 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,14 +18,13 @@ __all__ = ['EiffelLexer']
|
|
18
18
|
class EiffelLexer(RegexLexer):
|
19
19
|
"""
|
20
20
|
For Eiffel source code.
|
21
|
-
|
22
|
-
.. versionadded:: 2.0
|
23
21
|
"""
|
24
22
|
name = 'Eiffel'
|
25
|
-
url = '
|
23
|
+
url = 'https://www.eiffel.com'
|
26
24
|
aliases = ['eiffel']
|
27
25
|
filenames = ['*.e']
|
28
26
|
mimetypes = ['text/x-eiffel']
|
27
|
+
version_added = '2.0'
|
29
28
|
|
30
29
|
tokens = {
|
31
30
|
'root': [
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for the Elm programming 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,15 +18,14 @@ __all__ = ['ElmLexer']
|
|
18
18
|
class ElmLexer(RegexLexer):
|
19
19
|
"""
|
20
20
|
For Elm source code.
|
21
|
-
|
22
|
-
.. versionadded:: 2.1
|
23
21
|
"""
|
24
22
|
|
25
23
|
name = 'Elm'
|
26
|
-
url = '
|
24
|
+
url = 'https://elm-lang.org/'
|
27
25
|
aliases = ['elm']
|
28
26
|
filenames = ['*.elm']
|
29
27
|
mimetypes = ['text/x-elm']
|
28
|
+
version_added = '2.1'
|
30
29
|
|
31
30
|
validName = r'[a-z_][a-zA-Z0-9_\']*'
|
32
31
|
|
@@ -4,13 +4,13 @@
|
|
4
4
|
|
5
5
|
Lexer for the `Elpi <http://github.com/LPCIC/elpi>`_ programming 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
|
|
11
11
|
from pygments.lexer import RegexLexer, bygroups, include
|
12
12
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
13
|
-
Number
|
13
|
+
Number, Punctuation
|
14
14
|
|
15
15
|
__all__ = ['ElpiLexer']
|
16
16
|
|
@@ -18,8 +18,6 @@ __all__ = ['ElpiLexer']
|
|
18
18
|
class ElpiLexer(RegexLexer):
|
19
19
|
"""
|
20
20
|
Lexer for the Elpi programming language.
|
21
|
-
|
22
|
-
.. versionadded:: 2.11
|
23
21
|
"""
|
24
22
|
|
25
23
|
name = 'Elpi'
|
@@ -27,19 +25,20 @@ class ElpiLexer(RegexLexer):
|
|
27
25
|
aliases = ['elpi']
|
28
26
|
filenames = ['*.elpi']
|
29
27
|
mimetypes = ['text/x-elpi']
|
28
|
+
version_added = '2.11'
|
30
29
|
|
31
30
|
lcase_re = r"[a-z]"
|
32
31
|
ucase_re = r"[A-Z]"
|
33
32
|
digit_re = r"[0-9]"
|
34
33
|
schar2_re = r"([+*^?/<>`'@#~=&!])"
|
35
|
-
schar_re =
|
36
|
-
idchar_re =
|
37
|
-
idcharstarns_re =
|
38
|
-
symbchar_re =
|
39
|
-
constant_re =
|
34
|
+
schar_re = rf"({schar2_re}|-|\$|_)"
|
35
|
+
idchar_re = rf"({lcase_re}|{ucase_re}|{digit_re}|{schar_re})"
|
36
|
+
idcharstarns_re = rf"({idchar_re}*(\.({lcase_re}|{ucase_re}){idchar_re}*)*)"
|
37
|
+
symbchar_re = rf"({lcase_re}|{ucase_re}|{digit_re}|{schar_re}|:)"
|
38
|
+
constant_re = rf"({ucase_re}{idchar_re}*|{lcase_re}{idcharstarns_re}|{schar2_re}{symbchar_re}*|_{idchar_re}+)"
|
40
39
|
symbol_re = r"(,|<=>|->|:-|;|\?-|->|&|=>|\bas\b|\buvar\b|<|=<|=|==|>=|>|\bi<|\bi=<|\bi>=|\bi>|\bis\b|\br<|\br=<|\br>=|\br>|\bs<|\bs=<|\bs>=|\bs>|@|::|\[\]|`->|`:|`:=|\^|-|\+|\bi-|\bi\+|r-|r\+|/|\*|\bdiv\b|\bi\*|\bmod\b|\br\*|~|\bi~|\br~)"
|
41
|
-
escape_re =
|
42
|
-
const_sym_re =
|
40
|
+
escape_re = rf"\(({constant_re}|{symbol_re})\)"
|
41
|
+
const_sym_re = rf"({constant_re}|{symbol_re}|{escape_re})"
|
43
42
|
|
44
43
|
tokens = {
|
45
44
|
'root': [
|
@@ -54,40 +53,41 @@ class ElpiLexer(RegexLexer):
|
|
54
53
|
'elpi-string'),
|
55
54
|
(r"(:index)(\s*\()", bygroups(Keyword.Mode, Text.Whitespace),
|
56
55
|
'elpi-indexing-expr'),
|
57
|
-
(
|
56
|
+
(rf"\b(external pred|pred)(\s+)({const_sym_re})",
|
58
57
|
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
59
58
|
'elpi-pred-item'),
|
60
|
-
(
|
59
|
+
(rf"\b(external type|type)(\s+)(({const_sym_re}(,\s*)?)+)",
|
61
60
|
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
62
61
|
'elpi-type'),
|
63
|
-
(
|
62
|
+
(rf"\b(kind)(\s+)(({const_sym_re}|,)+)",
|
64
63
|
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
65
64
|
'elpi-type'),
|
66
|
-
(
|
65
|
+
(rf"\b(typeabbrev)(\s+)({const_sym_re})",
|
67
66
|
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
68
67
|
'elpi-type'),
|
69
68
|
(r"\b(accumulate)(\s+)(\")",
|
70
69
|
bygroups(Keyword.Declaration, Text.Whitespace, String.Double),
|
71
70
|
'elpi-string'),
|
72
|
-
(
|
71
|
+
(rf"\b(accumulate|namespace|local)(\s+)({constant_re})",
|
73
72
|
bygroups(Keyword.Declaration, Text.Whitespace, Text)),
|
74
|
-
(
|
73
|
+
(rf"\b(shorten)(\s+)({constant_re}\.)",
|
75
74
|
bygroups(Keyword.Declaration, Text.Whitespace, Text)),
|
76
75
|
(r"\b(pi|sigma)(\s+)([a-zA-Z][A-Za-z0-9_ ]*)(\\)",
|
77
76
|
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable, Text)),
|
78
|
-
(
|
77
|
+
(rf"\b(constraint)(\s+)(({const_sym_re}(\s+)?)+)",
|
79
78
|
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
80
79
|
'elpi-chr-rule-start'),
|
81
80
|
|
82
|
-
(
|
83
|
-
(
|
81
|
+
(rf"(?=[A-Z_]){constant_re}", Name.Variable),
|
82
|
+
(rf"(?=[a-z_]){constant_re}\\", Name.Variable),
|
84
83
|
(r"_", Name.Variable),
|
85
|
-
(
|
84
|
+
(rf"({symbol_re}|!|=>|;)", Keyword.Declaration),
|
86
85
|
(constant_re, Text),
|
87
86
|
(r"\[|\]|\||=>", Keyword.Declaration),
|
88
87
|
(r'"', String.Double, 'elpi-string'),
|
89
88
|
(r'`', String.Double, 'elpi-btick'),
|
90
89
|
(r'\'', String.Double, 'elpi-tick'),
|
90
|
+
(r'\{\{', Punctuation, 'elpi-quote'),
|
91
91
|
(r'\{[^\{]', Text, 'elpi-spill'),
|
92
92
|
(r"\(", Text, 'elpi-in-parens'),
|
93
93
|
(r'\d[\d_]*', Number.Integer),
|
@@ -151,6 +151,13 @@ class ElpiLexer(RegexLexer):
|
|
151
151
|
(r'[^\"]+', String.Double),
|
152
152
|
(r'"', String.Double, '#pop'),
|
153
153
|
],
|
154
|
+
'elpi-quote': [
|
155
|
+
(r'\{\{', Punctuation, '#push'),
|
156
|
+
(r'\}\}', Punctuation, '#pop'),
|
157
|
+
(rf"(lp:)((?=[A-Z_]){constant_re})", bygroups(Keyword, Name.Variable)),
|
158
|
+
(r"[^l\}]+", Text),
|
159
|
+
(r"l|\}", Text),
|
160
|
+
],
|
154
161
|
'elpi-spill': [
|
155
162
|
(r'\{[^\{]', Text, '#push'),
|
156
163
|
(r'\}[^\}]', Text, '#pop'),
|