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 scripting and embedded 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
|
|
@@ -16,7 +16,7 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
|
16
16
|
Number, Punctuation, Error, Whitespace, Other
|
17
17
|
from pygments.util import get_bool_opt, get_list_opt
|
18
18
|
|
19
|
-
__all__ = ['LuaLexer', 'MoonScriptLexer', 'ChaiscriptLexer', 'LSLLexer',
|
19
|
+
__all__ = ['LuaLexer', 'LuauLexer', 'MoonScriptLexer', 'ChaiscriptLexer', 'LSLLexer',
|
20
20
|
'AppleScriptLexer', 'RexxLexer', 'MOOCodeLexer', 'HybrisLexer',
|
21
21
|
'EasytrieveLexer', 'JclLexer', 'MiniScriptLexer']
|
22
22
|
|
@@ -49,11 +49,12 @@ class LuaLexer(RegexLexer):
|
|
49
49
|
aliases = ['lua']
|
50
50
|
filenames = ['*.lua', '*.wlua']
|
51
51
|
mimetypes = ['text/x-lua', 'application/x-lua']
|
52
|
+
version_added = ''
|
52
53
|
|
53
54
|
_comment_multiline = r'(?:--\[(?P<level>=*)\[[\w\W]*?\](?P=level)\])'
|
54
55
|
_comment_single = r'(?:--.*$)'
|
55
56
|
_space = r'(?:\s+)'
|
56
|
-
_s =
|
57
|
+
_s = rf'(?:{_comment_multiline}|{_comment_single}|{_space})'
|
57
58
|
_name = r'(?:[^\W\d]\w*)'
|
58
59
|
|
59
60
|
tokens = {
|
@@ -101,7 +102,7 @@ class LuaLexer(RegexLexer):
|
|
101
102
|
'funcname': [
|
102
103
|
include('ws'),
|
103
104
|
(r'[.:]', Punctuation),
|
104
|
-
(
|
105
|
+
(rf'{_name}(?={_s}*[.:])', Name.Class),
|
105
106
|
(_name, Name.Function, '#pop'),
|
106
107
|
# inline function
|
107
108
|
(r'\(', Punctuation, '#pop'),
|
@@ -162,11 +163,324 @@ class LuaLexer(RegexLexer):
|
|
162
163
|
continue
|
163
164
|
yield index, token, value
|
164
165
|
|
166
|
+
def _luau_make_expression(should_pop, _s):
|
167
|
+
temp_list = [
|
168
|
+
(r'0[xX][\da-fA-F_]*', Number.Hex, '#pop'),
|
169
|
+
(r'0[bB][\d_]*', Number.Bin, '#pop'),
|
170
|
+
(r'\.?\d[\d_]*(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?', Number.Float, '#pop'),
|
171
|
+
|
172
|
+
(words((
|
173
|
+
'true', 'false', 'nil'
|
174
|
+
), suffix=r'\b'), Keyword.Constant, '#pop'),
|
175
|
+
|
176
|
+
(r'\[(=*)\[[.\n]*?\]\1\]', String, '#pop'),
|
177
|
+
|
178
|
+
(r'(\.)([a-zA-Z_]\w*)(?=%s*[({"\'])', bygroups(Punctuation, Name.Function), '#pop'),
|
179
|
+
(r'(\.)([a-zA-Z_]\w*)', bygroups(Punctuation, Name.Variable), '#pop'),
|
180
|
+
|
181
|
+
(rf'[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*(?={_s}*[({{"\'])', Name.Other, '#pop'),
|
182
|
+
(r'[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*', Name, '#pop'),
|
183
|
+
]
|
184
|
+
if should_pop:
|
185
|
+
return temp_list
|
186
|
+
return [entry[:2] for entry in temp_list]
|
187
|
+
|
188
|
+
def _luau_make_expression_special(should_pop):
|
189
|
+
temp_list = [
|
190
|
+
(r'\{', Punctuation, ('#pop', 'closing_brace_base', 'expression')),
|
191
|
+
(r'\(', Punctuation, ('#pop', 'closing_parenthesis_base', 'expression')),
|
192
|
+
|
193
|
+
(r'::?', Punctuation, ('#pop', 'type_end', 'type_start')),
|
194
|
+
|
195
|
+
(r"'", String.Single, ('#pop', 'string_single')),
|
196
|
+
(r'"', String.Double, ('#pop', 'string_double')),
|
197
|
+
(r'`', String.Backtick, ('#pop', 'string_interpolated')),
|
198
|
+
]
|
199
|
+
if should_pop:
|
200
|
+
return temp_list
|
201
|
+
return [(entry[0], entry[1], entry[2][1:]) for entry in temp_list]
|
202
|
+
|
203
|
+
class LuauLexer(RegexLexer):
|
204
|
+
"""
|
205
|
+
For Luau source code.
|
206
|
+
|
207
|
+
Additional options accepted:
|
208
|
+
|
209
|
+
`include_luau_builtins`
|
210
|
+
If given and ``True``, automatically highlight Luau builtins
|
211
|
+
(default: ``True``).
|
212
|
+
`include_roblox_builtins`
|
213
|
+
If given and ``True``, automatically highlight Roblox-specific builtins
|
214
|
+
(default: ``False``).
|
215
|
+
`additional_builtins`
|
216
|
+
If given, must be a list of additional builtins to highlight.
|
217
|
+
`disabled_builtins`
|
218
|
+
If given, must be a list of builtins that will not be highlighted.
|
219
|
+
"""
|
220
|
+
|
221
|
+
name = 'Luau'
|
222
|
+
url = 'https://luau-lang.org/'
|
223
|
+
aliases = ['luau']
|
224
|
+
filenames = ['*.luau']
|
225
|
+
version_added = '2.18'
|
226
|
+
|
227
|
+
_comment_multiline = r'(?:--\[(?P<level>=*)\[[\w\W]*?\](?P=level)\])'
|
228
|
+
_comment_single = r'(?:--.*$)'
|
229
|
+
_s = r'(?:{}|{}|{})'.format(_comment_multiline, _comment_single, r'\s+')
|
230
|
+
|
231
|
+
tokens = {
|
232
|
+
'root': [
|
233
|
+
(r'#!.*', Comment.Hashbang, 'base'),
|
234
|
+
default('base'),
|
235
|
+
],
|
236
|
+
|
237
|
+
'ws': [
|
238
|
+
(_comment_multiline, Comment.Multiline),
|
239
|
+
(_comment_single, Comment.Single),
|
240
|
+
(r'\s+', Whitespace),
|
241
|
+
],
|
242
|
+
|
243
|
+
'base': [
|
244
|
+
include('ws'),
|
245
|
+
|
246
|
+
*_luau_make_expression_special(False),
|
247
|
+
(r'\.\.\.', Punctuation),
|
248
|
+
|
249
|
+
(rf'type\b(?={_s}+[a-zA-Z_])', Keyword.Reserved, 'type_declaration'),
|
250
|
+
(rf'export\b(?={_s}+[a-zA-Z_])', Keyword.Reserved),
|
251
|
+
|
252
|
+
(r'(?:\.\.|//|[+\-*\/%^<>=])=?', Operator, 'expression'),
|
253
|
+
(r'~=', Operator, 'expression'),
|
254
|
+
|
255
|
+
(words((
|
256
|
+
'and', 'or', 'not'
|
257
|
+
), suffix=r'\b'), Operator.Word, 'expression'),
|
258
|
+
|
259
|
+
(words((
|
260
|
+
'elseif', 'for', 'if', 'in', 'repeat', 'return', 'until',
|
261
|
+
'while'), suffix=r'\b'), Keyword.Reserved, 'expression'),
|
262
|
+
(r'local\b', Keyword.Declaration, 'expression'),
|
263
|
+
|
264
|
+
(r'function\b', Keyword.Reserved, ('expression', 'func_name')),
|
265
|
+
|
266
|
+
(r'[\])};]+', Punctuation),
|
267
|
+
|
268
|
+
include('expression_static'),
|
269
|
+
*_luau_make_expression(False, _s),
|
270
|
+
|
271
|
+
(r'[\[.,]', Punctuation, 'expression'),
|
272
|
+
],
|
273
|
+
'expression_static': [
|
274
|
+
(words((
|
275
|
+
'break', 'continue', 'do', 'else', 'elseif', 'end', 'for',
|
276
|
+
'if', 'in', 'repeat', 'return', 'then', 'until', 'while'),
|
277
|
+
suffix=r'\b'), Keyword.Reserved),
|
278
|
+
],
|
279
|
+
'expression': [
|
280
|
+
include('ws'),
|
281
|
+
|
282
|
+
(r'if\b', Keyword.Reserved, ('ternary', 'expression')),
|
283
|
+
|
284
|
+
(r'local\b', Keyword.Declaration),
|
285
|
+
*_luau_make_expression_special(True),
|
286
|
+
(r'\.\.\.', Punctuation, '#pop'),
|
287
|
+
|
288
|
+
(r'function\b', Keyword.Reserved, 'func_name'),
|
289
|
+
|
290
|
+
include('expression_static'),
|
291
|
+
*_luau_make_expression(True, _s),
|
292
|
+
|
293
|
+
default('#pop'),
|
294
|
+
],
|
295
|
+
'ternary': [
|
296
|
+
include('ws'),
|
297
|
+
|
298
|
+
(r'else\b', Keyword.Reserved, '#pop'),
|
299
|
+
(words((
|
300
|
+
'then', 'elseif',
|
301
|
+
), suffix=r'\b'), Operator.Reserved, 'expression'),
|
302
|
+
|
303
|
+
default('#pop'),
|
304
|
+
],
|
305
|
+
|
306
|
+
'closing_brace_pop': [
|
307
|
+
(r'\}', Punctuation, '#pop'),
|
308
|
+
],
|
309
|
+
'closing_parenthesis_pop': [
|
310
|
+
(r'\)', Punctuation, '#pop'),
|
311
|
+
],
|
312
|
+
'closing_gt_pop': [
|
313
|
+
(r'>', Punctuation, '#pop'),
|
314
|
+
],
|
315
|
+
|
316
|
+
'closing_parenthesis_base': [
|
317
|
+
include('closing_parenthesis_pop'),
|
318
|
+
include('base'),
|
319
|
+
],
|
320
|
+
'closing_parenthesis_type': [
|
321
|
+
include('closing_parenthesis_pop'),
|
322
|
+
include('type'),
|
323
|
+
],
|
324
|
+
'closing_brace_base': [
|
325
|
+
include('closing_brace_pop'),
|
326
|
+
include('base'),
|
327
|
+
],
|
328
|
+
'closing_brace_type': [
|
329
|
+
include('closing_brace_pop'),
|
330
|
+
include('type'),
|
331
|
+
],
|
332
|
+
'closing_gt_type': [
|
333
|
+
include('closing_gt_pop'),
|
334
|
+
include('type'),
|
335
|
+
],
|
336
|
+
|
337
|
+
'string_escape': [
|
338
|
+
(r'\\z\s*', String.Escape),
|
339
|
+
(r'\\(?:[abfnrtvz\\"\'`\{\n])|[\r\n]{1,2}|x[\da-fA-F]{2}|\d{1,3}|'
|
340
|
+
r'u\{\}[\da-fA-F]*\}', String.Escape),
|
341
|
+
],
|
342
|
+
'string_single': [
|
343
|
+
include('string_escape'),
|
344
|
+
|
345
|
+
(r"'", String.Single, "#pop"),
|
346
|
+
(r"[^\\']+", String.Single),
|
347
|
+
],
|
348
|
+
'string_double': [
|
349
|
+
include('string_escape'),
|
350
|
+
|
351
|
+
(r'"', String.Double, "#pop"),
|
352
|
+
(r'[^\\"]+', String.Double),
|
353
|
+
],
|
354
|
+
'string_interpolated': [
|
355
|
+
include('string_escape'),
|
356
|
+
|
357
|
+
(r'\{', Punctuation, ('closing_brace_base', 'expression')),
|
358
|
+
|
359
|
+
(r'`', String.Backtick, "#pop"),
|
360
|
+
(r'[^\\`\{]+', String.Backtick),
|
361
|
+
],
|
362
|
+
|
363
|
+
'func_name': [
|
364
|
+
include('ws'),
|
365
|
+
|
366
|
+
(r'[.:]', Punctuation),
|
367
|
+
(rf'[a-zA-Z_]\w*(?={_s}*[.:])', Name.Class),
|
368
|
+
(r'[a-zA-Z_]\w*', Name.Function),
|
369
|
+
|
370
|
+
(r'<', Punctuation, 'closing_gt_type'),
|
371
|
+
|
372
|
+
(r'\(', Punctuation, '#pop'),
|
373
|
+
],
|
374
|
+
|
375
|
+
'type': [
|
376
|
+
include('ws'),
|
377
|
+
|
378
|
+
(r'\(', Punctuation, 'closing_parenthesis_type'),
|
379
|
+
(r'\{', Punctuation, 'closing_brace_type'),
|
380
|
+
(r'<', Punctuation, 'closing_gt_type'),
|
381
|
+
|
382
|
+
(r"'", String.Single, 'string_single'),
|
383
|
+
(r'"', String.Double, 'string_double'),
|
384
|
+
|
385
|
+
(r'[|&\.,\[\]:=]+', Punctuation),
|
386
|
+
(r'->', Punctuation),
|
387
|
+
|
388
|
+
(r'typeof\(', Name.Builtin, ('closing_parenthesis_base',
|
389
|
+
'expression')),
|
390
|
+
(r'[a-zA-Z_]\w*', Name.Class),
|
391
|
+
],
|
392
|
+
'type_start': [
|
393
|
+
include('ws'),
|
394
|
+
|
395
|
+
(r'\(', Punctuation, ('#pop', 'closing_parenthesis_type')),
|
396
|
+
(r'\{', Punctuation, ('#pop', 'closing_brace_type')),
|
397
|
+
(r'<', Punctuation, ('#pop', 'closing_gt_type')),
|
398
|
+
|
399
|
+
(r"'", String.Single, ('#pop', 'string_single')),
|
400
|
+
(r'"', String.Double, ('#pop', 'string_double')),
|
401
|
+
|
402
|
+
(r'typeof\(', Name.Builtin, ('#pop', 'closing_parenthesis_base',
|
403
|
+
'expression')),
|
404
|
+
(r'[a-zA-Z_]\w*', Name.Class, '#pop'),
|
405
|
+
],
|
406
|
+
'type_end': [
|
407
|
+
include('ws'),
|
408
|
+
|
409
|
+
(r'[|&\.]', Punctuation, 'type_start'),
|
410
|
+
(r'->', Punctuation, 'type_start'),
|
411
|
+
|
412
|
+
(r'<', Punctuation, 'closing_gt_type'),
|
413
|
+
|
414
|
+
default('#pop'),
|
415
|
+
],
|
416
|
+
'type_declaration': [
|
417
|
+
include('ws'),
|
418
|
+
|
419
|
+
(r'[a-zA-Z_]\w*', Name.Class),
|
420
|
+
(r'<', Punctuation, 'closing_gt_type'),
|
421
|
+
|
422
|
+
(r'=', Punctuation, ('#pop', 'type_end', 'type_start')),
|
423
|
+
],
|
424
|
+
}
|
425
|
+
|
426
|
+
def __init__(self, **options):
|
427
|
+
self.include_luau_builtins = get_bool_opt(
|
428
|
+
options, 'include_luau_builtins', True)
|
429
|
+
self.include_roblox_builtins = get_bool_opt(
|
430
|
+
options, 'include_roblox_builtins', False)
|
431
|
+
self.additional_builtins = get_list_opt(options, 'additional_builtins', [])
|
432
|
+
self.disabled_builtins = get_list_opt(options, 'disabled_builtins', [])
|
433
|
+
|
434
|
+
self._builtins = set(self.additional_builtins)
|
435
|
+
if self.include_luau_builtins:
|
436
|
+
from pygments.lexers._luau_builtins import LUAU_BUILTINS
|
437
|
+
self._builtins.update(LUAU_BUILTINS)
|
438
|
+
if self.include_roblox_builtins:
|
439
|
+
from pygments.lexers._luau_builtins import ROBLOX_BUILTINS
|
440
|
+
self._builtins.update(ROBLOX_BUILTINS)
|
441
|
+
if self.additional_builtins:
|
442
|
+
self._builtins.update(self.additional_builtins)
|
443
|
+
self._builtins.difference_update(self.disabled_builtins)
|
444
|
+
|
445
|
+
RegexLexer.__init__(self, **options)
|
446
|
+
|
447
|
+
def get_tokens_unprocessed(self, text):
|
448
|
+
for index, token, value in \
|
449
|
+
RegexLexer.get_tokens_unprocessed(self, text):
|
450
|
+
if token is Name or token is Name.Other:
|
451
|
+
split_value = value.split('.')
|
452
|
+
complete_value = []
|
453
|
+
new_index = index
|
454
|
+
for position in range(len(split_value), 0, -1):
|
455
|
+
potential_string = '.'.join(split_value[:position])
|
456
|
+
if potential_string in self._builtins:
|
457
|
+
yield index, Name.Builtin, potential_string
|
458
|
+
new_index += len(potential_string)
|
459
|
+
|
460
|
+
if complete_value:
|
461
|
+
yield new_index, Punctuation, '.'
|
462
|
+
new_index += 1
|
463
|
+
break
|
464
|
+
complete_value.insert(0, split_value[position - 1])
|
465
|
+
|
466
|
+
for position, substring in enumerate(complete_value):
|
467
|
+
if position + 1 == len(complete_value):
|
468
|
+
if token is Name:
|
469
|
+
yield new_index, Name.Variable, substring
|
470
|
+
continue
|
471
|
+
yield new_index, Name.Function, substring
|
472
|
+
continue
|
473
|
+
yield new_index, Name.Variable, substring
|
474
|
+
new_index += len(substring)
|
475
|
+
yield new_index, Punctuation, '.'
|
476
|
+
new_index += 1
|
477
|
+
|
478
|
+
continue
|
479
|
+
yield index, token, value
|
480
|
+
|
165
481
|
class MoonScriptLexer(LuaLexer):
|
166
482
|
"""
|
167
483
|
For MoonScript source code.
|
168
|
-
|
169
|
-
.. versionadded:: 1.5
|
170
484
|
"""
|
171
485
|
|
172
486
|
name = 'MoonScript'
|
@@ -174,6 +488,7 @@ class MoonScriptLexer(LuaLexer):
|
|
174
488
|
aliases = ['moonscript', 'moon']
|
175
489
|
filenames = ['*.moon']
|
176
490
|
mimetypes = ['text/x-moonscript', 'application/x-moonscript']
|
491
|
+
version_added = '1.5'
|
177
492
|
|
178
493
|
tokens = {
|
179
494
|
'root': [
|
@@ -234,8 +549,6 @@ class MoonScriptLexer(LuaLexer):
|
|
234
549
|
class ChaiscriptLexer(RegexLexer):
|
235
550
|
"""
|
236
551
|
For ChaiScript source code.
|
237
|
-
|
238
|
-
.. versionadded:: 2.0
|
239
552
|
"""
|
240
553
|
|
241
554
|
name = 'ChaiScript'
|
@@ -243,6 +556,7 @@ class ChaiscriptLexer(RegexLexer):
|
|
243
556
|
aliases = ['chaiscript', 'chai']
|
244
557
|
filenames = ['*.chai']
|
245
558
|
mimetypes = ['text/x-chaiscript', 'application/x-chaiscript']
|
559
|
+
version_added = '2.0'
|
246
560
|
|
247
561
|
flags = re.DOTALL | re.MULTILINE
|
248
562
|
|
@@ -301,14 +615,14 @@ class ChaiscriptLexer(RegexLexer):
|
|
301
615
|
class LSLLexer(RegexLexer):
|
302
616
|
"""
|
303
617
|
For Second Life's Linden Scripting Language source code.
|
304
|
-
|
305
|
-
.. versionadded:: 2.0
|
306
618
|
"""
|
307
619
|
|
308
620
|
name = 'LSL'
|
309
621
|
aliases = ['lsl']
|
310
622
|
filenames = ['*.lsl']
|
311
623
|
mimetypes = ['text/x-lsl']
|
624
|
+
url = 'https://wiki.secondlife.com/wiki/Linden_Scripting_Language'
|
625
|
+
version_added = '2.0'
|
312
626
|
|
313
627
|
flags = re.MULTILINE
|
314
628
|
|
@@ -389,14 +703,13 @@ class AppleScriptLexer(RegexLexer):
|
|
389
703
|
<http://developer.apple.com/documentation/AppleScript/
|
390
704
|
Reference/StudioReference>`_.
|
391
705
|
Contributed by Andreas Amann <aamann@mac.com>.
|
392
|
-
|
393
|
-
.. versionadded:: 1.0
|
394
706
|
"""
|
395
707
|
|
396
708
|
name = 'AppleScript'
|
397
709
|
url = 'https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html'
|
398
710
|
aliases = ['applescript']
|
399
711
|
filenames = ['*.applescript']
|
712
|
+
version_added = '1.0'
|
400
713
|
|
401
714
|
flags = re.MULTILINE | re.DOTALL
|
402
715
|
|
@@ -672,26 +985,26 @@ class AppleScriptLexer(RegexLexer):
|
|
672
985
|
r'numeric strings|punctuation|white space)',
|
673
986
|
bygroups(Keyword, Name.Builtin)),
|
674
987
|
(r'(-|\*|\+|&|≠|>=?|<=?|=|≥|≤|/|÷|\^)', Operator),
|
675
|
-
(r"\b(
|
988
|
+
(r"\b({})\b".format('|'.join(Operators)), Operator.Word),
|
676
989
|
(r'^(\s*(?:on|end)\s+)'
|
677
|
-
r'(
|
990
|
+
r'({})'.format('|'.join(StudioEvents[::-1])),
|
678
991
|
bygroups(Keyword, Name.Function)),
|
679
992
|
(r'^(\s*)(in|on|script|to)(\s+)', bygroups(Text, Keyword, Text)),
|
680
|
-
(r'\b(as )(
|
993
|
+
(r'\b(as )({})\b'.format('|'.join(Classes)),
|
681
994
|
bygroups(Keyword, Name.Class)),
|
682
|
-
(r'\b(
|
683
|
-
(r'\b(
|
684
|
-
(r'\b(
|
685
|
-
(r'\b(
|
686
|
-
(r'\b(
|
687
|
-
(r'\b(
|
688
|
-
(r'\b(
|
689
|
-
(r'\b(
|
690
|
-
(r'\b(
|
691
|
-
(r'\b(
|
692
|
-
(r'\b(
|
995
|
+
(r'\b({})\b'.format('|'.join(Literals)), Name.Constant),
|
996
|
+
(r'\b({})\b'.format('|'.join(Commands)), Name.Builtin),
|
997
|
+
(r'\b({})\b'.format('|'.join(Control)), Keyword),
|
998
|
+
(r'\b({})\b'.format('|'.join(Declarations)), Keyword),
|
999
|
+
(r'\b({})\b'.format('|'.join(Reserved)), Name.Builtin),
|
1000
|
+
(r'\b({})s?\b'.format('|'.join(BuiltIn)), Name.Builtin),
|
1001
|
+
(r'\b({})\b'.format('|'.join(HandlerParams)), Name.Builtin),
|
1002
|
+
(r'\b({})\b'.format('|'.join(StudioProperties)), Name.Attribute),
|
1003
|
+
(r'\b({})s?\b'.format('|'.join(StudioClasses)), Name.Builtin),
|
1004
|
+
(r'\b({})\b'.format('|'.join(StudioCommands)), Name.Builtin),
|
1005
|
+
(r'\b({})\b'.format('|'.join(References)), Name.Builtin),
|
693
1006
|
(r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
|
694
|
-
(
|
1007
|
+
(rf'\b({Identifiers})\b', Name.Variable),
|
695
1008
|
(r'[-+]?(\d+\.\d*|\d*\.\d+)(E[-+][0-9]+)?', Number.Float),
|
696
1009
|
(r'[-+]?\d+', Number.Integer),
|
697
1010
|
],
|
@@ -710,14 +1023,13 @@ class RexxLexer(RegexLexer):
|
|
710
1023
|
a wide range of different platforms with its roots found on mainframe
|
711
1024
|
systems. It is popular for I/O- and data based tasks and can act as glue
|
712
1025
|
language to bind different applications together.
|
713
|
-
|
714
|
-
.. versionadded:: 2.0
|
715
1026
|
"""
|
716
1027
|
name = 'Rexx'
|
717
1028
|
url = 'http://www.rexxinfo.org/'
|
718
1029
|
aliases = ['rexx', 'arexx']
|
719
1030
|
filenames = ['*.rexx', '*.rex', '*.rx', '*.arexx']
|
720
1031
|
mimetypes = ['text/x-rexx']
|
1032
|
+
version_added = '2.0'
|
721
1033
|
flags = re.IGNORECASE
|
722
1034
|
|
723
1035
|
tokens = {
|
@@ -781,7 +1093,8 @@ class RexxLexer(RegexLexer):
|
|
781
1093
|
]
|
782
1094
|
}
|
783
1095
|
|
784
|
-
_c
|
1096
|
+
def _c(s):
|
1097
|
+
return re.compile(s, re.MULTILINE)
|
785
1098
|
_ADDRESS_COMMAND_PATTERN = _c(r'^\s*address\s+command\b')
|
786
1099
|
_ADDRESS_PATTERN = _c(r'^\s*address\s+')
|
787
1100
|
_DO_WHILE_PATTERN = _c(r'^\s*do\s+while\b')
|
@@ -821,14 +1134,13 @@ class RexxLexer(RegexLexer):
|
|
821
1134
|
class MOOCodeLexer(RegexLexer):
|
822
1135
|
"""
|
823
1136
|
For MOOCode (the MOO scripting language).
|
824
|
-
|
825
|
-
.. versionadded:: 0.9
|
826
1137
|
"""
|
827
1138
|
name = 'MOOCode'
|
828
1139
|
url = 'http://www.moo.mud.org/'
|
829
1140
|
filenames = ['*.moo']
|
830
1141
|
aliases = ['moocode', 'moo']
|
831
1142
|
mimetypes = ['text/x-moocode']
|
1143
|
+
version_added = '0.9'
|
832
1144
|
|
833
1145
|
tokens = {
|
834
1146
|
'root': [
|
@@ -864,14 +1176,14 @@ class MOOCodeLexer(RegexLexer):
|
|
864
1176
|
class HybrisLexer(RegexLexer):
|
865
1177
|
"""
|
866
1178
|
For Hybris source code.
|
867
|
-
|
868
|
-
.. versionadded:: 1.4
|
869
1179
|
"""
|
870
1180
|
|
871
1181
|
name = 'Hybris'
|
872
|
-
aliases = ['hybris'
|
873
|
-
filenames = ['*.
|
1182
|
+
aliases = ['hybris']
|
1183
|
+
filenames = ['*.hyb']
|
874
1184
|
mimetypes = ['text/x-hybris', 'application/x-hybris']
|
1185
|
+
url = 'https://github.com/evilsocket/hybris'
|
1186
|
+
version_added = '1.4'
|
875
1187
|
|
876
1188
|
flags = re.MULTILINE | re.DOTALL
|
877
1189
|
|
@@ -962,13 +1274,13 @@ class EasytrieveLexer(RegexLexer):
|
|
962
1274
|
converting sequential data. Furthermore it can layout data for reports.
|
963
1275
|
It is mainly used on mainframe platforms and can access several of the
|
964
1276
|
mainframe's native file formats. It is somewhat comparable to awk.
|
965
|
-
|
966
|
-
.. versionadded:: 2.1
|
967
1277
|
"""
|
968
1278
|
name = 'Easytrieve'
|
969
1279
|
aliases = ['easytrieve']
|
970
1280
|
filenames = ['*.ezt', '*.mac']
|
971
1281
|
mimetypes = ['text/x-easytrieve']
|
1282
|
+
url = 'https://www.broadcom.com/products/mainframe/application-development/easytrieve-report-generator'
|
1283
|
+
version_added = '2.1'
|
972
1284
|
flags = 0
|
973
1285
|
|
974
1286
|
# Note: We cannot use r'\b' at the start and end of keywords because
|
@@ -1154,13 +1466,14 @@ class JclLexer(RegexLexer):
|
|
1154
1466
|
is a scripting language used on mainframe platforms to instruct the system
|
1155
1467
|
on how to run a batch job or start a subsystem. It is somewhat
|
1156
1468
|
comparable to MS DOS batch and Unix shell scripts.
|
1157
|
-
|
1158
|
-
.. versionadded:: 2.1
|
1159
1469
|
"""
|
1160
1470
|
name = 'JCL'
|
1161
1471
|
aliases = ['jcl']
|
1162
1472
|
filenames = ['*.jcl']
|
1163
1473
|
mimetypes = ['text/x-jcl']
|
1474
|
+
url = 'https://en.wikipedia.org/wiki/Job_Control_Language'
|
1475
|
+
version_added = '2.1'
|
1476
|
+
|
1164
1477
|
flags = re.IGNORECASE
|
1165
1478
|
|
1166
1479
|
tokens = {
|
@@ -1234,8 +1547,6 @@ class JclLexer(RegexLexer):
|
|
1234
1547
|
class MiniScriptLexer(RegexLexer):
|
1235
1548
|
"""
|
1236
1549
|
For MiniScript source code.
|
1237
|
-
|
1238
|
-
.. versionadded:: 2.6
|
1239
1550
|
"""
|
1240
1551
|
|
1241
1552
|
name = 'MiniScript'
|
@@ -1243,6 +1554,7 @@ class MiniScriptLexer(RegexLexer):
|
|
1243
1554
|
aliases = ['miniscript', 'ms']
|
1244
1555
|
filenames = ['*.ms']
|
1245
1556
|
mimetypes = ['text/x-minicript', 'application/x-miniscript']
|
1557
|
+
version_added = '2.6'
|
1246
1558
|
|
1247
1559
|
tokens = {
|
1248
1560
|
'root': [
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for Smart Game Format (sgf) file format.
|
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,13 +20,12 @@ class SmartGameFormatLexer(RegexLexer):
|
|
20
20
|
|
21
21
|
The format is used to store game records of board games for two players
|
22
22
|
(mainly Go game).
|
23
|
-
|
24
|
-
.. versionadded:: 2.4
|
25
23
|
"""
|
26
24
|
name = 'SmartGameFormat'
|
27
25
|
url = 'https://www.red-bean.com/sgf/'
|
28
26
|
aliases = ['sgf']
|
29
27
|
filenames = ['*.sgf']
|
28
|
+
version_added = '2.4'
|
30
29
|
|
31
30
|
tokens = {
|
32
31
|
'root': [
|