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
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for various domain-specific languages.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -22,19 +22,19 @@ __all__ = ['ProtoBufLexer', 'ZeekLexer', 'PuppetLexer', 'RslLexer',
|
|
22
22
|
|
23
23
|
class ProtoBufLexer(RegexLexer):
|
24
24
|
"""
|
25
|
-
Lexer for
|
26
|
-
definition files.
|
25
|
+
Lexer for Protocol Buffer definition files.
|
27
26
|
|
28
27
|
.. versionadded:: 1.4
|
29
28
|
"""
|
30
29
|
|
31
30
|
name = 'Protocol Buffer'
|
31
|
+
url = 'https://developers.google.com/protocol-buffers/'
|
32
32
|
aliases = ['protobuf', 'proto']
|
33
33
|
filenames = ['*.proto']
|
34
34
|
|
35
35
|
tokens = {
|
36
36
|
'root': [
|
37
|
-
(r'[ \t]+',
|
37
|
+
(r'[ \t]+', Whitespace),
|
38
38
|
(r'[,;{}\[\]()<>]', Punctuation),
|
39
39
|
(r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
|
40
40
|
(r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
|
@@ -49,11 +49,11 @@ class ProtoBufLexer(RegexLexer):
|
|
49
49
|
'float', 'double', 'bool', 'string', 'bytes'), suffix=r'\b'),
|
50
50
|
Keyword.Type),
|
51
51
|
(r'(true|false)\b', Keyword.Constant),
|
52
|
-
(r'(package)(\s+)', bygroups(Keyword.Namespace,
|
52
|
+
(r'(package)(\s+)', bygroups(Keyword.Namespace, Whitespace), 'package'),
|
53
53
|
(r'(message|extend)(\s+)',
|
54
|
-
bygroups(Keyword.Declaration,
|
54
|
+
bygroups(Keyword.Declaration, Whitespace), 'message'),
|
55
55
|
(r'(enum|group|service)(\s+)',
|
56
|
-
bygroups(Keyword.Declaration,
|
56
|
+
bygroups(Keyword.Declaration, Whitespace), 'type'),
|
57
57
|
(r'\".*?\"', String),
|
58
58
|
(r'\'.*?\'', String),
|
59
59
|
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
|
@@ -64,7 +64,7 @@ class ProtoBufLexer(RegexLexer):
|
|
64
64
|
(r'\d+[LlUu]*', Number.Integer),
|
65
65
|
(r'[+-=]', Operator),
|
66
66
|
(r'([a-zA-Z_][\w.]*)([ \t]*)(=)',
|
67
|
-
bygroups(Name.Attribute,
|
67
|
+
bygroups(Name.Attribute, Whitespace, Operator)),
|
68
68
|
(r'[a-zA-Z_][\w.]*', Name),
|
69
69
|
],
|
70
70
|
'package': [
|
@@ -84,11 +84,12 @@ class ProtoBufLexer(RegexLexer):
|
|
84
84
|
|
85
85
|
class ThriftLexer(RegexLexer):
|
86
86
|
"""
|
87
|
-
For
|
87
|
+
For Thrift interface definitions.
|
88
88
|
|
89
89
|
.. versionadded:: 2.1
|
90
90
|
"""
|
91
91
|
name = 'Thrift'
|
92
|
+
url = 'https://thrift.apache.org/'
|
92
93
|
aliases = ['thrift']
|
93
94
|
filenames = ['*.thrift']
|
94
95
|
mimetypes = ['application/x-thrift']
|
@@ -100,13 +101,13 @@ class ThriftLexer(RegexLexer):
|
|
100
101
|
(r'"', String.Double, combined('stringescape', 'dqs')),
|
101
102
|
(r'\'', String.Single, combined('stringescape', 'sqs')),
|
102
103
|
(r'(namespace)(\s+)',
|
103
|
-
bygroups(Keyword.Namespace,
|
104
|
+
bygroups(Keyword.Namespace, Whitespace), 'namespace'),
|
104
105
|
(r'(enum|union|struct|service|exception)(\s+)',
|
105
|
-
bygroups(Keyword.Declaration,
|
106
|
+
bygroups(Keyword.Declaration, Whitespace), 'class'),
|
106
107
|
(r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)' # return arguments
|
107
108
|
r'((?:[^\W\d]|\$)[\w$]*)' # method name
|
108
109
|
r'(\s*)(\()', # signature start
|
109
|
-
bygroups(using(this), Name.Function,
|
110
|
+
bygroups(using(this), Name.Function, Whitespace, Operator)),
|
110
111
|
include('keywords'),
|
111
112
|
include('numbers'),
|
112
113
|
(r'[&=]', Operator),
|
@@ -114,8 +115,8 @@ class ThriftLexer(RegexLexer):
|
|
114
115
|
(r'[a-zA-Z_](\.\w|\w)*', Name),
|
115
116
|
],
|
116
117
|
'whitespace': [
|
117
|
-
(r'\n',
|
118
|
-
(r'\s+',
|
118
|
+
(r'\n', Whitespace),
|
119
|
+
(r'\s+', Whitespace),
|
119
120
|
],
|
120
121
|
'comments': [
|
121
122
|
(r'#.*$', Comment),
|
@@ -189,11 +190,12 @@ class ThriftLexer(RegexLexer):
|
|
189
190
|
|
190
191
|
class ZeekLexer(RegexLexer):
|
191
192
|
"""
|
192
|
-
For
|
193
|
+
For Zeek scripts.
|
193
194
|
|
194
195
|
.. versionadded:: 2.5
|
195
196
|
"""
|
196
197
|
name = 'Zeek'
|
198
|
+
url = 'https://www.zeek.org/'
|
197
199
|
aliases = ['zeek', 'bro']
|
198
200
|
filenames = ['*.zeek', '*.bro']
|
199
201
|
|
@@ -218,9 +220,9 @@ class ZeekLexer(RegexLexer):
|
|
218
220
|
],
|
219
221
|
|
220
222
|
'whitespace': [
|
221
|
-
(r'\n',
|
222
|
-
(r'\s+',
|
223
|
-
(r'
|
223
|
+
(r'\n', Whitespace),
|
224
|
+
(r'\s+', Whitespace),
|
225
|
+
(r'(\\)(\n)', bygroups(Text, Whitespace)),
|
224
226
|
],
|
225
227
|
|
226
228
|
'comments': [
|
@@ -230,7 +232,8 @@ class ZeekLexer(RegexLexer):
|
|
230
232
|
'directives': [
|
231
233
|
(r'@(load-plugin|load-sigs|load|unload)\b.*$', Comment.Preproc),
|
232
234
|
(r'@(DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)\b', Comment.Preproc),
|
233
|
-
(r'(@prefixes)\s*(\+?=)
|
235
|
+
(r'(@prefixes)(\s*)((\+?=).*)$', bygroups(Comment.Preproc,
|
236
|
+
Whitespace, Comment.Preproc)),
|
234
237
|
],
|
235
238
|
|
236
239
|
'attributes': [
|
@@ -253,16 +256,16 @@ class ZeekLexer(RegexLexer):
|
|
253
256
|
Keyword.Type),
|
254
257
|
|
255
258
|
(r'(opaque)(\s+)(of)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b',
|
256
|
-
bygroups(Keyword.Type,
|
259
|
+
bygroups(Keyword.Type, Whitespace, Operator.Word, Whitespace, Keyword.Type)),
|
257
260
|
|
258
261
|
(r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)(\s*)\b(record|enum)\b',
|
259
|
-
bygroups(Keyword,
|
262
|
+
bygroups(Keyword, Whitespace, Name.Class, Whitespace, Operator, Whitespace, Keyword.Type)),
|
260
263
|
|
261
264
|
(r'(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)',
|
262
|
-
bygroups(Keyword,
|
265
|
+
bygroups(Keyword, Whitespace, Name, Whitespace, Operator)),
|
263
266
|
|
264
267
|
(r'(redef)(\s+)(record|enum)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b',
|
265
|
-
bygroups(Keyword,
|
268
|
+
bygroups(Keyword, Whitespace, Keyword.Type, Whitespace, Name.Class)),
|
266
269
|
],
|
267
270
|
|
268
271
|
'keywords': [
|
@@ -276,7 +279,7 @@ class ZeekLexer(RegexLexer):
|
|
276
279
|
(r'(print)\b', Keyword),
|
277
280
|
(r'(global|local|const|option)\b', Keyword.Declaration),
|
278
281
|
(r'(module)(\s+)(([A-Za-z_]\w*)(?:::([A-Za-z_]\w*))*)\b',
|
279
|
-
bygroups(Keyword.Namespace,
|
282
|
+
bygroups(Keyword.Namespace, Whitespace, Name.Namespace)),
|
280
283
|
],
|
281
284
|
|
282
285
|
'literals': [
|
@@ -349,11 +352,12 @@ BroLexer = ZeekLexer
|
|
349
352
|
|
350
353
|
class PuppetLexer(RegexLexer):
|
351
354
|
"""
|
352
|
-
For
|
355
|
+
For Puppet configuration DSL.
|
353
356
|
|
354
357
|
.. versionadded:: 1.6
|
355
358
|
"""
|
356
359
|
name = 'Puppet'
|
360
|
+
url = 'https://puppet.com/'
|
357
361
|
aliases = ['puppet']
|
358
362
|
filenames = ['*.pp']
|
359
363
|
|
@@ -367,11 +371,11 @@ class PuppetLexer(RegexLexer):
|
|
367
371
|
include('strings'),
|
368
372
|
|
369
373
|
(r'[]{}:(),;[]', Punctuation),
|
370
|
-
(r'
|
374
|
+
(r'\s+', Whitespace),
|
371
375
|
],
|
372
376
|
|
373
377
|
'comments': [
|
374
|
-
(r'\s
|
378
|
+
(r'(\s*)(#.*)$', bygroups(Whitespace, Comment)),
|
375
379
|
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
376
380
|
],
|
377
381
|
|
@@ -436,13 +440,14 @@ class PuppetLexer(RegexLexer):
|
|
436
440
|
|
437
441
|
class RslLexer(RegexLexer):
|
438
442
|
"""
|
439
|
-
|
443
|
+
RSL is the formal specification
|
440
444
|
language used in RAISE (Rigorous Approach to Industrial Software Engineering)
|
441
445
|
method.
|
442
446
|
|
443
447
|
.. versionadded:: 2.0
|
444
448
|
"""
|
445
449
|
name = 'RSL'
|
450
|
+
url = 'http://en.wikipedia.org/wiki/RAISE'
|
446
451
|
aliases = ['rsl']
|
447
452
|
filenames = ['*.rsl']
|
448
453
|
mimetypes = ['text/rsl']
|
@@ -469,9 +474,11 @@ class RslLexer(RegexLexer):
|
|
469
474
|
(r'<:.*?:>', Comment),
|
470
475
|
(r'\{!.*?!\}', Comment),
|
471
476
|
(r'/\*.*?\*/', Comment),
|
472
|
-
(r'^[ \t]*([\w]+)[ \t]
|
473
|
-
|
474
|
-
|
477
|
+
(r'^([ \t]*)([\w]+)([ \t]*)(:[^:])', bygroups(Whitespace,
|
478
|
+
Name.Function, Whitespace, Name.Function)),
|
479
|
+
(r'(^[ \t]*)([\w]+)([ \t]*)(\([\w\s,]*\))([ \t]*)(is|as)',
|
480
|
+
bygroups(Whitespace, Name.Function, Whitespace, Text,
|
481
|
+
Whitespace, Keyword)),
|
475
482
|
(r'\b[A-Z]\w*\b', Keyword.Type),
|
476
483
|
(r'(true|false)\b', Keyword.Constant),
|
477
484
|
(r'".*"', String),
|
@@ -482,6 +489,7 @@ class RslLexer(RegexLexer):
|
|
482
489
|
(r'[0-9]+\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
483
490
|
(r'0x[0-9a-f]+', Number.Hex),
|
484
491
|
(r'[0-9]+', Number.Integer),
|
492
|
+
(r'\s+', Whitespace),
|
485
493
|
(r'.', Text),
|
486
494
|
],
|
487
495
|
}
|
@@ -496,11 +504,12 @@ class RslLexer(RegexLexer):
|
|
496
504
|
|
497
505
|
class MscgenLexer(RegexLexer):
|
498
506
|
"""
|
499
|
-
For
|
507
|
+
For Mscgen files.
|
500
508
|
|
501
509
|
.. versionadded:: 1.6
|
502
510
|
"""
|
503
511
|
name = 'Mscgen'
|
512
|
+
url = 'http://www.mcternan.me.uk/mscgen/'
|
504
513
|
aliases = ['mscgen', 'msc']
|
505
514
|
filenames = ['*.msc']
|
506
515
|
|
@@ -530,7 +539,7 @@ class MscgenLexer(RegexLexer):
|
|
530
539
|
'attrs': [
|
531
540
|
(r'\]', Punctuation, '#pop'),
|
532
541
|
(_var + r'(\s*)(=)(\s*)' + _var,
|
533
|
-
bygroups(Name.Attribute,
|
542
|
+
bygroups(Name.Attribute, Whitespace, Operator, Whitespace,
|
534
543
|
String)),
|
535
544
|
(r',', Punctuation),
|
536
545
|
include('comments')
|
@@ -538,19 +547,19 @@ class MscgenLexer(RegexLexer):
|
|
538
547
|
'comments': [
|
539
548
|
(r'(?://|#).*?\n', Comment.Single),
|
540
549
|
(r'/\*(?:.|\n)*?\*/', Comment.Multiline),
|
541
|
-
(r'[ \t\r\n]+',
|
550
|
+
(r'[ \t\r\n]+', Whitespace)
|
542
551
|
]
|
543
552
|
}
|
544
553
|
|
545
554
|
|
546
555
|
class VGLLexer(RegexLexer):
|
547
556
|
"""
|
548
|
-
For
|
549
|
-
source code.
|
557
|
+
For SampleManager VGL source code.
|
550
558
|
|
551
559
|
.. versionadded:: 1.6
|
552
560
|
"""
|
553
561
|
name = 'VGL'
|
562
|
+
url = 'http://www.thermoscientific.com/samplemanager'
|
554
563
|
aliases = ['vgl']
|
555
564
|
filenames = ['*.rpf']
|
556
565
|
|
@@ -571,28 +580,30 @@ class VGLLexer(RegexLexer):
|
|
571
580
|
(r'(\.)([a-z_$][\w$]*)', bygroups(Operator, Name.Attribute)),
|
572
581
|
(r'[0-9][0-9]*(\.[0-9]+(e[+\-]?[0-9]+)?)?', Number),
|
573
582
|
(r'[a-z_$][\w$]*', Name),
|
574
|
-
(r'[\r\n]+',
|
575
|
-
(r'\s+',
|
583
|
+
(r'[\r\n]+', Whitespace),
|
584
|
+
(r'\s+', Whitespace)
|
576
585
|
]
|
577
586
|
}
|
578
587
|
|
579
588
|
|
580
589
|
class AlloyLexer(RegexLexer):
|
581
590
|
"""
|
582
|
-
For
|
591
|
+
For Alloy source code.
|
583
592
|
|
584
593
|
.. versionadded:: 2.0
|
585
594
|
"""
|
586
595
|
|
587
596
|
name = 'Alloy'
|
597
|
+
url = 'http://alloy.mit.edu'
|
588
598
|
aliases = ['alloy']
|
589
599
|
filenames = ['*.als']
|
590
600
|
mimetypes = ['text/x-alloy']
|
591
601
|
|
592
602
|
flags = re.MULTILINE | re.DOTALL
|
593
603
|
|
594
|
-
iden_rex = r'[a-zA-Z_][\w
|
595
|
-
|
604
|
+
iden_rex = r'[a-zA-Z_][\w]*"*'
|
605
|
+
string_rex = r'"\b(\\\\|\\[^\\]|[^"\\])*"'
|
606
|
+
text_tuple = (r'[^\S\n]+', Whitespace)
|
596
607
|
|
597
608
|
tokens = {
|
598
609
|
'sig': [
|
@@ -611,35 +622,42 @@ class AlloyLexer(RegexLexer):
|
|
611
622
|
(r'\{', Operator, '#pop'),
|
612
623
|
(iden_rex, Name, '#pop'),
|
613
624
|
],
|
625
|
+
'fact': [
|
626
|
+
include('fun'),
|
627
|
+
(string_rex, String, '#pop'),
|
628
|
+
],
|
614
629
|
'root': [
|
615
630
|
(r'--.*?$', Comment.Single),
|
616
631
|
(r'//.*?$', Comment.Single),
|
617
632
|
(r'/\*.*?\*/', Comment.Multiline),
|
618
633
|
text_tuple,
|
619
|
-
(r'(module|open)(\s+)', bygroups(Keyword.Namespace,
|
634
|
+
(r'(module|open)(\s+)', bygroups(Keyword.Namespace, Whitespace),
|
620
635
|
'module'),
|
621
|
-
(r'(sig|enum)(\s+)', bygroups(Keyword.Declaration,
|
636
|
+
(r'(sig|enum)(\s+)', bygroups(Keyword.Declaration, Whitespace), 'sig'),
|
622
637
|
(r'(iden|univ|none)\b', Keyword.Constant),
|
623
638
|
(r'(int|Int)\b', Keyword.Type),
|
624
|
-
(r'(this|abstract|extends|set|seq|one|lone|let)\b', Keyword),
|
639
|
+
(r'(var|this|abstract|extends|set|seq|one|lone|let)\b', Keyword),
|
625
640
|
(r'(all|some|no|sum|disj|when|else)\b', Keyword),
|
626
|
-
(r'(run|check|for|but|exactly|expect|as)\b', Keyword),
|
641
|
+
(r'(run|check|for|but|exactly|expect|as|steps)\b', Keyword),
|
642
|
+
(r'(always|after|eventually|until|release)\b', Keyword), # future time operators
|
643
|
+
(r'(historically|before|once|since|triggered)\b', Keyword), # past time operators
|
627
644
|
(r'(and|or|implies|iff|in)\b', Operator.Word),
|
628
|
-
(r'(fun|pred|
|
629
|
-
(r'
|
630
|
-
(r'
|
645
|
+
(r'(fun|pred|assert)(\s+)', bygroups(Keyword, Whitespace), 'fun'),
|
646
|
+
(r'(fact)(\s+)', bygroups(Keyword, Whitespace), 'fact'),
|
647
|
+
(r'!|#|&&|\+\+|<<|>>|>=|<=>|<=|\.\.|\.|->', Operator),
|
648
|
+
(r'[-+/*%=<>&!^|~{}\[\]().\';]', Operator),
|
631
649
|
(iden_rex, Name),
|
632
650
|
(r'[:,]', Punctuation),
|
633
651
|
(r'[0-9]+', Number.Integer),
|
634
|
-
(
|
635
|
-
(r'\n',
|
652
|
+
(string_rex, String),
|
653
|
+
(r'\n', Whitespace),
|
636
654
|
]
|
637
655
|
}
|
638
656
|
|
639
657
|
|
640
658
|
class PanLexer(RegexLexer):
|
641
659
|
"""
|
642
|
-
Lexer for
|
660
|
+
Lexer for pan source files.
|
643
661
|
|
644
662
|
Based on tcsh lexer.
|
645
663
|
|
@@ -647,6 +665,7 @@ class PanLexer(RegexLexer):
|
|
647
665
|
"""
|
648
666
|
|
649
667
|
name = 'Pan'
|
668
|
+
url = 'https://github.com/quattor/pan/'
|
650
669
|
aliases = ['pan']
|
651
670
|
filenames = ['*.pan']
|
652
671
|
|
@@ -662,7 +681,7 @@ class PanLexer(RegexLexer):
|
|
662
681
|
'if', 'for', 'with', 'else', 'type', 'bind', 'while', 'valid', 'final',
|
663
682
|
'prefix', 'unique', 'object', 'foreach', 'include', 'template',
|
664
683
|
'function', 'variable', 'structure', 'extensible', 'declaration'),
|
665
|
-
prefix=r'\b', suffix=r'\
|
684
|
+
prefix=r'\b', suffix=r'\b'),
|
666
685
|
Keyword),
|
667
686
|
(words((
|
668
687
|
'file_contents', 'format', 'index', 'length', 'match', 'matches',
|
@@ -674,11 +693,11 @@ class PanLexer(RegexLexer):
|
|
674
693
|
'is_number', 'is_property', 'is_resource', 'is_string', 'to_boolean',
|
675
694
|
'to_double', 'to_long', 'to_string', 'clone', 'delete', 'exists',
|
676
695
|
'path_exists', 'if_exists', 'return', 'value'),
|
677
|
-
prefix=r'\b', suffix=r'\
|
696
|
+
prefix=r'\b', suffix=r'\b'),
|
678
697
|
Name.Builtin),
|
679
698
|
(r'#.*', Comment),
|
680
699
|
(r'\\[\w\W]', String.Escape),
|
681
|
-
(r'(\b\w+)(\s*)(=)', bygroups(Name.Variable,
|
700
|
+
(r'(\b\w+)(\s*)(=)', bygroups(Name.Variable, Whitespace, Operator)),
|
682
701
|
(r'[\[\]{}()=]+', Operator),
|
683
702
|
(r'<<\s*(\'?)\\?(\w+)[\w\W]+?\2', String),
|
684
703
|
(r';', Punctuation),
|
@@ -686,7 +705,7 @@ class PanLexer(RegexLexer):
|
|
686
705
|
'data': [
|
687
706
|
(r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
|
688
707
|
(r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
|
689
|
-
(r'\s+',
|
708
|
+
(r'\s+', Whitespace),
|
690
709
|
(r'[^=\s\[\]{}()$"\'`\\;#]+', Text),
|
691
710
|
(r'\d+(?= |\Z)', Number),
|
692
711
|
],
|
@@ -707,12 +726,12 @@ class PanLexer(RegexLexer):
|
|
707
726
|
|
708
727
|
class CrmshLexer(RegexLexer):
|
709
728
|
"""
|
710
|
-
Lexer for
|
711
|
-
for Pacemaker clusters.
|
729
|
+
Lexer for crmsh configuration files for Pacemaker clusters.
|
712
730
|
|
713
731
|
.. versionadded:: 2.1
|
714
732
|
"""
|
715
733
|
name = 'Crmsh'
|
734
|
+
url = 'http://crmsh.github.io/'
|
716
735
|
aliases = ['crmsh', 'pcmk']
|
717
736
|
filenames = ['*.crmsh', '*.pcmk']
|
718
737
|
mimetypes = []
|
@@ -738,7 +757,7 @@ class CrmshLexer(RegexLexer):
|
|
738
757
|
|
739
758
|
tokens = {
|
740
759
|
'root': [
|
741
|
-
(r'
|
760
|
+
(r'^(#.*)(\n)?', bygroups(Comment, Whitespace)),
|
742
761
|
# attr=value (nvpair)
|
743
762
|
(r'([\w#$-]+)(=)("(?:""|[^"])*"|\S+)',
|
744
763
|
bygroups(Name.Attribute, Punctuation, String)),
|
@@ -777,11 +796,12 @@ class CrmshLexer(RegexLexer):
|
|
777
796
|
|
778
797
|
class FlatlineLexer(RegexLexer):
|
779
798
|
"""
|
780
|
-
Lexer for
|
799
|
+
Lexer for Flatline expressions.
|
781
800
|
|
782
801
|
.. versionadded:: 2.2
|
783
802
|
"""
|
784
803
|
name = 'Flatline'
|
804
|
+
url = 'https://github.com/bigmlcom/flatline'
|
785
805
|
aliases = ['flatline']
|
786
806
|
filenames = []
|
787
807
|
mimetypes = ['text/x-flatline']
|
@@ -818,7 +838,8 @@ class FlatlineLexer(RegexLexer):
|
|
818
838
|
tokens = {
|
819
839
|
'root': [
|
820
840
|
# whitespaces - usually not relevant
|
821
|
-
(r'[
|
841
|
+
(r'[,]+', Text),
|
842
|
+
(r'\s+', Whitespace),
|
822
843
|
|
823
844
|
# numbers
|
824
845
|
(r'-?\d+\.\d+', Number.Float),
|
@@ -852,12 +873,13 @@ class FlatlineLexer(RegexLexer):
|
|
852
873
|
|
853
874
|
class SnowballLexer(ExtendedRegexLexer):
|
854
875
|
"""
|
855
|
-
Lexer for
|
876
|
+
Lexer for Snowball source code.
|
856
877
|
|
857
878
|
.. versionadded:: 2.2
|
858
879
|
"""
|
859
880
|
|
860
881
|
name = 'Snowball'
|
882
|
+
url = 'http://snowballstem.org/'
|
861
883
|
aliases = ['snowball']
|
862
884
|
filenames = ['*.sbl']
|
863
885
|
|
@@ -902,7 +924,7 @@ class SnowballLexer(ExtendedRegexLexer):
|
|
902
924
|
def _stringescapes(lexer, match, ctx):
|
903
925
|
lexer._start = match.group(3)
|
904
926
|
lexer._end = match.group(5)
|
905
|
-
return bygroups(Keyword.Reserved,
|
927
|
+
return bygroups(Keyword.Reserved, Whitespace, String.Escape, Whitespace,
|
906
928
|
String.Escape)(lexer, match, ctx)
|
907
929
|
|
908
930
|
tokens = {
|
@@ -911,7 +933,7 @@ class SnowballLexer(ExtendedRegexLexer):
|
|
911
933
|
include('root1'),
|
912
934
|
],
|
913
935
|
'root1': [
|
914
|
-
(r'[%s]+' % _ws,
|
936
|
+
(r'[%s]+' % _ws, Whitespace),
|
915
937
|
(r'\d+', Number.Integer),
|
916
938
|
(r"'", String.Single, 'string'),
|
917
939
|
(r'[()]', Punctuation),
|
@@ -935,7 +957,7 @@ class SnowballLexer(ExtendedRegexLexer):
|
|
935
957
|
suffix=r'\b'),
|
936
958
|
Name.Builtin),
|
937
959
|
(r'(stringdef\b)([%s]*)([^%s]+)' % (_ws, _ws),
|
938
|
-
bygroups(Keyword.Reserved,
|
960
|
+
bygroups(Keyword.Reserved, Whitespace, String.Escape)),
|
939
961
|
(r'(stringescapes\b)([%s]*)(.)([%s]*)(.)' % (_ws, _ws),
|
940
962
|
_stringescapes),
|
941
963
|
(r'[A-Za-z]\w*', Name),
|
@@ -4,27 +4,29 @@
|
|
4
4
|
|
5
5
|
Lexers for the Dylan language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
import re
|
12
12
|
|
13
|
-
from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions,
|
14
|
-
|
15
|
-
|
13
|
+
from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \
|
14
|
+
default, line_re
|
15
|
+
from pygments.token import Comment, Operator, Keyword, Name, String, \
|
16
|
+
Number, Punctuation, Generic, Literal, Whitespace
|
16
17
|
|
17
18
|
__all__ = ['DylanLexer', 'DylanConsoleLexer', 'DylanLidLexer']
|
18
19
|
|
19
20
|
|
20
21
|
class DylanLexer(RegexLexer):
|
21
22
|
"""
|
22
|
-
For the
|
23
|
+
For the Dylan language.
|
23
24
|
|
24
25
|
.. versionadded:: 0.7
|
25
26
|
"""
|
26
27
|
|
27
28
|
name = 'Dylan'
|
29
|
+
url = 'http://www.opendylan.org/'
|
28
30
|
aliases = ['dylan']
|
29
31
|
filenames = ['*.dylan', '*.dyl', '*.intr']
|
30
32
|
mimetypes = ['text/x-dylan']
|
@@ -110,23 +112,23 @@ class DylanLexer(RegexLexer):
|
|
110
112
|
tokens = {
|
111
113
|
'root': [
|
112
114
|
# Whitespace
|
113
|
-
(r'\s+',
|
115
|
+
(r'\s+', Whitespace),
|
114
116
|
|
115
117
|
# single line comment
|
116
118
|
(r'//.*?\n', Comment.Single),
|
117
119
|
|
118
120
|
# lid header
|
119
121
|
(r'([a-z0-9-]+)(:)([ \t]*)(.*(?:\n[ \t].+)*)',
|
120
|
-
bygroups(Name.Attribute, Operator,
|
122
|
+
bygroups(Name.Attribute, Operator, Whitespace, String)),
|
121
123
|
|
122
124
|
default('code') # no header match, switch to code
|
123
125
|
],
|
124
126
|
'code': [
|
125
127
|
# Whitespace
|
126
|
-
(r'\s+',
|
128
|
+
(r'\s+', Whitespace),
|
127
129
|
|
128
130
|
# single line comment
|
129
|
-
(r'
|
131
|
+
(r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)),
|
130
132
|
|
131
133
|
# multi-line comment
|
132
134
|
(r'/\*', Comment.Multiline, 'comment'),
|
@@ -190,7 +192,7 @@ class DylanLexer(RegexLexer):
|
|
190
192
|
(valid_name, Name),
|
191
193
|
],
|
192
194
|
'comment': [
|
193
|
-
(r'[^*/]', Comment.Multiline),
|
195
|
+
(r'[^*/]+', Comment.Multiline),
|
194
196
|
(r'/\*', Comment.Multiline, '#push'),
|
195
197
|
(r'\*/', Comment.Multiline, '#pop'),
|
196
198
|
(r'[*/]', Comment.Multiline)
|
@@ -226,14 +228,14 @@ class DylanLidLexer(RegexLexer):
|
|
226
228
|
tokens = {
|
227
229
|
'root': [
|
228
230
|
# Whitespace
|
229
|
-
(r'\s+',
|
231
|
+
(r'\s+', Whitespace),
|
230
232
|
|
231
233
|
# single line comment
|
232
|
-
(r'
|
234
|
+
(r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)),
|
233
235
|
|
234
236
|
# lid header
|
235
237
|
(r'(.*?)(:)([ \t]*)(.*(?:\n[ \t].+)*)',
|
236
|
-
bygroups(Name.Attribute, Operator,
|
238
|
+
bygroups(Name.Attribute, Operator, Whitespace, String)),
|
237
239
|
]
|
238
240
|
}
|
239
241
|
|
@@ -258,7 +260,6 @@ class DylanConsoleLexer(Lexer):
|
|
258
260
|
filenames = ['*.dylan-console']
|
259
261
|
mimetypes = ['text/x-dylan-console']
|
260
262
|
|
261
|
-
_line_re = re.compile('.*?\n')
|
262
263
|
_prompt_re = re.compile(r'\?| ')
|
263
264
|
|
264
265
|
def get_tokens_unprocessed(self, text):
|
@@ -266,7 +267,7 @@ class DylanConsoleLexer(Lexer):
|
|
266
267
|
|
267
268
|
curcode = ''
|
268
269
|
insertions = []
|
269
|
-
for match in
|
270
|
+
for match in line_re.finditer(text):
|
270
271
|
line = match.group()
|
271
272
|
m = self._prompt_re.match(line)
|
272
273
|
if m is not None:
|