pygments.rb 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.rubocop.yml +7 -0
- data/CHANGELOG.adoc +4 -0
- data/README.adoc +1 -1
- data/bench.rb +1 -1
- data/lib/pygments/popen.rb +3 -7
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +2 -2
- data/test/test_pygments.rb +0 -19
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/AUTHORS +21 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/LICENSE +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/METADATA +19 -11
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +614 -0
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/WHEEL +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/entry_points.txt +0 -1
- data/vendor/pygments-main/bin/pygmentize +1 -1
- data/vendor/pygments-main/pygments/__init__.py +20 -22
- data/vendor/pygments-main/pygments/__main__.py +1 -1
- data/vendor/pygments-main/pygments/cmdline.py +74 -8
- data/vendor/pygments-main/pygments/console.py +1 -1
- data/vendor/pygments-main/pygments/filter.py +1 -1
- data/vendor/pygments-main/pygments/filters/__init__.py +6 -3
- data/vendor/pygments-main/pygments/formatter.py +41 -11
- data/vendor/pygments-main/pygments/formatters/__init__.py +21 -16
- data/vendor/pygments-main/pygments/formatters/_mapping.py +5 -65
- data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
- data/vendor/pygments-main/pygments/formatters/groff.py +170 -0
- data/vendor/pygments-main/pygments/formatters/html.py +54 -32
- data/vendor/pygments-main/pygments/formatters/img.py +9 -5
- data/vendor/pygments-main/pygments/formatters/irc.py +6 -33
- data/vendor/pygments-main/pygments/formatters/latex.py +24 -14
- data/vendor/pygments-main/pygments/formatters/other.py +1 -1
- data/vendor/pygments-main/pygments/formatters/pangomarkup.py +1 -1
- data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
- data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -3
- data/vendor/pygments-main/pygments/formatters/terminal256.py +2 -4
- data/vendor/pygments-main/pygments/lexer.py +101 -32
- data/vendor/pygments-main/pygments/lexers/__init__.py +50 -29
- data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +103 -0
- data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +2 -2
- data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +21 -6
- data/vendor/pygments-main/pygments/lexers/_css_builtins.py +558 -0
- data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +10 -0
- data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +4932 -0
- data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +11 -18
- data/vendor/pygments-main/pygments/lexers/_mapping.py +71 -82
- data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +58 -4
- data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_php_builtins.py +408 -1835
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +70 -8
- data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +666 -0
- data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1609 -0
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +9 -18
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +185 -94
- data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/actionscript.py +15 -14
- data/vendor/pygments-main/pygments/lexers/ada.py +144 -0
- data/vendor/pygments-main/pygments/lexers/agile.py +1 -1
- data/vendor/pygments-main/pygments/lexers/algebra.py +72 -9
- data/vendor/pygments-main/pygments/lexers/ambient.py +8 -7
- data/vendor/pygments-main/pygments/lexers/amdgpu.py +4 -3
- data/vendor/pygments-main/pygments/lexers/ampl.py +10 -8
- data/vendor/pygments-main/pygments/lexers/apdlexer.py +164 -20
- data/vendor/pygments-main/pygments/lexers/apl.py +6 -5
- data/vendor/pygments-main/pygments/lexers/archetype.py +23 -21
- data/vendor/pygments-main/pygments/lexers/arrow.py +10 -9
- data/vendor/pygments-main/pygments/lexers/arturo.py +250 -0
- data/vendor/pygments-main/pygments/lexers/asc.py +9 -5
- data/vendor/pygments-main/pygments/lexers/asm.py +68 -63
- data/vendor/pygments-main/pygments/lexers/automation.py +7 -5
- data/vendor/pygments-main/pygments/lexers/bare.py +20 -21
- data/vendor/pygments-main/pygments/lexers/basic.py +45 -41
- data/vendor/pygments-main/pygments/lexers/bdd.py +58 -0
- data/vendor/pygments-main/pygments/lexers/berry.py +99 -0
- data/vendor/pygments-main/pygments/lexers/bibtex.py +6 -6
- data/vendor/pygments-main/pygments/lexers/boa.py +4 -8
- data/vendor/pygments-main/pygments/lexers/business.py +18 -18
- data/vendor/pygments-main/pygments/lexers/c_cpp.py +80 -40
- data/vendor/pygments-main/pygments/lexers/c_like.py +21 -19
- data/vendor/pygments-main/pygments/lexers/capnproto.py +6 -8
- data/vendor/pygments-main/pygments/lexers/carbon.py +96 -0
- data/vendor/pygments-main/pygments/lexers/cddl.py +16 -33
- data/vendor/pygments-main/pygments/lexers/chapel.py +14 -9
- data/vendor/pygments-main/pygments/lexers/clean.py +3 -2
- data/vendor/pygments-main/pygments/lexers/comal.py +80 -0
- data/vendor/pygments-main/pygments/lexers/compiled.py +3 -2
- data/vendor/pygments-main/pygments/lexers/configs.py +235 -120
- data/vendor/pygments-main/pygments/lexers/console.py +5 -4
- data/vendor/pygments-main/pygments/lexers/cplint.py +44 -0
- data/vendor/pygments-main/pygments/lexers/crystal.py +22 -23
- data/vendor/pygments-main/pygments/lexers/csound.py +19 -17
- data/vendor/pygments-main/pygments/lexers/css.py +67 -159
- data/vendor/pygments-main/pygments/lexers/d.py +15 -12
- data/vendor/pygments-main/pygments/lexers/dalvik.py +14 -11
- data/vendor/pygments-main/pygments/lexers/data.py +119 -49
- data/vendor/pygments-main/pygments/lexers/dax.py +136 -0
- data/vendor/pygments-main/pygments/lexers/devicetree.py +9 -8
- data/vendor/pygments-main/pygments/lexers/diff.py +23 -19
- data/vendor/pygments-main/pygments/lexers/dotnet.py +216 -81
- data/vendor/pygments-main/pygments/lexers/dsls.py +86 -64
- data/vendor/pygments-main/pygments/lexers/dylan.py +16 -15
- data/vendor/pygments-main/pygments/lexers/ecl.py +46 -38
- data/vendor/pygments-main/pygments/lexers/eiffel.py +15 -10
- data/vendor/pygments-main/pygments/lexers/elm.py +12 -8
- data/vendor/pygments-main/pygments/lexers/elpi.py +165 -0
- data/vendor/pygments-main/pygments/lexers/email.py +21 -39
- data/vendor/pygments-main/pygments/lexers/erlang.py +21 -22
- data/vendor/pygments-main/pygments/lexers/esoteric.py +28 -30
- data/vendor/pygments-main/pygments/lexers/ezhil.py +10 -9
- data/vendor/pygments-main/pygments/lexers/factor.py +104 -83
- data/vendor/pygments-main/pygments/lexers/fantom.py +31 -29
- data/vendor/pygments-main/pygments/lexers/felix.py +18 -14
- data/vendor/pygments-main/pygments/lexers/fift.py +67 -0
- data/vendor/pygments-main/pygments/lexers/floscript.py +7 -7
- data/vendor/pygments-main/pygments/lexers/forth.py +8 -6
- data/vendor/pygments-main/pygments/lexers/fortran.py +16 -11
- data/vendor/pygments-main/pygments/lexers/foxpro.py +2 -2
- data/vendor/pygments-main/pygments/lexers/freefem.py +7 -10
- data/vendor/pygments-main/pygments/lexers/func.py +108 -0
- data/vendor/pygments-main/pygments/lexers/functional.py +1 -1
- data/vendor/pygments-main/pygments/lexers/futhark.py +12 -17
- data/vendor/pygments-main/pygments/lexers/gcodelexer.py +1 -2
- data/vendor/pygments-main/pygments/lexers/gdscript.py +76 -233
- data/vendor/pygments-main/pygments/lexers/go.py +12 -14
- data/vendor/pygments-main/pygments/lexers/grammar_notation.py +22 -26
- data/vendor/pygments-main/pygments/lexers/graph.py +36 -15
- data/vendor/pygments-main/pygments/lexers/graphics.py +37 -38
- data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -1
- data/vendor/pygments-main/pygments/lexers/gsql.py +39 -27
- data/vendor/pygments-main/pygments/lexers/haskell.py +73 -71
- data/vendor/pygments-main/pygments/lexers/haxe.py +13 -11
- data/vendor/pygments-main/pygments/lexers/hdl.py +31 -34
- data/vendor/pygments-main/pygments/lexers/hexdump.py +21 -21
- data/vendor/pygments-main/pygments/lexers/html.py +11 -19
- data/vendor/pygments-main/pygments/lexers/idl.py +10 -5
- data/vendor/pygments-main/pygments/lexers/igor.py +3 -2
- data/vendor/pygments-main/pygments/lexers/inferno.py +9 -8
- data/vendor/pygments-main/pygments/lexers/installers.py +39 -33
- data/vendor/pygments-main/pygments/lexers/int_fiction.py +35 -20
- data/vendor/pygments-main/pygments/lexers/iolang.py +9 -9
- data/vendor/pygments-main/pygments/lexers/j.py +20 -13
- data/vendor/pygments-main/pygments/lexers/javascript.py +183 -149
- data/vendor/pygments-main/pygments/lexers/jmespath.py +68 -0
- data/vendor/pygments-main/pygments/lexers/jslt.py +4 -3
- data/vendor/pygments-main/pygments/lexers/jsonnet.py +168 -0
- data/vendor/pygments-main/pygments/lexers/julia.py +44 -32
- data/vendor/pygments-main/pygments/lexers/jvm.py +161 -140
- data/vendor/pygments-main/pygments/lexers/kuin.py +93 -59
- data/vendor/pygments-main/pygments/lexers/lilypond.py +226 -0
- data/vendor/pygments-main/pygments/lexers/lisp.py +244 -107
- data/vendor/pygments-main/pygments/lexers/macaulay2.py +1739 -0
- data/vendor/pygments-main/pygments/lexers/make.py +21 -16
- data/vendor/pygments-main/pygments/lexers/markup.py +752 -11
- data/vendor/pygments-main/pygments/lexers/math.py +1 -1
- data/vendor/pygments-main/pygments/lexers/matlab.py +18 -3
- data/vendor/pygments-main/pygments/lexers/maxima.py +85 -0
- data/vendor/pygments-main/pygments/lexers/meson.py +10 -25
- data/vendor/pygments-main/pygments/lexers/mime.py +2 -2
- data/vendor/pygments-main/pygments/lexers/minecraft.py +394 -0
- data/vendor/pygments-main/pygments/lexers/mips.py +128 -0
- data/vendor/pygments-main/pygments/lexers/ml.py +9 -6
- data/vendor/pygments-main/pygments/lexers/modeling.py +12 -8
- data/vendor/pygments-main/pygments/lexers/modula2.py +3 -2
- data/vendor/pygments-main/pygments/lexers/monte.py +3 -2
- data/vendor/pygments-main/pygments/lexers/mosel.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ncl.py +1 -1
- data/vendor/pygments-main/pygments/lexers/nimrod.py +62 -20
- data/vendor/pygments-main/pygments/lexers/nit.py +3 -2
- data/vendor/pygments-main/pygments/lexers/nix.py +5 -5
- data/vendor/pygments-main/pygments/lexers/oberon.py +2 -2
- data/vendor/pygments-main/pygments/lexers/objective.py +6 -4
- data/vendor/pygments-main/pygments/lexers/ooc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/other.py +1 -1
- data/vendor/pygments-main/pygments/lexers/parasail.py +3 -2
- data/vendor/pygments-main/pygments/lexers/parsers.py +23 -21
- data/vendor/pygments-main/pygments/lexers/pascal.py +196 -198
- data/vendor/pygments-main/pygments/lexers/pawn.py +1 -1
- data/vendor/pygments-main/pygments/lexers/perl.py +17 -15
- data/vendor/pygments-main/pygments/lexers/phix.py +364 -0
- data/vendor/pygments-main/pygments/lexers/php.py +35 -20
- data/vendor/pygments-main/pygments/lexers/pointless.py +3 -2
- data/vendor/pygments-main/pygments/lexers/pony.py +1 -1
- data/vendor/pygments-main/pygments/lexers/praat.py +41 -38
- data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
- data/vendor/pygments-main/pygments/lexers/prolog.py +7 -8
- data/vendor/pygments-main/pygments/lexers/promql.py +5 -12
- data/vendor/pygments-main/pygments/lexers/python.py +145 -119
- data/vendor/pygments-main/pygments/lexers/q.py +188 -0
- data/vendor/pygments-main/pygments/lexers/qlik.py +117 -0
- data/vendor/pygments-main/pygments/lexers/qvt.py +1 -1
- data/vendor/pygments-main/pygments/lexers/r.py +4 -4
- data/vendor/pygments-main/pygments/lexers/rdf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/rebol.py +1 -12
- data/vendor/pygments-main/pygments/lexers/resource.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ride.py +3 -2
- data/vendor/pygments-main/pygments/lexers/rita.py +43 -0
- data/vendor/pygments-main/pygments/lexers/rnc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/roboconf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/robotframework.py +6 -5
- data/vendor/pygments-main/pygments/lexers/ruby.py +24 -24
- data/vendor/pygments-main/pygments/lexers/rust.py +3 -2
- data/vendor/pygments-main/pygments/lexers/sas.py +2 -2
- data/vendor/pygments-main/pygments/lexers/savi.py +170 -0
- data/vendor/pygments-main/pygments/lexers/scdoc.py +4 -7
- data/vendor/pygments-main/pygments/lexers/scripting.py +24 -21
- data/vendor/pygments-main/pygments/lexers/sgf.py +6 -6
- data/vendor/pygments-main/pygments/lexers/shell.py +29 -21
- data/vendor/pygments-main/pygments/lexers/sieve.py +14 -4
- data/vendor/pygments-main/pygments/lexers/slash.py +1 -1
- data/vendor/pygments-main/pygments/lexers/smalltalk.py +5 -3
- data/vendor/pygments-main/pygments/lexers/smithy.py +5 -6
- data/vendor/pygments-main/pygments/lexers/smv.py +1 -1
- data/vendor/pygments-main/pygments/lexers/snobol.py +1 -1
- data/vendor/pygments-main/pygments/lexers/solidity.py +3 -7
- data/vendor/pygments-main/pygments/lexers/sophia.py +103 -0
- data/vendor/pygments-main/pygments/lexers/special.py +2 -5
- data/vendor/pygments-main/pygments/lexers/spice.py +71 -0
- data/vendor/pygments-main/pygments/lexers/sql.py +212 -17
- data/vendor/pygments-main/pygments/lexers/srcinfo.py +62 -0
- data/vendor/pygments-main/pygments/lexers/stata.py +4 -3
- data/vendor/pygments-main/pygments/lexers/supercollider.py +4 -3
- data/vendor/pygments-main/pygments/lexers/tal.py +74 -0
- data/vendor/pygments-main/pygments/lexers/tcl.py +21 -16
- data/vendor/pygments-main/pygments/lexers/teal.py +9 -8
- data/vendor/pygments-main/pygments/lexers/templates.py +62 -29
- data/vendor/pygments-main/pygments/lexers/teraterm.py +12 -20
- data/vendor/pygments-main/pygments/lexers/testing.py +6 -2
- data/vendor/pygments-main/pygments/lexers/text.py +3 -2
- data/vendor/pygments-main/pygments/lexers/textedit.py +41 -7
- data/vendor/pygments-main/pygments/lexers/textfmts.py +7 -5
- data/vendor/pygments-main/pygments/lexers/theorem.py +42 -36
- data/vendor/pygments-main/pygments/lexers/thingsdb.py +2 -4
- data/vendor/pygments-main/pygments/lexers/tlb.py +57 -0
- data/vendor/pygments-main/pygments/lexers/tnt.py +3 -4
- data/vendor/pygments-main/pygments/lexers/trafficscript.py +2 -4
- data/vendor/pygments-main/pygments/lexers/typoscript.py +2 -3
- data/vendor/pygments-main/pygments/lexers/ul4.py +267 -0
- data/vendor/pygments-main/pygments/lexers/unicon.py +1 -1
- data/vendor/pygments-main/pygments/lexers/urbi.py +4 -4
- data/vendor/pygments-main/pygments/lexers/usd.py +2 -1
- data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
- data/vendor/pygments-main/pygments/lexers/verification.py +4 -3
- data/vendor/pygments-main/pygments/lexers/web.py +1 -1
- data/vendor/pygments-main/pygments/lexers/webassembly.py +5 -5
- data/vendor/pygments-main/pygments/lexers/webidl.py +2 -1
- data/vendor/pygments-main/pygments/lexers/webmisc.py +90 -71
- data/vendor/pygments-main/pygments/lexers/wgsl.py +407 -0
- data/vendor/pygments-main/pygments/lexers/whiley.py +2 -1
- data/vendor/pygments-main/pygments/lexers/wowtoc.py +120 -0
- data/vendor/pygments-main/pygments/lexers/wren.py +99 -0
- data/vendor/pygments-main/pygments/lexers/x10.py +5 -6
- data/vendor/pygments-main/pygments/lexers/xorg.py +3 -2
- data/vendor/pygments-main/pygments/lexers/yang.py +6 -5
- data/vendor/pygments-main/pygments/lexers/zig.py +3 -2
- data/vendor/pygments-main/pygments/modeline.py +1 -1
- data/vendor/pygments-main/pygments/plugin.py +28 -9
- data/vendor/pygments-main/pygments/regexopt.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +2 -2
- data/vendor/pygments-main/pygments/sphinxext.py +63 -1
- data/vendor/pygments-main/pygments/style.py +7 -1
- data/vendor/pygments-main/pygments/styles/__init__.py +19 -5
- data/vendor/pygments-main/pygments/styles/abap.py +2 -2
- data/vendor/pygments-main/pygments/styles/algol.py +1 -2
- data/vendor/pygments-main/pygments/styles/algol_nu.py +1 -2
- data/vendor/pygments-main/pygments/styles/arduino.py +2 -3
- data/vendor/pygments-main/pygments/styles/autumn.py +1 -3
- data/vendor/pygments-main/pygments/styles/borland.py +1 -3
- data/vendor/pygments-main/pygments/styles/bw.py +1 -2
- data/vendor/pygments-main/pygments/styles/colorful.py +1 -3
- data/vendor/pygments-main/pygments/styles/default.py +13 -14
- data/vendor/pygments-main/pygments/styles/dracula.py +102 -0
- data/vendor/pygments-main/pygments/styles/emacs.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +75 -0
- data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
- data/vendor/pygments-main/pygments/styles/gh_dark.py +107 -0
- data/vendor/pygments-main/pygments/styles/gruvbox.py +4 -2
- data/vendor/pygments-main/pygments/styles/igor.py +1 -2
- data/vendor/pygments-main/pygments/styles/inkpot.py +3 -2
- data/vendor/pygments-main/pygments/styles/lilypond.py +56 -0
- data/vendor/pygments-main/pygments/styles/lovelace.py +1 -3
- data/vendor/pygments-main/pygments/styles/manni.py +1 -1
- data/vendor/pygments-main/pygments/styles/material.py +1 -2
- data/vendor/pygments-main/pygments/styles/monokai.py +3 -3
- data/vendor/pygments-main/pygments/styles/murphy.py +1 -3
- data/vendor/pygments-main/pygments/styles/native.py +11 -11
- data/vendor/pygments-main/pygments/styles/nord.py +150 -0
- data/vendor/pygments-main/pygments/styles/onedark.py +59 -0
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -6
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -6
- data/vendor/pygments-main/pygments/styles/pastie.py +1 -3
- data/vendor/pygments-main/pygments/styles/perldoc.py +1 -2
- data/vendor/pygments-main/pygments/styles/rainbow_dash.py +3 -3
- data/vendor/pygments-main/pygments/styles/rrt.py +3 -2
- data/vendor/pygments-main/pygments/styles/sas.py +2 -4
- data/vendor/pygments-main/pygments/styles/solarized.py +1 -1
- data/vendor/pygments-main/pygments/styles/staroffice.py +26 -0
- data/vendor/pygments-main/pygments/styles/stata_dark.py +4 -6
- data/vendor/pygments-main/pygments/styles/stata_light.py +1 -2
- data/vendor/pygments-main/pygments/styles/tango.py +2 -3
- data/vendor/pygments-main/pygments/styles/trac.py +1 -3
- data/vendor/pygments-main/pygments/styles/vim.py +1 -2
- data/vendor/pygments-main/pygments/styles/vs.py +1 -2
- data/vendor/pygments-main/pygments/styles/xcode.py +1 -3
- data/vendor/pygments-main/pygments/styles/zenburn.py +4 -6
- data/vendor/pygments-main/pygments/token.py +2 -1
- data/vendor/pygments-main/pygments/unistring.py +4 -6
- data/vendor/pygments-main/pygments/util.py +27 -5
- metadata +59 -14
- data/vendor/pygments-main/Pygments-2.10.0.dist-info/RECORD +0 -524
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/INSTALLER +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/REQUESTED +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,250 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.arturo
|
3
|
+
~~~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexer for the Arturo language.
|
6
|
+
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
|
+
:license: BSD, see LICENSE for details.
|
9
|
+
"""
|
10
|
+
|
11
|
+
from pygments.lexer import RegexLexer, bygroups, do_insertions, include, \
|
12
|
+
this, using, words
|
13
|
+
from pygments.token import Comment, Error, Keyword, Name, Number, Operator, \
|
14
|
+
Punctuation, String, Text
|
15
|
+
|
16
|
+
from pygments.util import ClassNotFound, get_bool_opt
|
17
|
+
|
18
|
+
__all__ = ['ArturoLexer']
|
19
|
+
|
20
|
+
|
21
|
+
class ArturoLexer(RegexLexer):
|
22
|
+
"""
|
23
|
+
For Arturo source code.
|
24
|
+
|
25
|
+
See `Arturo's Github <https://github.com/arturo-lang/arturo>`_
|
26
|
+
and `Arturo's Website <https://arturo-lang.io/>`_.
|
27
|
+
|
28
|
+
.. versionadded:: 2.14.0
|
29
|
+
"""
|
30
|
+
|
31
|
+
name = 'Arturo'
|
32
|
+
aliases = ['arturo', 'art']
|
33
|
+
filenames = ['*.art']
|
34
|
+
url = 'https://arturo-lang.io/'
|
35
|
+
|
36
|
+
def __init__(self, **options):
|
37
|
+
self.handle_annotateds = get_bool_opt(options, 'handle_annotateds',
|
38
|
+
True)
|
39
|
+
RegexLexer.__init__(self, **options)
|
40
|
+
|
41
|
+
def handle_annotated_strings(self, match):
|
42
|
+
"""Adds syntax from another languages inside annotated strings
|
43
|
+
|
44
|
+
match args:
|
45
|
+
1:open_string,
|
46
|
+
2:exclamation_mark,
|
47
|
+
3:lang_name,
|
48
|
+
4:space_or_newline,
|
49
|
+
5:code,
|
50
|
+
6:close_string
|
51
|
+
"""
|
52
|
+
from pygments.lexers import get_lexer_by_name
|
53
|
+
|
54
|
+
# Header's section
|
55
|
+
yield match.start(1), String.Double, match.group(1)
|
56
|
+
yield match.start(2), String.Interpol, match.group(2)
|
57
|
+
yield match.start(3), String.Interpol, match.group(3)
|
58
|
+
yield match.start(4), Text.Whitespace, match.group(4)
|
59
|
+
|
60
|
+
lexer = None
|
61
|
+
if self.handle_annotateds:
|
62
|
+
try:
|
63
|
+
lexer = get_lexer_by_name(match.group(3).strip())
|
64
|
+
except ClassNotFound:
|
65
|
+
pass
|
66
|
+
code = match.group(5)
|
67
|
+
|
68
|
+
if lexer is None:
|
69
|
+
yield match.group(5), String, code
|
70
|
+
else:
|
71
|
+
yield from do_insertions([], lexer.get_tokens_unprocessed(code))
|
72
|
+
|
73
|
+
yield match.start(6), String.Double, match.group(6)
|
74
|
+
|
75
|
+
tokens = {
|
76
|
+
'root': [
|
77
|
+
(r';.*?$', Comment.Single),
|
78
|
+
(r'^((\s#!)|(#!)).*?$', Comment.Hashbang),
|
79
|
+
|
80
|
+
# Constants
|
81
|
+
(words(('false', 'true', 'maybe'), # boolean
|
82
|
+
suffix=r'\b'), Name.Constant),
|
83
|
+
(words(('this', 'init'), # class related keywords
|
84
|
+
prefix=r'\b', suffix=r'\b\??:?'), Name.Builtin.Pseudo),
|
85
|
+
(r'`.`', String.Char), # character
|
86
|
+
(r'\\\w+\b\??:?', Name.Property), # array index
|
87
|
+
(r'#\w+', Name.Constant), # color
|
88
|
+
(r'\b[0-9]+\.[0-9]+', Number.Float), # float
|
89
|
+
(r'\b[0-9]+', Number.Integer), # integer
|
90
|
+
(r'\w+\b\??:', Name.Label), # label
|
91
|
+
# Note: Literals can be labeled too
|
92
|
+
(r'\'(?:\w+\b\??:?)', Keyword.Declaration), # literal
|
93
|
+
(r'\:\w+', Keyword.Type), # type
|
94
|
+
# Note: Attributes can be labeled too
|
95
|
+
(r'\.\w+\??:?', Name.Attribute), # attributes
|
96
|
+
|
97
|
+
# Switch structure
|
98
|
+
(r'(\()(.*?)(\)\?)',
|
99
|
+
bygroups(Punctuation, using(this), Punctuation)),
|
100
|
+
|
101
|
+
# Single Line Strings
|
102
|
+
(r'"', String.Double, 'inside-simple-string'),
|
103
|
+
(r'»', String.Single, 'inside-smart-string'),
|
104
|
+
(r'«««', String.Double, 'inside-safe-string'),
|
105
|
+
(r'\{\/', String.Single, 'inside-regex-string'),
|
106
|
+
|
107
|
+
# Multi Line Strings
|
108
|
+
(r'\{\:', String.Double, 'inside-curly-verb-string'),
|
109
|
+
(r'(\{)(\!)(\w+)(\s|\n)([\w\W]*?)(^\})', handle_annotated_strings),
|
110
|
+
(r'\{', String.Single, 'inside-curly-string'),
|
111
|
+
(r'\-{3,}', String.Single, 'inside-eof-string'),
|
112
|
+
|
113
|
+
include('builtin-functions'),
|
114
|
+
|
115
|
+
# Operators
|
116
|
+
(r'[()[\],]', Punctuation),
|
117
|
+
(words(('->', '==>', '|', '::', '@', '#', # sugar syntax
|
118
|
+
'$', '&', '!', '!!', './')), Name.Decorator),
|
119
|
+
(words(('<:', ':>', ':<', '>:', '<\\', '<>', '<', '>',
|
120
|
+
'ø', '∞',
|
121
|
+
'+', '-', '*', '~', '=', '^', '%', '/', '//',
|
122
|
+
'==>', '<=>', '<==>',
|
123
|
+
'=>>', '<<=>>', '<<==>>',
|
124
|
+
'-->', '<->', '<-->',
|
125
|
+
'=|', '|=', '-:', ':-',
|
126
|
+
'_', '.', '..', '\\')), Operator),
|
127
|
+
|
128
|
+
(r'\b\w+', Name),
|
129
|
+
(r'\s+', Text.Whitespace),
|
130
|
+
(r'.+$', Error),
|
131
|
+
],
|
132
|
+
|
133
|
+
'inside-interpol': [
|
134
|
+
(r'\|', String.Interpol, '#pop'),
|
135
|
+
(r'[^|]+', using(this)),
|
136
|
+
],
|
137
|
+
'inside-template': [
|
138
|
+
(r'\|\|\>', String.Interpol, '#pop'),
|
139
|
+
(r'[^|]+', using(this)),
|
140
|
+
],
|
141
|
+
'string-escape': [
|
142
|
+
(words(('\\\\', '\\n', '\\t', '\\"')), String.Escape),
|
143
|
+
],
|
144
|
+
|
145
|
+
'inside-simple-string': [
|
146
|
+
include('string-escape'),
|
147
|
+
(r'\|', String.Interpol, 'inside-interpol'), # Interpolation
|
148
|
+
(r'\<\|\|', String.Interpol, 'inside-template'), # Templates
|
149
|
+
(r'"', String.Double, '#pop'), # Closing Quote
|
150
|
+
(r'[^|"]+', String) # String Content
|
151
|
+
],
|
152
|
+
'inside-smart-string': [
|
153
|
+
include('string-escape'),
|
154
|
+
(r'\|', String.Interpol, 'inside-interpol'), # Interpolation
|
155
|
+
(r'\<\|\|', String.Interpol, 'inside-template'), # Templates
|
156
|
+
(r'\n', String.Single, '#pop'), # Closing Quote
|
157
|
+
(r'[^|\n]+', String) # String Content
|
158
|
+
],
|
159
|
+
'inside-safe-string': [
|
160
|
+
include('string-escape'),
|
161
|
+
(r'\|', String.Interpol, 'inside-interpol'), # Interpolation
|
162
|
+
(r'\<\|\|', String.Interpol, 'inside-template'), # Templates
|
163
|
+
(r'»»»', String.Double, '#pop'), # Closing Quote
|
164
|
+
(r'[^|»]+', String) # String Content
|
165
|
+
],
|
166
|
+
'inside-regex-string': [
|
167
|
+
(r'\\[sSwWdDbBZApPxucItnvfr0]+', String.Escape),
|
168
|
+
(r'\|', String.Interpol, 'inside-interpol'), # Interpolation
|
169
|
+
(r'\<\|\|', String.Interpol, 'inside-template'), # Templates
|
170
|
+
(r'\/\}', String.Single, '#pop'), # Closing Quote
|
171
|
+
(r'[^|\/]+', String.Regex), # String Content
|
172
|
+
],
|
173
|
+
'inside-curly-verb-string': [
|
174
|
+
include('string-escape'),
|
175
|
+
(r'\|', String.Interpol, 'inside-interpol'), # Interpolation
|
176
|
+
(r'\<\|\|', String.Interpol, 'inside-template'), # Templates
|
177
|
+
(r'\:\}', String.Double, '#pop'), # Closing Quote
|
178
|
+
(r'[^|<:]+', String), # String Content
|
179
|
+
],
|
180
|
+
'inside-curly-string': [
|
181
|
+
include('string-escape'),
|
182
|
+
(r'\|', String.Interpol, 'inside-interpol'), # Interpolation
|
183
|
+
(r'\<\|\|', String.Interpol, 'inside-template'), # Templates
|
184
|
+
(r'\}', String.Single, '#pop'), # Closing Quote
|
185
|
+
(r'[^|<}]+', String), # String Content
|
186
|
+
],
|
187
|
+
'inside-eof-string': [
|
188
|
+
include('string-escape'),
|
189
|
+
(r'\|', String.Interpol, 'inside-interpol'), # Interpolation
|
190
|
+
(r'\<\|\|', String.Interpol, 'inside-template'), # Templates
|
191
|
+
(r'\Z', String.Single, '#pop'), # Closing Quote
|
192
|
+
(r'[^|<]+', String), # String Content
|
193
|
+
],
|
194
|
+
|
195
|
+
'builtin-functions': [
|
196
|
+
(words((
|
197
|
+
'all', 'and', 'any', 'ascii', 'attr', 'attribute',
|
198
|
+
'attributeLabel', 'binary', 'block' 'char', 'contains',
|
199
|
+
'database', 'date', 'dictionary', 'empty', 'equal', 'even',
|
200
|
+
'every', 'exists', 'false', 'floatin', 'function', 'greater',
|
201
|
+
'greaterOrEqual', 'if', 'in', 'inline', 'integer', 'is',
|
202
|
+
'key', 'label', 'leap', 'less', 'lessOrEqual', 'literal',
|
203
|
+
'logical', 'lower', 'nand', 'negative', 'nor', 'not',
|
204
|
+
'notEqual', 'null', 'numeric', 'odd', 'or', 'path',
|
205
|
+
'pathLabel', 'positive', 'prefix', 'prime', 'set', 'some',
|
206
|
+
'sorted', 'standalone', 'string', 'subset', 'suffix',
|
207
|
+
'superset', 'ymbol', 'true', 'try', 'type', 'unless', 'upper',
|
208
|
+
'when', 'whitespace', 'word', 'xnor', 'xor', 'zero',
|
209
|
+
), prefix=r'\b', suffix=r'\b\?'), Name.Builtin),
|
210
|
+
(words((
|
211
|
+
'abs', 'acos', 'acosh', 'acsec', 'acsech', 'actan', 'actanh',
|
212
|
+
'add', 'after', 'alphabet', 'and', 'angle', 'append', 'arg',
|
213
|
+
'args', 'arity', 'array', 'as', 'asec', 'asech', 'asin',
|
214
|
+
'asinh', 'atan', 'atan2', 'atanh', 'attr', 'attrs', 'average',
|
215
|
+
'before', 'benchmark', 'blend', 'break', 'builtins1',
|
216
|
+
'builtins2', 'call', 'capitalize', 'case', 'ceil', 'chop',
|
217
|
+
'chunk', 'clear', 'close', 'cluster', 'color', 'combine',
|
218
|
+
'conj', 'continue', 'copy', 'cos', 'cosh', 'couple', 'csec',
|
219
|
+
'csech', 'ctan', 'ctanh', 'cursor', 'darken', 'dec', 'decode',
|
220
|
+
'decouple', 'define', 'delete', 'desaturate', 'deviation',
|
221
|
+
'dictionary', 'difference', 'digest', 'digits', 'div', 'do',
|
222
|
+
'download', 'drop', 'dup', 'e', 'else', 'empty', 'encode',
|
223
|
+
'ensure', 'env', 'epsilon', 'escape', 'execute', 'exit', 'exp',
|
224
|
+
'extend', 'extract', 'factors', 'false', 'fdiv', 'filter',
|
225
|
+
'first', 'flatten', 'floor', 'fold', 'from', 'function',
|
226
|
+
'gamma', 'gcd', 'get', 'goto', 'hash', 'help', 'hypot', 'if',
|
227
|
+
'in', 'inc', 'indent', 'index', 'infinity', 'info', 'input',
|
228
|
+
'insert', 'inspect', 'intersection', 'invert', 'join', 'keys',
|
229
|
+
'kurtosis', 'last', 'let', 'levenshtein', 'lighten', 'list',
|
230
|
+
'ln', 'log', 'loop', 'lower', 'mail', 'map', 'match', 'max',
|
231
|
+
'maybe', 'median', 'min', 'mod', 'module', 'mul', 'nand',
|
232
|
+
'neg', 'new', 'nor', 'normalize', 'not', 'now', 'null', 'open',
|
233
|
+
'or', 'outdent', 'pad', 'panic', 'path', 'pause',
|
234
|
+
'permissions', 'permutate', 'pi', 'pop', 'pow', 'powerset',
|
235
|
+
'powmod', 'prefix', 'print', 'prints', 'process', 'product',
|
236
|
+
'query', 'random', 'range', 'read', 'relative', 'remove',
|
237
|
+
'rename', 'render', 'repeat', 'replace', 'request', 'return',
|
238
|
+
'reverse', 'round', 'sample', 'saturate', 'script', 'sec',
|
239
|
+
'sech', 'select', 'serve', 'set', 'shl', 'shr', 'shuffle',
|
240
|
+
'sin', 'sinh', 'size', 'skewness', 'slice', 'sort', 'split',
|
241
|
+
'sqrt', 'squeeze', 'stack', 'strip', 'sub', 'suffix', 'sum',
|
242
|
+
'switch', 'symbols', 'symlink', 'sys', 'take', 'tan', 'tanh',
|
243
|
+
'terminal', 'to', 'true', 'truncate', 'try', 'type', 'union',
|
244
|
+
'unique', 'unless', 'until', 'unzip', 'upper', 'values', 'var',
|
245
|
+
'variance', 'volume', 'webview', 'while', 'with', 'wordwrap',
|
246
|
+
'write', 'xnor', 'xor', 'zip'
|
247
|
+
), prefix=r'\b', suffix=r'\b'), Name.Builtin)
|
248
|
+
],
|
249
|
+
|
250
|
+
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for various ASCII armored files.
|
6
6
|
|
7
|
-
:copyright: Copyright
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
import re
|
@@ -17,7 +17,8 @@ __all__ = ['AscLexer']
|
|
17
17
|
|
18
18
|
class AscLexer(RegexLexer):
|
19
19
|
"""
|
20
|
-
Lexer for ASCII armored files, containing `-----BEGIN/END ...-----` wrapped
|
20
|
+
Lexer for ASCII armored files, containing `-----BEGIN/END ...-----` wrapped
|
21
|
+
base64 data.
|
21
22
|
|
22
23
|
.. versionadded:: 2.10
|
23
24
|
"""
|
@@ -26,9 +27,11 @@ class AscLexer(RegexLexer):
|
|
26
27
|
filenames = [
|
27
28
|
'*.asc', # PGP; *.gpg, *.pgp, and *.sig too, but those can be binary
|
28
29
|
'*.pem', # X.509; *.cer, *.crt, *.csr, and key etc too, but those can be binary
|
29
|
-
'id_dsa', 'id_ecdsa', 'id_ecdsa_sk', 'id_ed25519', 'id_ed25519_sk',
|
30
|
+
'id_dsa', 'id_ecdsa', 'id_ecdsa_sk', 'id_ed25519', 'id_ed25519_sk',
|
31
|
+
'id_rsa', # SSH private keys
|
30
32
|
]
|
31
|
-
mimetypes = ['application/pgp-keys', 'application/pgp-encrypted',
|
33
|
+
mimetypes = ['application/pgp-keys', 'application/pgp-encrypted',
|
34
|
+
'application/pgp-signature']
|
32
35
|
|
33
36
|
flags = re.MULTILINE
|
34
37
|
|
@@ -40,7 +43,8 @@ class AscLexer(RegexLexer):
|
|
40
43
|
],
|
41
44
|
'data': [
|
42
45
|
(r'\s+', Whitespace),
|
43
|
-
(r'^([^:]+)(:)([ \t]+)(.*)',
|
46
|
+
(r'^([^:]+)(:)([ \t]+)(.*)',
|
47
|
+
bygroups(Name.Attribute, Operator, Whitespace, String)),
|
44
48
|
(r'^-----END [^\n]+-----$', Generic.Heading, 'root'),
|
45
49
|
(r'\S+', String),
|
46
50
|
],
|