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
|
Lexer for Tera Term macro files.
|
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,14 +20,13 @@ __all__ = ['TeraTermLexer']
|
|
20
20
|
class TeraTermLexer(RegexLexer):
|
21
21
|
"""
|
22
22
|
For Tera Term macro source code.
|
23
|
-
|
24
|
-
.. versionadded:: 2.4
|
25
23
|
"""
|
26
24
|
name = 'Tera Term macro'
|
27
25
|
url = 'https://ttssh2.osdn.jp/'
|
28
26
|
aliases = ['teratermmacro', 'teraterm', 'ttl']
|
29
27
|
filenames = ['*.ttl']
|
30
28
|
mimetypes = ['text/x-teratermmacro']
|
29
|
+
version_added = '2.4'
|
31
30
|
|
32
31
|
tokens = {
|
33
32
|
'root': [
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for testing 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
|
|
@@ -17,13 +17,13 @@ __all__ = ['GherkinLexer', 'TAPLexer']
|
|
17
17
|
class GherkinLexer(RegexLexer):
|
18
18
|
"""
|
19
19
|
For Gherkin syntax.
|
20
|
-
|
21
|
-
.. versionadded:: 1.2
|
22
20
|
"""
|
23
21
|
name = 'Gherkin'
|
24
22
|
aliases = ['gherkin', 'cucumber']
|
25
23
|
filenames = ['*.feature']
|
26
24
|
mimetypes = ['text/x-gherkin']
|
25
|
+
url = 'https://cucumber.io/docs/gherkin'
|
26
|
+
version_added = '1.2'
|
27
27
|
|
28
28
|
feature_keywords = '^(기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Фича|Особина|Могућност|Özellik|Właściwość|Tính năng|Trajto|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd)(:)(.*)$'
|
29
29
|
feature_element_keywords = '^(\\s*)(시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|剧本大纲|剧本|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|سيناريو مخطط|سيناريو|الخلفية|תרחיש|תבנית תרחיש|רקע|Тарих|Сценарій|Сценарио|Сценарий структураси|Сценарий|Структура сценарію|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Пример|Предыстория|Предистория|Позадина|Передумова|Основа|Концепт|Контекст|Założenia|Wharrimean is|Tình huống|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenaro|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenarijaus šablonas|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Konturo de la scenaro|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Fono|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l\'escenari|Escenario|Escenari|Dis is what went down|Dasar|Contexto|Contexte|Contesto|Condiţii|Conditii|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y\'all|Achtergrond|Abstrakt Scenario|Abstract Scenario)(:)(.*)$'
|
@@ -136,13 +136,12 @@ class GherkinLexer(RegexLexer):
|
|
136
136
|
class TAPLexer(RegexLexer):
|
137
137
|
"""
|
138
138
|
For Test Anything Protocol (TAP) output.
|
139
|
-
|
140
|
-
.. versionadded:: 2.1
|
141
139
|
"""
|
142
140
|
name = 'TAP'
|
143
141
|
url = 'https://testanything.org/'
|
144
142
|
aliases = ['tap']
|
145
143
|
filenames = ['*.tap']
|
144
|
+
version_added = '2.1'
|
146
145
|
|
147
146
|
tokens = {
|
148
147
|
'root': [
|
@@ -4,10 +4,11 @@
|
|
4
4
|
|
5
5
|
Lexers for non-source code file types.
|
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
|
+
# ruff: noqa: F401
|
11
12
|
from pygments.lexers.configs import ApacheConfLexer, NginxConfLexer, \
|
12
13
|
SquidConfLexer, LighttpdConfLexer, IniLexer, RegeditLexer, PropertiesLexer, \
|
13
14
|
UnixConfigLexer
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for languages related to text processing.
|
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
|
|
@@ -22,14 +22,14 @@ __all__ = ['AwkLexer', 'SedLexer', 'VimLexer']
|
|
22
22
|
class AwkLexer(RegexLexer):
|
23
23
|
"""
|
24
24
|
For Awk scripts.
|
25
|
-
|
26
|
-
.. versionadded:: 1.5
|
27
25
|
"""
|
28
26
|
|
29
27
|
name = 'Awk'
|
30
28
|
aliases = ['awk', 'gawk', 'mawk', 'nawk']
|
31
29
|
filenames = ['*.awk']
|
32
30
|
mimetypes = ['application/x-awk']
|
31
|
+
url = 'https://en.wikipedia.org/wiki/AWK'
|
32
|
+
version_added = '1.5'
|
33
33
|
|
34
34
|
tokens = {
|
35
35
|
'commentsandwhitespace': [
|
@@ -49,7 +49,7 @@ class AwkLexer(RegexLexer):
|
|
49
49
|
'root': [
|
50
50
|
(r'^(?=\s|/)', Text, 'slashstartsregex'),
|
51
51
|
include('commentsandwhitespace'),
|
52
|
-
(r'\+\+|--|\|\||&&|in\b
|
52
|
+
(r'\+\+|--|\|\||&&|in\b|\$|!?~|\?|:|'
|
53
53
|
r'(\*\*|[-<>+*%\^/!=|])=?', Operator, 'slashstartsregex'),
|
54
54
|
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
|
55
55
|
(r'[})\].]', Punctuation),
|
@@ -81,6 +81,8 @@ class SedLexer(RegexLexer):
|
|
81
81
|
aliases = ['sed', 'gsed', 'ssed']
|
82
82
|
filenames = ['*.sed', '*.[gs]sed']
|
83
83
|
mimetypes = ['text/x-sed']
|
84
|
+
url = 'https://en.wikipedia.org/wiki/Sed'
|
85
|
+
version_added = ''
|
84
86
|
flags = re.MULTILINE
|
85
87
|
|
86
88
|
# Match the contents within delimiters such as /<contents>/
|
@@ -111,14 +113,15 @@ class SedLexer(RegexLexer):
|
|
111
113
|
class VimLexer(RegexLexer):
|
112
114
|
"""
|
113
115
|
Lexer for VimL script files.
|
114
|
-
|
115
|
-
.. versionadded:: 0.8
|
116
116
|
"""
|
117
117
|
name = 'VimL'
|
118
118
|
aliases = ['vim']
|
119
119
|
filenames = ['*.vim', '.vimrc', '.exrc', '.gvimrc',
|
120
120
|
'_vimrc', '_exrc', '_gvimrc', 'vimrc', 'gvimrc']
|
121
121
|
mimetypes = ['text/x-vim']
|
122
|
+
url = 'https://www.vim.org'
|
123
|
+
version_added = '0.8'
|
124
|
+
|
122
125
|
flags = re.MULTILINE
|
123
126
|
|
124
127
|
_python = r'py(?:t(?:h(?:o(?:n)?)?)?)?'
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for various text formats.
|
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
|
|
@@ -29,6 +29,8 @@ class IrcLogsLexer(RegexLexer):
|
|
29
29
|
aliases = ['irc']
|
30
30
|
filenames = ['*.weechatlog']
|
31
31
|
mimetypes = ['text/x-irclog']
|
32
|
+
url = 'https://en.wikipedia.org/wiki/Internet_Relay_Chat'
|
33
|
+
version_added = ''
|
32
34
|
|
33
35
|
flags = re.VERBOSE | re.MULTILINE
|
34
36
|
timestamp = r"""
|
@@ -86,13 +88,13 @@ class IrcLogsLexer(RegexLexer):
|
|
86
88
|
class GettextLexer(RegexLexer):
|
87
89
|
"""
|
88
90
|
Lexer for Gettext catalog files.
|
89
|
-
|
90
|
-
.. versionadded:: 0.9
|
91
91
|
"""
|
92
92
|
name = 'Gettext Catalog'
|
93
93
|
aliases = ['pot', 'po']
|
94
94
|
filenames = ['*.pot', '*.po']
|
95
95
|
mimetypes = ['application/x-gettext', 'text/x-gettext', 'text/gettext']
|
96
|
+
url = 'https://www.gnu.org/software/gettext'
|
97
|
+
version_added = '0.9'
|
96
98
|
|
97
99
|
tokens = {
|
98
100
|
'root': [
|
@@ -114,12 +116,12 @@ class GettextLexer(RegexLexer):
|
|
114
116
|
class HttpLexer(RegexLexer):
|
115
117
|
"""
|
116
118
|
Lexer for HTTP sessions.
|
117
|
-
|
118
|
-
.. versionadded:: 1.5
|
119
119
|
"""
|
120
120
|
|
121
121
|
name = 'HTTP'
|
122
122
|
aliases = ['http']
|
123
|
+
url = 'https://httpwg.org/specs'
|
124
|
+
version_added = '1.5'
|
123
125
|
|
124
126
|
flags = re.DOTALL
|
125
127
|
|
@@ -173,7 +175,7 @@ class HttpLexer(RegexLexer):
|
|
173
175
|
|
174
176
|
tokens = {
|
175
177
|
'root': [
|
176
|
-
(r'(
|
178
|
+
(r'([a-zA-Z][-_a-zA-Z]+)( +)([^ ]+)( +)'
|
177
179
|
r'(HTTP)(/)(1\.[01]|2(?:\.0)?|3)(\r?\n|\Z)',
|
178
180
|
bygroups(Name.Function, Text, Name.Namespace, Text,
|
179
181
|
Keyword.Reserved, Operator, Number, Text),
|
@@ -184,7 +186,7 @@ class HttpLexer(RegexLexer):
|
|
184
186
|
'headers'),
|
185
187
|
],
|
186
188
|
'headers': [
|
187
|
-
(r'([^\s:]+)( *)(:)( *)([^\r\n]
|
189
|
+
(r'([^\s:]+)( *)(:)( *)([^\r\n]*)(\r?\n|\Z)', header_callback),
|
188
190
|
(r'([\t ]+)([^\r\n]+)(\r?\n|\Z)', continuous_header_callback),
|
189
191
|
(r'\r?\n', Text, 'content')
|
190
192
|
],
|
@@ -194,20 +196,24 @@ class HttpLexer(RegexLexer):
|
|
194
196
|
}
|
195
197
|
|
196
198
|
def analyse_text(text):
|
197
|
-
return
|
198
|
-
|
199
|
+
return any (
|
200
|
+
re.search(pattern, text) is not None
|
201
|
+
for pattern in (
|
202
|
+
r'^([a-zA-Z][-_a-zA-Z]+)( +)([^ ]+)( +)(HTTP)(/)(1\.[01]|2(?:\.0)?|3)(\r?\n|\Z)',
|
203
|
+
r'^(HTTP)(/)(1\.[01]|2(?:\.0)?|3)( +)(\d{3})(?:( +)([^\r\n]*))?(\r?\n|\Z)',
|
204
|
+
)
|
205
|
+
)
|
199
206
|
|
200
207
|
|
201
208
|
class TodotxtLexer(RegexLexer):
|
202
209
|
"""
|
203
210
|
Lexer for Todo.txt todo list format.
|
204
|
-
|
205
|
-
.. versionadded:: 2.0
|
206
211
|
"""
|
207
212
|
|
208
213
|
name = 'Todotxt'
|
209
214
|
url = 'http://todotxt.com/'
|
210
215
|
aliases = ['todotxt']
|
216
|
+
version_added = '2.0'
|
211
217
|
# *.todotxt is not a standard extension for Todo.txt files; including it
|
212
218
|
# makes testing easier, and also makes autodetecting file type easier.
|
213
219
|
filenames = ['todo.txt', '*.todotxt']
|
@@ -303,8 +309,6 @@ class NotmuchLexer(RegexLexer):
|
|
303
309
|
"""
|
304
310
|
For Notmuch email text format.
|
305
311
|
|
306
|
-
.. versionadded:: 2.5
|
307
|
-
|
308
312
|
Additional options accepted:
|
309
313
|
|
310
314
|
`body_lexer`
|
@@ -315,6 +319,7 @@ class NotmuchLexer(RegexLexer):
|
|
315
319
|
name = 'Notmuch'
|
316
320
|
url = 'https://notmuchmail.org/'
|
317
321
|
aliases = ['notmuch']
|
322
|
+
version_added = '2.5'
|
318
323
|
|
319
324
|
def _highlight_code(self, match):
|
320
325
|
code = match.group(1)
|
@@ -385,12 +390,12 @@ class NotmuchLexer(RegexLexer):
|
|
385
390
|
class KernelLogLexer(RegexLexer):
|
386
391
|
"""
|
387
392
|
For Linux Kernel log ("dmesg") output.
|
388
|
-
|
389
|
-
.. versionadded:: 2.6
|
390
393
|
"""
|
391
394
|
name = 'Kernel log'
|
392
395
|
aliases = ['kmsg', 'dmesg']
|
393
396
|
filenames = ['*.kmsg', '*.dmesg']
|
397
|
+
url = 'https://fr.wikipedia.org/wiki/Dmesg'
|
398
|
+
version_added = '2.6'
|
394
399
|
|
395
400
|
tokens = {
|
396
401
|
'root': [
|
@@ -4,22 +4,24 @@
|
|
4
4
|
|
5
5
|
Lexers for theorem-proving languages.
|
6
6
|
|
7
|
-
|
7
|
+
See also :mod:`pygments.lexers.lean`
|
8
|
+
|
9
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
10
|
:license: BSD, see LICENSE for details.
|
9
11
|
"""
|
10
12
|
|
11
|
-
from pygments.lexer import RegexLexer, default, words
|
13
|
+
from pygments.lexer import RegexLexer, bygroups, default, words
|
12
14
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
13
15
|
Number, Punctuation, Generic, Whitespace
|
16
|
+
# compatibility import
|
17
|
+
from pygments.lexers.lean import LeanLexer # noqa: F401
|
14
18
|
|
15
|
-
__all__ = ['CoqLexer', 'IsabelleLexer'
|
19
|
+
__all__ = ['CoqLexer', 'IsabelleLexer']
|
16
20
|
|
17
21
|
|
18
22
|
class CoqLexer(RegexLexer):
|
19
23
|
"""
|
20
24
|
For the Coq theorem prover.
|
21
|
-
|
22
|
-
.. versionadded:: 1.5
|
23
25
|
"""
|
24
26
|
|
25
27
|
name = 'Coq'
|
@@ -27,17 +29,18 @@ class CoqLexer(RegexLexer):
|
|
27
29
|
aliases = ['coq']
|
28
30
|
filenames = ['*.v']
|
29
31
|
mimetypes = ['text/x-coq']
|
32
|
+
version_added = '1.5'
|
30
33
|
|
31
34
|
flags = 0 # no re.MULTILINE
|
32
35
|
|
33
36
|
keywords1 = (
|
34
37
|
# Vernacular commands
|
35
|
-
'Section', 'Module', 'End', 'Require', 'Import', 'Export', 'Variable',
|
38
|
+
'Section', 'Module', 'End', 'Require', 'Import', 'Export', 'Include', 'Variable',
|
36
39
|
'Variables', 'Parameter', 'Parameters', 'Axiom', 'Axioms', 'Hypothesis',
|
37
40
|
'Hypotheses', 'Notation', 'Local', 'Tactic', 'Reserved', 'Scope',
|
38
|
-
'Open', 'Close', 'Bind', 'Delimit', 'Definition', 'Example', 'Let',
|
39
|
-
'Ltac', 'Fixpoint', 'CoFixpoint', 'Morphism', 'Relation', 'Implicit',
|
40
|
-
'Arguments', 'Types', '
|
41
|
+
'Open', 'Close', 'Bind', 'Declare', 'Delimit', 'Definition', 'Example', 'Let',
|
42
|
+
'Ltac', 'Ltac2', 'Fixpoint', 'CoFixpoint', 'Morphism', 'Relation', 'Implicit',
|
43
|
+
'Arguments', 'Types', 'Contextual', 'Strict', 'Prenex',
|
41
44
|
'Implicits', 'Inductive', 'CoInductive', 'Record', 'Structure',
|
42
45
|
'Variant', 'Canonical', 'Coercion', 'Theorem', 'Lemma', 'Fact',
|
43
46
|
'Remark', 'Corollary', 'Proposition', 'Property', 'Goal',
|
@@ -46,7 +49,8 @@ class CoqLexer(RegexLexer):
|
|
46
49
|
'Show', 'Print', 'Printing', 'All', 'Graph', 'Projections', 'inside',
|
47
50
|
'outside', 'Check', 'Global', 'Instance', 'Class', 'Existing',
|
48
51
|
'Universe', 'Polymorphic', 'Monomorphic', 'Context', 'Scheme', 'From',
|
49
|
-
'Undo', 'Fail', 'Function',
|
52
|
+
'Undo', 'Fail', 'Function', 'Program', 'Elpi', 'Extract', 'Opaque',
|
53
|
+
'Transparent', 'Unshelve', 'Next Obligation',
|
50
54
|
)
|
51
55
|
keywords2 = (
|
52
56
|
# Gallina
|
@@ -94,7 +98,7 @@ class CoqLexer(RegexLexer):
|
|
94
98
|
'!=', '#', '&', '&&', r'\(', r'\)', r'\*', r'\+', ',', '-', r'-\.',
|
95
99
|
'->', r'\.', r'\.\.', ':', '::', ':=', ':>', ';', ';;', '<', '<-',
|
96
100
|
'<->', '=', '>', '>]', r'>\}', r'\?', r'\?\?', r'\[', r'\[<', r'\[>',
|
97
|
-
r'\[\|', ']', '_', '`', r'\{', r'\{<', r'\|', r'\|]', r'\}', '~', '=>',
|
101
|
+
r'\[\|', ']', '_', '`', r'\{', r'\{<', r'lp:\{\{', r'\|', r'\|]', r'\}', '~', '=>',
|
98
102
|
r'/\\', r'\\/', r'\{\|', r'\|\}',
|
99
103
|
# 'Π', 'Σ', # Not defined in the standard library
|
100
104
|
'λ', '¬', '∧', '∨', '∀', '∃', '→', '↔', '≠', '≤', '≥',
|
@@ -110,8 +114,10 @@ class CoqLexer(RegexLexer):
|
|
110
114
|
(r'\(\*', Comment, 'comment'),
|
111
115
|
(r'\b(?:[^\W\d][\w\']*\.)+[^\W\d][\w\']*\b', Name),
|
112
116
|
(r'\bEquations\b\??', Keyword.Namespace),
|
117
|
+
(r'\b(Elpi)(\s+)(Program|Query|Accumulate|Command|Typecheck|Db|Export|Tactic)?\b', bygroups(Keyword.Namespace,Text,Keyword.Namespace)),
|
113
118
|
# Very weak heuristic to distinguish the Set vernacular from the Set sort
|
114
|
-
(r'\bSet(?=[ \t]+[A-Z][a-z][^\n]*?\.)', Keyword.Namespace),
|
119
|
+
(r'\bUnset\b|\bSet(?=[ \t]+[A-Z][a-z][^\n]*?\.)', Keyword.Namespace, 'set-options'),
|
120
|
+
(r'\b(?:String|Number)\s+Notation', Keyword.Namespace, 'sn-notation'),
|
115
121
|
(words(keywords1, prefix=r'\b', suffix=r'\b'), Keyword.Namespace),
|
116
122
|
(words(keywords2, prefix=r'\b', suffix=r'\b'), Keyword),
|
117
123
|
(words(keywords3, prefix=r'\b', suffix=r'\b'), Keyword.Type),
|
@@ -120,8 +126,8 @@ class CoqLexer(RegexLexer):
|
|
120
126
|
(words(keywords6, prefix=r'\b', suffix=r'\b'), Keyword.Reserved),
|
121
127
|
# (r'\b([A-Z][\w\']*)(\.)', Name.Namespace, 'dotted'),
|
122
128
|
(r'\b([A-Z][\w\']*)', Name),
|
123
|
-
(r'(
|
124
|
-
(
|
129
|
+
(r'({})'.format('|'.join(keyopts[::-1])), Operator),
|
130
|
+
(rf'({infix_syms}|{prefix_syms})?{operators}', Operator),
|
125
131
|
|
126
132
|
(r"[^\W\d][\w']*", Name),
|
127
133
|
|
@@ -141,8 +147,27 @@ class CoqLexer(RegexLexer):
|
|
141
147
|
(r'[~?][a-z][\w\']*:', Name),
|
142
148
|
(r'\S', Name.Builtin.Pseudo),
|
143
149
|
],
|
150
|
+
'set-options': [
|
151
|
+
(r'\s+', Text),
|
152
|
+
(r'[A-Z]\w*', Keyword.Namespace),
|
153
|
+
(r'"', String.Double, 'string'),
|
154
|
+
(r'\d+', Number.Integer),
|
155
|
+
(r'\.', Punctuation, '#pop'),
|
156
|
+
],
|
157
|
+
'sn-notation': [
|
158
|
+
(r'\s+', Text),
|
159
|
+
# Extra keywords to highlight only in this scope
|
160
|
+
(r'\b(?:via|mapping|abstract|warning|after)\b', Keyword),
|
161
|
+
(r'=>|[()\[\]:,]', Operator),
|
162
|
+
(r'\b[^\W\d][\w\']*(?:\.[^\W\d][\w\']*)*\b', Name),
|
163
|
+
(r'\d[\d_]*', Number.Integer),
|
164
|
+
(r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
|
165
|
+
(r'\(\*', Comment, 'comment'),
|
166
|
+
(r'\.', Punctuation, '#pop'),
|
167
|
+
],
|
144
168
|
'comment': [
|
145
|
-
|
169
|
+
# Consume comments like ***** as one token
|
170
|
+
(r'([^(*)]+|\*+(?!\)))+', Comment),
|
146
171
|
(r'\(\*', Comment, '#push'),
|
147
172
|
(r'\*\)', Comment, '#pop'),
|
148
173
|
(r'[(*)]', Comment),
|
@@ -170,8 +195,6 @@ class CoqLexer(RegexLexer):
|
|
170
195
|
class IsabelleLexer(RegexLexer):
|
171
196
|
"""
|
172
197
|
For the Isabelle proof assistant.
|
173
|
-
|
174
|
-
.. versionadded:: 2.0
|
175
198
|
"""
|
176
199
|
|
177
200
|
name = 'Isabelle'
|
@@ -179,6 +202,7 @@ class IsabelleLexer(RegexLexer):
|
|
179
202
|
aliases = ['isabelle']
|
180
203
|
filenames = ['*.thy']
|
181
204
|
mimetypes = ['text/x-isabelle']
|
205
|
+
version_added = '2.0'
|
182
206
|
|
183
207
|
keyword_minor = (
|
184
208
|
'and', 'assumes', 'attach', 'avoids', 'binder', 'checking',
|
@@ -384,101 +408,3 @@ class IsabelleLexer(RegexLexer):
|
|
384
408
|
(r'`', String.Other, '#pop'),
|
385
409
|
],
|
386
410
|
}
|
387
|
-
|
388
|
-
|
389
|
-
class LeanLexer(RegexLexer):
|
390
|
-
"""
|
391
|
-
For the Lean theorem prover.
|
392
|
-
|
393
|
-
.. versionadded:: 2.0
|
394
|
-
"""
|
395
|
-
name = 'Lean'
|
396
|
-
url = 'https://github.com/leanprover/lean'
|
397
|
-
aliases = ['lean']
|
398
|
-
filenames = ['*.lean']
|
399
|
-
mimetypes = ['text/x-lean']
|
400
|
-
|
401
|
-
tokens = {
|
402
|
-
'root': [
|
403
|
-
(r'\s+', Text),
|
404
|
-
(r'/--', String.Doc, 'docstring'),
|
405
|
-
(r'/-', Comment, 'comment'),
|
406
|
-
(r'--.*?$', Comment.Single),
|
407
|
-
(words((
|
408
|
-
'import', 'renaming', 'hiding',
|
409
|
-
'namespace',
|
410
|
-
'local',
|
411
|
-
'private', 'protected', 'section',
|
412
|
-
'include', 'omit', 'section',
|
413
|
-
'protected', 'export',
|
414
|
-
'open',
|
415
|
-
'attribute',
|
416
|
-
), prefix=r'\b', suffix=r'\b'), Keyword.Namespace),
|
417
|
-
(words((
|
418
|
-
'lemma', 'theorem', 'def', 'definition', 'example',
|
419
|
-
'axiom', 'axioms', 'constant', 'constants',
|
420
|
-
'universe', 'universes',
|
421
|
-
'inductive', 'coinductive', 'structure', 'extends',
|
422
|
-
'class', 'instance',
|
423
|
-
'abbreviation',
|
424
|
-
|
425
|
-
'noncomputable theory',
|
426
|
-
|
427
|
-
'noncomputable', 'mutual', 'meta',
|
428
|
-
|
429
|
-
'attribute',
|
430
|
-
|
431
|
-
'parameter', 'parameters',
|
432
|
-
'variable', 'variables',
|
433
|
-
|
434
|
-
'reserve', 'precedence',
|
435
|
-
'postfix', 'prefix', 'notation', 'infix', 'infixl', 'infixr',
|
436
|
-
|
437
|
-
'begin', 'by', 'end',
|
438
|
-
|
439
|
-
'set_option',
|
440
|
-
'run_cmd',
|
441
|
-
), prefix=r'\b', suffix=r'\b'), Keyword.Declaration),
|
442
|
-
(r'@\[[^\]]*\]', Keyword.Declaration),
|
443
|
-
(words((
|
444
|
-
'forall', 'fun', 'Pi', 'from', 'have', 'show', 'assume', 'suffices',
|
445
|
-
'let', 'if', 'else', 'then', 'in', 'with', 'calc', 'match',
|
446
|
-
'do'
|
447
|
-
), prefix=r'\b', suffix=r'\b'), Keyword),
|
448
|
-
(words(('sorry', 'admit'), prefix=r'\b', suffix=r'\b'), Generic.Error),
|
449
|
-
(words(('Sort', 'Prop', 'Type'), prefix=r'\b', suffix=r'\b'), Keyword.Type),
|
450
|
-
(words((
|
451
|
-
'#eval', '#check', '#reduce', '#exit',
|
452
|
-
'#print', '#help',
|
453
|
-
), suffix=r'\b'), Keyword),
|
454
|
-
(words((
|
455
|
-
'(', ')', ':', '{', '}', '[', ']', '⟨', '⟩', '‹', '›', '⦃', '⦄', ':=', ',',
|
456
|
-
)), Operator),
|
457
|
-
(r'[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f]'
|
458
|
-
r'[.A-Za-z_\'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079'
|
459
|
-
r'\u207f-\u2089\u2090-\u209c\u2100-\u214f0-9]*', Name),
|
460
|
-
(r'0x[A-Za-z0-9]+', Number.Integer),
|
461
|
-
(r'0b[01]+', Number.Integer),
|
462
|
-
(r'\d+', Number.Integer),
|
463
|
-
(r'"', String.Double, 'string'),
|
464
|
-
(r"'(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})|.)'", String.Char),
|
465
|
-
(r'[~?][a-z][\w\']*:', Name.Variable),
|
466
|
-
(r'\S', Name.Builtin.Pseudo),
|
467
|
-
],
|
468
|
-
'comment': [
|
469
|
-
(r'[^/-]', Comment.Multiline),
|
470
|
-
(r'/-', Comment.Multiline, '#push'),
|
471
|
-
(r'-/', Comment.Multiline, '#pop'),
|
472
|
-
(r'[/-]', Comment.Multiline)
|
473
|
-
],
|
474
|
-
'docstring': [
|
475
|
-
(r'[^/-]', String.Doc),
|
476
|
-
(r'-/', String.Doc, '#pop'),
|
477
|
-
(r'[/-]', String.Doc)
|
478
|
-
],
|
479
|
-
'string': [
|
480
|
-
(r'[^\\"]+', String.Double),
|
481
|
-
(r"(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4}))", String.Escape),
|
482
|
-
('"', String.Double, '#pop'),
|
483
|
-
],
|
484
|
-
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for the ThingsDB 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,12 +18,12 @@ __all__ = ['ThingsDBLexer']
|
|
18
18
|
class ThingsDBLexer(RegexLexer):
|
19
19
|
"""
|
20
20
|
Lexer for the ThingsDB programming language.
|
21
|
-
|
22
|
-
.. versionadded:: 2.9
|
23
21
|
"""
|
24
22
|
name = 'ThingsDB'
|
25
23
|
aliases = ['ti', 'thingsdb']
|
26
24
|
filenames = ['*.ti']
|
25
|
+
url = 'https://www.thingsdb.net'
|
26
|
+
version_added = '2.9'
|
27
27
|
|
28
28
|
tokens = {
|
29
29
|
'root': [
|
@@ -39,21 +39,24 @@ class ThingsDBLexer(RegexLexer):
|
|
39
39
|
(r'([-+]?0x[0-9a-fA-F]+)', Number.Hex),
|
40
40
|
(r'[-+]?[0-9]+', Number.Integer),
|
41
41
|
(r'[-+]?((inf|nan)([^0-9A-Za-z_]|$)|[0-9]*\.[0-9]+(e[+-][0-9]+)?)',
|
42
|
-
|
42
|
+
Number.Float),
|
43
43
|
|
44
44
|
# strings
|
45
45
|
(r'(?:"(?:[^"]*)")+', String.Double),
|
46
46
|
(r"(?:'(?:[^']*)')+", String.Single),
|
47
|
+
(r"(?:`(?:[^`]*)`)+", String.Backtick),
|
47
48
|
|
48
49
|
# literals
|
49
50
|
(r'(true|false|nil)\b', Keyword.Constant),
|
50
51
|
|
52
|
+
# name constants
|
53
|
+
(r'(FULL|USER|GRANT|CHANGE|JOIN|RUN|QUERY|'
|
54
|
+
r'DEBUG|INFO|WARNING|ERROR|CRITICAL|'
|
55
|
+
r'NO_IDS|INT_MIN|INT_MAX)\b', Name.Constant),
|
56
|
+
|
51
57
|
# regular expressions
|
52
58
|
(r'(/[^/\\]*(?:\\.[^/\\]*)*/i?)', String.Regex),
|
53
59
|
|
54
|
-
# thing id's
|
55
|
-
(r'#[0-9]+', Comment.Preproc),
|
56
|
-
|
57
60
|
# name, assignments and functions
|
58
61
|
include('names'),
|
59
62
|
|
@@ -62,26 +65,47 @@ class ThingsDBLexer(RegexLexer):
|
|
62
65
|
],
|
63
66
|
'names': [
|
64
67
|
(r'(\.)'
|
65
|
-
r'(
|
66
|
-
r'
|
67
|
-
r'
|
68
|
+
r'(first|last|then|else|load|at|again_in|again_at|err|cancel|'
|
69
|
+
r'closure|set_closure|args|set_args|owner|set_owner|equals|copy|'
|
70
|
+
r'dup|assign|week|weekday|yday|zone|len|call|doc|emit|extract|'
|
71
|
+
r'choice|code|format|msg|each|every|extend|extend_unique|filter|'
|
72
|
+
r'find|flat|find_index|has|index_of|count|sum|is_unique|unique|'
|
73
|
+
r'join|map|map_id|map_wrap|map_type|vmap|move|pop|push|fill|'
|
74
|
+
r'remove|replace|restrict|restriction|shift|sort|splice|to|add|'
|
75
|
+
r'one|clear|contains|ends_with|name|lower|replace|reverse|'
|
76
|
+
r'starts_with|split|test|trim|trim_left|trim_right|upper|del|ren|'
|
77
|
+
r'to_type|to_thing|get|id|keys|reduce|set|some|value|values|wrap|'
|
78
|
+
r'unshift|unwrap|search)'
|
68
79
|
r'(\()',
|
69
80
|
bygroups(Name.Function, Name.Function, Punctuation), 'arguments'),
|
70
|
-
(r'(
|
71
|
-
r'
|
72
|
-
r'
|
73
|
-
r'
|
74
|
-
r'
|
75
|
-
r'
|
76
|
-
r'
|
77
|
-
r'
|
78
|
-
r'
|
79
|
-
r'
|
80
|
-
r'
|
81
|
-
r'
|
82
|
-
r'
|
83
|
-
r'
|
84
|
-
r'
|
81
|
+
(r'(alt_raise|assert|base64_encode|base64_decode|bool|bytes|'
|
82
|
+
r'closure|datetime|deep|future|is_future|del_enum|del_type|room|'
|
83
|
+
r'is_room|task|tasks|is_task|is_email|is_url|is_tel|is_time_zone|'
|
84
|
+
r'timeit|enum|enum_info|enum_map|enums_info|err|regex|is_regex|'
|
85
|
+
r'change_id|float|has_enum|has_type|int|is_array|is_ascii|'
|
86
|
+
r'is_float|is_bool|is_bytes|is_closure|is_datetime|is_enum|'
|
87
|
+
r'is_err|is_mpdata|is_inf|is_int|is_list|is_nan|is_nil|is_raw|'
|
88
|
+
r'is_set|is_str|is_thing|is_timeval|is_tuple|is_utf8|json_dump|'
|
89
|
+
r'json_load|list|log|import|export|root|mod_enum|mod_type|new|'
|
90
|
+
r'new_type|now|raise|rand|range|randint|randstr|refs|rename_enum|'
|
91
|
+
r'set|set_enum|set_type|str|thing|timeval|try|type|type_assert|'
|
92
|
+
r'type_count|type_info|types_info|nse|wse|backup_info|'
|
93
|
+
r'backups_info|backups_ok|counters|del_backup|has_backup|'
|
94
|
+
r'new_backup|node_info|nodes_info|reset_counters|restart_module|'
|
95
|
+
r'set_log_level|shutdown|has_module|del_module|module_info|'
|
96
|
+
r'modules_info|new_module|deploy_module|rename_module|'
|
97
|
+
r'refresh_module|set_module_conf|set_module_scope|'
|
98
|
+
r'collections_info|del_collection|del_expired|del_node|del_token|'
|
99
|
+
r'del_user|grant|has_collection|has_node|has_token|has_user|'
|
100
|
+
r'new_collection|new_node|new_token|new_user|rename_collection|'
|
101
|
+
r'rename_user|restore|revoke|set_password|set_time_zone|'
|
102
|
+
r'set_default_deep|time_zones_info|user_info|users_info|'
|
103
|
+
r'del_procedure|has_procedure|new_procedure|mod_procedure|'
|
104
|
+
r'procedure_doc|procedure_info|procedures_info|rename_procedure|'
|
105
|
+
r'run|assert_err|auth_err|bad_data_err|cancelled_err|'
|
106
|
+
r'rename_type|forbidden_err|lookup_err|max_quota_err|node_err|'
|
107
|
+
r'num_arguments_err|operation_err|overflow_err|syntax_err|'
|
108
|
+
r'collection_info|type_err|value_err|zero_div_err)'
|
85
109
|
r'(\()',
|
86
110
|
bygroups(Name.Function, Punctuation),
|
87
111
|
'arguments'),
|
@@ -90,7 +114,7 @@ class ThingsDBLexer(RegexLexer):
|
|
90
114
|
bygroups(Name.Attribute, Text, Operator)),
|
91
115
|
(r'\.[A-Za-z_][0-9A-Za-z_]*', Name.Attribute),
|
92
116
|
(r'([A-Za-z_][0-9A-Za-z_]*)(\s*)(=)',
|
93
|
-
|
117
|
+
bygroups(Name.Variable, Text, Operator)),
|
94
118
|
(r'[A-Za-z_][0-9A-Za-z_]*', Name.Variable),
|
95
119
|
],
|
96
120
|
'whitespace': [
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for TL-b.
|
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,6 +23,8 @@ class TlbLexer(RegexLexer):
|
|
23
23
|
name = 'Tl-b'
|
24
24
|
aliases = ['tlb']
|
25
25
|
filenames = ['*.tlb']
|
26
|
+
url = 'https://docs.ton.org/#/overviews/TL-B'
|
27
|
+
version_added = ''
|
26
28
|
|
27
29
|
tokens = {
|
28
30
|
'root': [
|