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 BASIC like languages (other than VB.net).
|
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,12 +22,13 @@ __all__ = ['BlitzBasicLexer', 'BlitzMaxLexer', 'MonkeyLexer', 'CbmBasicV2Lexer',
|
|
22
22
|
|
23
23
|
class BlitzMaxLexer(RegexLexer):
|
24
24
|
"""
|
25
|
-
For
|
25
|
+
For BlitzMax source code.
|
26
26
|
|
27
27
|
.. versionadded:: 1.4
|
28
28
|
"""
|
29
29
|
|
30
30
|
name = 'BlitzMax'
|
31
|
+
url = 'http://blitzbasic.com'
|
31
32
|
aliases = ['blitzmax', 'bmax']
|
32
33
|
filenames = ['*.bmx']
|
33
34
|
mimetypes = ['text/x-bmx']
|
@@ -45,8 +46,8 @@ class BlitzMaxLexer(RegexLexer):
|
|
45
46
|
tokens = {
|
46
47
|
'root': [
|
47
48
|
# Text
|
48
|
-
(r'
|
49
|
-
(r'
|
49
|
+
(r'\s+', Whitespace),
|
50
|
+
(r'(\.\.)(\n)', bygroups(Text, Whitespace)), # Line continuation
|
50
51
|
# Comments
|
51
52
|
(r"'.*?\n", Comment.Single),
|
52
53
|
(r'([ \t]*)\bRem\n(\n|.)*?\s*\bEnd([ \t]*)Rem', Comment.Multiline),
|
@@ -66,19 +67,19 @@ class BlitzMaxLexer(RegexLexer):
|
|
66
67
|
(r'(?:\?[\w \t]*)', Comment.Preproc),
|
67
68
|
# Identifiers
|
68
69
|
(r'\b(New)\b([ \t]?)([(]?)(%s)' % (bmax_name),
|
69
|
-
bygroups(Keyword.Reserved,
|
70
|
+
bygroups(Keyword.Reserved, Whitespace, Punctuation, Name.Class)),
|
70
71
|
(r'\b(Import|Framework|Module)([ \t]+)(%s\.%s)' %
|
71
72
|
(bmax_name, bmax_name),
|
72
|
-
bygroups(Keyword.Reserved,
|
73
|
-
(bmax_func, bygroups(Name.Function,
|
74
|
-
Operator,
|
75
|
-
Keyword.Type, Name.Class,
|
76
|
-
Keyword.Type,
|
77
|
-
(bmax_var, bygroups(Name.Variable,
|
78
|
-
|
79
|
-
Name.Class,
|
73
|
+
bygroups(Keyword.Reserved, Whitespace, Keyword.Namespace)),
|
74
|
+
(bmax_func, bygroups(Name.Function, Whitespace, Keyword.Type,
|
75
|
+
Operator, Whitespace, Punctuation, Whitespace,
|
76
|
+
Keyword.Type, Name.Class, Whitespace,
|
77
|
+
Keyword.Type, Whitespace, Punctuation)),
|
78
|
+
(bmax_var, bygroups(Name.Variable, Whitespace, Keyword.Type, Operator,
|
79
|
+
Whitespace, Punctuation, Whitespace, Keyword.Type,
|
80
|
+
Name.Class, Whitespace, Keyword.Type)),
|
80
81
|
(r'\b(Type|Extends)([ \t]+)(%s)' % (bmax_name),
|
81
|
-
bygroups(Keyword.Reserved,
|
82
|
+
bygroups(Keyword.Reserved, Whitespace, Name.Class)),
|
82
83
|
# Keywords
|
83
84
|
(r'\b(Ptr)\b', Keyword.Type),
|
84
85
|
(r'\b(Pi|True|False|Null|Self|Super)\b', Keyword.Constant),
|
@@ -113,12 +114,13 @@ class BlitzMaxLexer(RegexLexer):
|
|
113
114
|
|
114
115
|
class BlitzBasicLexer(RegexLexer):
|
115
116
|
"""
|
116
|
-
For
|
117
|
+
For BlitzBasic source code.
|
117
118
|
|
118
119
|
.. versionadded:: 2.0
|
119
120
|
"""
|
120
121
|
|
121
122
|
name = 'BlitzBasic'
|
123
|
+
url = 'http://blitzbasic.com'
|
122
124
|
aliases = ['blitzbasic', 'b3d', 'bplus']
|
123
125
|
filenames = ['*.bb', '*.decls']
|
124
126
|
mimetypes = ['text/x-bb']
|
@@ -132,7 +134,7 @@ class BlitzBasicLexer(RegexLexer):
|
|
132
134
|
tokens = {
|
133
135
|
'root': [
|
134
136
|
# Text
|
135
|
-
(r'
|
137
|
+
(r'\s+', Whitespace),
|
136
138
|
# Comments
|
137
139
|
(r";.*?\n", Comment.Single),
|
138
140
|
# Data types
|
@@ -154,19 +156,19 @@ class BlitzBasicLexer(RegexLexer):
|
|
154
156
|
(r'\.([ \t]*)(%s)' % bb_name, Name.Label),
|
155
157
|
# Identifiers
|
156
158
|
(r'\b(New)\b([ \t]+)(%s)' % (bb_name),
|
157
|
-
bygroups(Keyword.Reserved,
|
159
|
+
bygroups(Keyword.Reserved, Whitespace, Name.Class)),
|
158
160
|
(r'\b(Gosub|Goto)\b([ \t]+)(%s)' % (bb_name),
|
159
|
-
bygroups(Keyword.Reserved,
|
161
|
+
bygroups(Keyword.Reserved, Whitespace, Name.Label)),
|
160
162
|
(r'\b(Object)\b([ \t]*)([.])([ \t]*)(%s)\b' % (bb_name),
|
161
|
-
bygroups(Operator,
|
163
|
+
bygroups(Operator, Whitespace, Punctuation, Whitespace, Name.Class)),
|
162
164
|
(r'\b%s\b([ \t]*)(\()' % bb_var,
|
163
|
-
bygroups(Name.Function,
|
164
|
-
|
165
|
+
bygroups(Name.Function, Whitespace, Keyword.Type, Whitespace, Punctuation,
|
166
|
+
Whitespace, Name.Class, Whitespace, Punctuation)),
|
165
167
|
(r'\b(Function)\b([ \t]+)%s' % bb_var,
|
166
|
-
bygroups(Keyword.Reserved,
|
167
|
-
|
168
|
+
bygroups(Keyword.Reserved, Whitespace, Name.Function, Whitespace, Keyword.Type,
|
169
|
+
Whitespace, Punctuation, Whitespace, Name.Class)),
|
168
170
|
(r'\b(Type)([ \t]+)(%s)' % (bb_name),
|
169
|
-
bygroups(Keyword.Reserved,
|
171
|
+
bygroups(Keyword.Reserved, Whitespace, Name.Class)),
|
170
172
|
# Keywords
|
171
173
|
(r'\b(Pi|True|False|Null)\b', Keyword.Constant),
|
172
174
|
(r'\b(Local|Global|Const|Field|Dim)\b', Keyword.Declaration),
|
@@ -179,13 +181,13 @@ class BlitzBasicLexer(RegexLexer):
|
|
179
181
|
Keyword.Reserved),
|
180
182
|
# Final resolve (for variable names and such)
|
181
183
|
# (r'(%s)' % (bb_name), Name.Variable),
|
182
|
-
(bb_var, bygroups(Name.Variable,
|
183
|
-
|
184
|
+
(bb_var, bygroups(Name.Variable, Whitespace, Keyword.Type,
|
185
|
+
Whitespace, Punctuation, Whitespace, Name.Class)),
|
184
186
|
],
|
185
187
|
'string': [
|
186
188
|
(r'""', String.Double),
|
187
189
|
(r'"C?', String.Double, '#pop'),
|
188
|
-
(r'[^"]+', String.Double),
|
190
|
+
(r'[^"\n]+', String.Double),
|
189
191
|
],
|
190
192
|
}
|
191
193
|
|
@@ -219,7 +221,7 @@ class MonkeyLexer(RegexLexer):
|
|
219
221
|
tokens = {
|
220
222
|
'root': [
|
221
223
|
# Text
|
222
|
-
(r'\s+',
|
224
|
+
(r'\s+', Whitespace),
|
223
225
|
# Comments
|
224
226
|
(r"'.*", Comment),
|
225
227
|
(r'(?i)^#rem\b', Comment.Multiline, 'comment'),
|
@@ -246,14 +248,14 @@ class MonkeyLexer(RegexLexer):
|
|
246
248
|
(r'\b(?:HOST|LANG|TARGET|CONFIG)\b', Name.Constant),
|
247
249
|
# Keywords
|
248
250
|
(r'(?i)^(Import)(\s+)(.*)(\n)',
|
249
|
-
bygroups(Keyword.Namespace,
|
251
|
+
bygroups(Keyword.Namespace, Whitespace, Name.Namespace, Whitespace)),
|
250
252
|
(r'(?i)^Strict\b.*\n', Keyword.Reserved),
|
251
253
|
(r'(?i)(Const|Local|Global|Field)(\s+)',
|
252
|
-
bygroups(Keyword.Declaration,
|
254
|
+
bygroups(Keyword.Declaration, Whitespace), 'variables'),
|
253
255
|
(r'(?i)(New|Class|Interface|Extends|Implements)(\s+)',
|
254
|
-
bygroups(Keyword.Reserved,
|
256
|
+
bygroups(Keyword.Reserved, Whitespace), 'classname'),
|
255
257
|
(r'(?i)(Function|Method)(\s+)',
|
256
|
-
bygroups(Keyword.Reserved,
|
258
|
+
bygroups(Keyword.Reserved, Whitespace), 'funcname'),
|
257
259
|
(r'(?i)(?:End|Return|Public|Private|Extern|Property|'
|
258
260
|
r'Final|Abstract)\b', Keyword.Reserved),
|
259
261
|
# Flow Control stuff
|
@@ -262,7 +264,7 @@ class MonkeyLexer(RegexLexer):
|
|
262
264
|
r'While|Wend|'
|
263
265
|
r'Repeat|Until|Forever|'
|
264
266
|
r'For|To|Until|Step|EachIn|Next|'
|
265
|
-
r'Exit|Continue)
|
267
|
+
r'Exit|Continue)(?=\s)', Keyword.Reserved),
|
266
268
|
# not used yet
|
267
269
|
(r'(?i)\b(?:Module|Inline)\b', Keyword.Reserved),
|
268
270
|
# Array
|
@@ -279,7 +281,7 @@ class MonkeyLexer(RegexLexer):
|
|
279
281
|
'funcname': [
|
280
282
|
(r'(?i)%s\b' % name_function, Name.Function),
|
281
283
|
(r':', Punctuation, 'classname'),
|
282
|
-
(r'\s+',
|
284
|
+
(r'\s+', Whitespace),
|
283
285
|
(r'\(', Punctuation, 'variables'),
|
284
286
|
(r'\)', Punctuation, '#pop')
|
285
287
|
],
|
@@ -289,19 +291,19 @@ class MonkeyLexer(RegexLexer):
|
|
289
291
|
(r'%s\b' % name_class, Name.Class),
|
290
292
|
# array (of given size)
|
291
293
|
(r'(\[)(\s*)(\d*)(\s*)(\])',
|
292
|
-
bygroups(Punctuation,
|
294
|
+
bygroups(Punctuation, Whitespace, Number.Integer, Whitespace, Punctuation)),
|
293
295
|
# generics
|
294
|
-
(r'\s+(?!<)',
|
296
|
+
(r'\s+(?!<)', Whitespace, '#pop'),
|
295
297
|
(r'<', Punctuation, '#push'),
|
296
298
|
(r'>', Punctuation, '#pop'),
|
297
|
-
(r'\n',
|
299
|
+
(r'\n', Whitespace, '#pop'),
|
298
300
|
default('#pop')
|
299
301
|
],
|
300
302
|
'variables': [
|
301
303
|
(r'%s\b' % name_constant, Name.Constant),
|
302
304
|
(r'%s\b' % name_variable, Name.Variable),
|
303
305
|
(r'%s' % keyword_type_special, Keyword.Type),
|
304
|
-
(r'\s+',
|
306
|
+
(r'\s+', Whitespace),
|
305
307
|
(r':', Punctuation, 'classname'),
|
306
308
|
(r',', Punctuation, '#push'),
|
307
309
|
default('#pop')
|
@@ -335,7 +337,7 @@ class CbmBasicV2Lexer(RegexLexer):
|
|
335
337
|
tokens = {
|
336
338
|
'root': [
|
337
339
|
(r'rem.*\n', Comment.Single),
|
338
|
-
(r'\s+',
|
340
|
+
(r'\s+', Whitespace),
|
339
341
|
(r'new|run|end|for|to|next|step|go(to|sub)?|on|return|stop|cont'
|
340
342
|
r'|if|then|input#?|read|wait|load|save|verify|poke|sys|print#?'
|
341
343
|
r'|list|clr|cmd|open|close|get#?', Keyword.Reserved),
|
@@ -623,7 +625,8 @@ class BBCBasicLexer(RegexLexer):
|
|
623
625
|
|
624
626
|
# Some special cases to make functions come out nicer
|
625
627
|
(r'(DEF)(\s*)(FN|PROC)([A-Za-z_@][\w@]*)',
|
626
|
-
bygroups(Keyword.Declaration, Whitespace,
|
628
|
+
bygroups(Keyword.Declaration, Whitespace,
|
629
|
+
Keyword.Declaration, Name.Function)),
|
627
630
|
(r'(FN|PROC)([A-Za-z_@][\w@]*)',
|
628
631
|
bygroups(Keyword, Name.Function)),
|
629
632
|
|
@@ -631,7 +634,8 @@ class BBCBasicLexer(RegexLexer):
|
|
631
634
|
bygroups(Keyword, Whitespace, Name.Label)),
|
632
635
|
|
633
636
|
(r'(TRUE|FALSE)', Keyword.Constant),
|
634
|
-
(r'(PAGE|LOMEM|HIMEM|TIME|WIDTH|ERL|ERR|REPORT\$|POS|VPOS|VOICES)',
|
637
|
+
(r'(PAGE|LOMEM|HIMEM|TIME|WIDTH|ERL|ERR|REPORT\$|POS|VPOS|VOICES)',
|
638
|
+
Keyword.Pseudo),
|
635
639
|
|
636
640
|
(words(base_keywords), Keyword),
|
637
641
|
(words(basic5_keywords), Keyword),
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.bdd
|
3
|
+
~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexer for BDD(Behavior-driven development).
|
6
|
+
More information: https://en.wikipedia.org/wiki/Behavior-driven_development
|
7
|
+
|
8
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
9
|
+
:license: BSD, see LICENSE for details.
|
10
|
+
"""
|
11
|
+
|
12
|
+
from pygments.lexer import RegexLexer, include
|
13
|
+
from pygments.token import Comment, Keyword, Name, String, Number, Text, \
|
14
|
+
Punctuation, Whitespace
|
15
|
+
|
16
|
+
__all__ = ['BddLexer']
|
17
|
+
|
18
|
+
class BddLexer(RegexLexer):
|
19
|
+
"""
|
20
|
+
Lexer for BDD(Behavior-driven development), which highlights not only
|
21
|
+
keywords, but also comments, punctuations, strings, numbers, and variables.
|
22
|
+
|
23
|
+
.. versionadded:: 2.11
|
24
|
+
"""
|
25
|
+
|
26
|
+
name = 'Bdd'
|
27
|
+
aliases = ['bdd']
|
28
|
+
filenames = ['*.feature']
|
29
|
+
mimetypes = ['text/x-bdd']
|
30
|
+
|
31
|
+
step_keywords = (r'Given|When|Then|Add|And|Feature|Scenario Outline|'
|
32
|
+
r'Scenario|Background|Examples|But')
|
33
|
+
|
34
|
+
tokens = {
|
35
|
+
'comments': [
|
36
|
+
(r'^\s*#.*$', Comment),
|
37
|
+
],
|
38
|
+
'miscellaneous': [
|
39
|
+
(r'(<|>|\[|\]|=|\||:|\(|\)|\{|\}|,|\.|;|-|_|\$)', Punctuation),
|
40
|
+
(r'((?<=\<)[^\\>]+(?=\>))', Name.Variable),
|
41
|
+
(r'"([^\"]*)"', String),
|
42
|
+
(r'^@\S+', Name.Label),
|
43
|
+
],
|
44
|
+
'numbers': [
|
45
|
+
(r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number),
|
46
|
+
],
|
47
|
+
'root': [
|
48
|
+
(r'\n|\s+', Whitespace),
|
49
|
+
(step_keywords, Keyword),
|
50
|
+
include('comments'),
|
51
|
+
include('miscellaneous'),
|
52
|
+
include('numbers'),
|
53
|
+
(r'\S+', Text),
|
54
|
+
]
|
55
|
+
}
|
56
|
+
|
57
|
+
def analyse_text(self, text):
|
58
|
+
return
|
@@ -0,0 +1,99 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.berry
|
3
|
+
~~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexer for Berry.
|
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, words, include, bygroups
|
12
|
+
from pygments.token import Comment, Whitespace, Operator, Keyword, Name, \
|
13
|
+
String, Number, Punctuation
|
14
|
+
|
15
|
+
__all__ = ['BerryLexer']
|
16
|
+
|
17
|
+
|
18
|
+
class BerryLexer(RegexLexer):
|
19
|
+
"""
|
20
|
+
For `berry <http://github.com/berry-lang/berry>`_ source code.
|
21
|
+
|
22
|
+
.. versionadded:: 2.12.0
|
23
|
+
"""
|
24
|
+
name = 'Berry'
|
25
|
+
aliases = ['berry', 'be']
|
26
|
+
filenames = ['*.be']
|
27
|
+
mimetypes = ['text/x-berry', 'application/x-berry']
|
28
|
+
|
29
|
+
_name = r'\b[^\W\d]\w*'
|
30
|
+
|
31
|
+
tokens = {
|
32
|
+
'root': [
|
33
|
+
include('whitespace'),
|
34
|
+
include('numbers'),
|
35
|
+
include('keywords'),
|
36
|
+
(rf'(def)(\s+)({_name})',
|
37
|
+
bygroups(Keyword.Declaration, Whitespace, Name.Function)),
|
38
|
+
(rf'\b(class)(\s+)({_name})',
|
39
|
+
bygroups(Keyword.Declaration, Whitespace, Name.Class)),
|
40
|
+
(rf'\b(import)(\s+)({_name})',
|
41
|
+
bygroups(Keyword.Namespace, Whitespace, Name.Namespace)),
|
42
|
+
include('expr')
|
43
|
+
],
|
44
|
+
'expr': [
|
45
|
+
(r'[^\S\n]+', Whitespace),
|
46
|
+
(r'\.\.|[~!%^&*+=|?:<>/-]', Operator),
|
47
|
+
(r'[(){}\[\],.;]', Punctuation),
|
48
|
+
include('controls'),
|
49
|
+
include('builtins'),
|
50
|
+
include('funccall'),
|
51
|
+
include('member'),
|
52
|
+
include('name'),
|
53
|
+
include('strings')
|
54
|
+
],
|
55
|
+
'whitespace': [
|
56
|
+
(r'\s+', Whitespace),
|
57
|
+
(r'#-(.|\n)*?-#', Comment.Multiline),
|
58
|
+
(r'#.*?$', Comment.Single)
|
59
|
+
],
|
60
|
+
'keywords': [
|
61
|
+
(words((
|
62
|
+
'as', 'break', 'continue', 'import', 'static', 'self', 'super'),
|
63
|
+
suffix=r'\b'), Keyword.Reserved),
|
64
|
+
(r'(true|false|nil)\b', Keyword.Constant),
|
65
|
+
(r'(var|def)\b', Keyword.Declaration)
|
66
|
+
],
|
67
|
+
'controls': [
|
68
|
+
(words((
|
69
|
+
'if', 'elif', 'else', 'for', 'while', 'do', 'end', 'break',
|
70
|
+
'continue', 'return', 'try', 'except', 'raise'),
|
71
|
+
suffix=r'\b'), Keyword)
|
72
|
+
],
|
73
|
+
'builtins': [
|
74
|
+
(words((
|
75
|
+
'assert', 'bool', 'input', 'classname', 'classof', 'number', 'real',
|
76
|
+
'bytes', 'compile', 'map', 'list', 'int', 'isinstance', 'print',
|
77
|
+
'range', 'str', 'super', 'module', 'size', 'issubclass', 'open',
|
78
|
+
'file', 'type', 'call'),
|
79
|
+
suffix=r'\b'), Name.Builtin)
|
80
|
+
],
|
81
|
+
'numbers': [
|
82
|
+
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
83
|
+
(r'-?\d+', Number.Integer),
|
84
|
+
(r'(-?\d+\.?|\.\d)\d*([eE][+-]?\d+)?', Number.Float)
|
85
|
+
],
|
86
|
+
'name': [
|
87
|
+
(_name, Name)
|
88
|
+
],
|
89
|
+
'funccall': [
|
90
|
+
(rf'{_name}(?=\s*\()', Name.Function, '#pop')
|
91
|
+
],
|
92
|
+
'member': [
|
93
|
+
(rf'(?<=\.){_name}\b(?!\()', Name.Attribute, '#pop')
|
94
|
+
],
|
95
|
+
'strings': [
|
96
|
+
(r'"([^\\]|\\.)*?"', String.Double, '#pop'),
|
97
|
+
(r'\'([^\\]|\\.)*?\'', String.Single, '#pop')
|
98
|
+
]
|
99
|
+
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for BibTeX bibliography data and styles
|
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
|
|
@@ -12,8 +12,8 @@ import re
|
|
12
12
|
|
13
13
|
from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, default, \
|
14
14
|
words
|
15
|
-
from pygments.token import Name, Comment, String, Error, Number,
|
16
|
-
|
15
|
+
from pygments.token import Name, Comment, String, Error, Number, Keyword, \
|
16
|
+
Punctuation, Whitespace
|
17
17
|
|
18
18
|
__all__ = ['BibTeXLexer', 'BSTLexer']
|
19
19
|
|
@@ -55,7 +55,7 @@ class BibTeXLexer(ExtendedRegexLexer):
|
|
55
55
|
tokens = {
|
56
56
|
'root': [
|
57
57
|
include('whitespace'),
|
58
|
-
('@comment', Comment),
|
58
|
+
(r'@comment(?!ary)', Comment),
|
59
59
|
('@preamble', Name.Class, ('closing-brace', 'value', 'opening-brace')),
|
60
60
|
('@string', Name.Class, ('closing-brace', 'field', 'opening-brace')),
|
61
61
|
('@' + IDENTIFIER, Name.Class,
|
@@ -108,7 +108,7 @@ class BibTeXLexer(ExtendedRegexLexer):
|
|
108
108
|
(r'[^\{\}]+', String),
|
109
109
|
],
|
110
110
|
'whitespace': [
|
111
|
-
(r'\s+',
|
111
|
+
(r'\s+', Whitespace),
|
112
112
|
],
|
113
113
|
}
|
114
114
|
|
@@ -153,7 +153,7 @@ class BSTLexer(RegexLexer):
|
|
153
153
|
default('#pop'),
|
154
154
|
],
|
155
155
|
'whitespace': [
|
156
|
-
(r'\s+',
|
156
|
+
(r'\s+', Whitespace),
|
157
157
|
('%.*?$', Comment.Single),
|
158
158
|
],
|
159
159
|
}
|
@@ -4,20 +4,16 @@
|
|
4
4
|
|
5
5
|
Lexers for the Boa 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
|
-
import re
|
12
|
-
|
13
11
|
from pygments.lexer import RegexLexer, words
|
14
|
-
from pygments.token import String, Comment, Keyword, Name, Number,
|
15
|
-
|
12
|
+
from pygments.token import String, Comment, Keyword, Name, Number, Operator, \
|
13
|
+
Punctuation, Whitespace
|
16
14
|
|
17
15
|
__all__ = ['BoaLexer']
|
18
16
|
|
19
|
-
line_re = re.compile('.*?\n')
|
20
|
-
|
21
17
|
|
22
18
|
class BoaLexer(RegexLexer):
|
23
19
|
"""
|
@@ -96,6 +92,6 @@ class BoaLexer(RegexLexer):
|
|
96
92
|
(words(string_sep), String.Delimiter),
|
97
93
|
(r'[a-zA-Z_]+', Name.Variable),
|
98
94
|
(r'[0-9]+', Number.Integer),
|
99
|
-
(r'\s
|
95
|
+
(r'\s+', Whitespace), # Whitespace
|
100
96
|
]
|
101
97
|
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for "business-oriented" 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
|
|
@@ -12,7 +12,7 @@ import re
|
|
12
12
|
|
13
13
|
from pygments.lexer import RegexLexer, include, words, bygroups
|
14
14
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
15
|
-
Number, Punctuation, Error
|
15
|
+
Number, Punctuation, Error, Whitespace
|
16
16
|
|
17
17
|
from pygments.lexers._openedge_builtins import OPENEDGEKEYWORDS
|
18
18
|
|
@@ -49,7 +49,7 @@ class CobolLexer(RegexLexer):
|
|
49
49
|
include('nums'),
|
50
50
|
(r'[a-z0-9]([\w\-]*[a-z0-9]+)?', Name.Variable),
|
51
51
|
# (r'[\s]+', Text),
|
52
|
-
(r'[ \t]+',
|
52
|
+
(r'[ \t]+', Whitespace),
|
53
53
|
],
|
54
54
|
'comment': [
|
55
55
|
(r'(^.{6}[*/].*\n|^.{6}|\*>.*\n)', Comment),
|
@@ -129,7 +129,7 @@ class CobolLexer(RegexLexer):
|
|
129
129
|
'SEQUENCE', 'SEQUENTIAL', 'SHARING', 'SIGN', 'SIGNED', 'SIGNED-INT',
|
130
130
|
'SIGNED-LONG', 'SIGNED-SHORT', 'SIZE', 'SORT-MERGE', 'SOURCE',
|
131
131
|
'SOURCE-COMPUTER', 'SPECIAL-NAMES', 'STANDARD',
|
132
|
-
'STANDARD-1', 'STANDARD-2', 'STATUS', 'SUM',
|
132
|
+
'STANDARD-1', 'STANDARD-2', 'STATUS', 'SUBKEY', 'SUM',
|
133
133
|
'SYMBOLIC', 'SYNC', 'SYNCHRONIZED', 'TALLYING', 'TAPE',
|
134
134
|
'TEST', 'THROUGH', 'THRU', 'TIME', 'TIMES', 'TO', 'TOP', 'TRAILING',
|
135
135
|
'TRANSFORM', 'TYPE', 'UNDERLINE', 'UNIT', 'UNSIGNED',
|
@@ -252,7 +252,7 @@ class ABAPLexer(RegexLexer):
|
|
252
252
|
|
253
253
|
tokens = {
|
254
254
|
'common': [
|
255
|
-
(r'\s+',
|
255
|
+
(r'\s+', Whitespace),
|
256
256
|
(r'^\*.*$', Comment.Single),
|
257
257
|
(r'\".*?\n', Comment.Single),
|
258
258
|
(r'##\w+', Comment.Special),
|
@@ -270,18 +270,18 @@ class ABAPLexer(RegexLexer):
|
|
270
270
|
r'TRANSACTION|TRANSFORMATION))\b',
|
271
271
|
Keyword),
|
272
272
|
(r'(FORM|PERFORM)(\s+)(\w+)',
|
273
|
-
bygroups(Keyword,
|
273
|
+
bygroups(Keyword, Whitespace, Name.Function)),
|
274
274
|
(r'(PERFORM)(\s+)(\()(\w+)(\))',
|
275
|
-
bygroups(Keyword,
|
275
|
+
bygroups(Keyword, Whitespace, Punctuation, Name.Variable, Punctuation)),
|
276
276
|
(r'(MODULE)(\s+)(\S+)(\s+)(INPUT|OUTPUT)',
|
277
|
-
bygroups(Keyword,
|
277
|
+
bygroups(Keyword, Whitespace, Name.Function, Whitespace, Keyword)),
|
278
278
|
|
279
279
|
# method implementation
|
280
280
|
(r'(METHOD)(\s+)([\w~]+)',
|
281
|
-
bygroups(Keyword,
|
281
|
+
bygroups(Keyword, Whitespace, Name.Function)),
|
282
282
|
# method calls
|
283
283
|
(r'(\s+)([\w\-]+)([=\-]>)([\w\-~]+)',
|
284
|
-
bygroups(
|
284
|
+
bygroups(Whitespace, Name.Variable, Operator, Name.Function)),
|
285
285
|
# call methodnames returning style
|
286
286
|
(r'(?<=(=|-)>)([\w\-~]+)(?=\()', Name.Function),
|
287
287
|
|
@@ -299,7 +299,7 @@ class ABAPLexer(RegexLexer):
|
|
299
299
|
r'CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|'
|
300
300
|
r'DELETE-ADJACENT|DIVIDE-CORRESPONDING|'
|
301
301
|
r'EDITOR-CALL|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|EXIT-COMMAND|'
|
302
|
-
r'FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|'
|
302
|
+
r'FIELD-GROUPS|FIELD-SYMBOLS|FIELD-SYMBOL|FUNCTION-POOL|'
|
303
303
|
r'INTERFACE-POOL|INVERTED-DATE|'
|
304
304
|
r'LOAD-OF-PROGRAM|LOG-POINT|'
|
305
305
|
r'MESSAGE-ID|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|'
|
@@ -373,7 +373,7 @@ class ABAPLexer(RegexLexer):
|
|
373
373
|
(r'(^|(?<=(\s|\.)))(ABBREVIATED|ABSTRACT|ADD|ALIASES|ALIGN|ALPHA|'
|
374
374
|
r'ASSERT|AS|ASSIGN(ING)?|AT(\s+FIRST)?|'
|
375
375
|
r'BACK|BLOCK|BREAK-POINT|'
|
376
|
-
r'CASE|CATCH|CHANGING|CHECK|CLASS|CLEAR|COLLECT|COLOR|COMMIT|'
|
376
|
+
r'CASE|CAST|CATCH|CHANGING|CHECK|CLASS|CLEAR|COLLECT|COLOR|COMMIT|COND|CONV|'
|
377
377
|
r'CREATE|COMMUNICATION|COMPONENTS?|COMPUTE|CONCATENATE|CONDENSE|'
|
378
378
|
r'CONSTANTS|CONTEXTS|CONTINUE|CONTROLS|COUNTRY|CURRENCY|'
|
379
379
|
r'DATA|DATE|DECIMALS|DEFAULT|DEFINE|DEFINITION|DEFERRED|DEMAND|'
|
@@ -388,15 +388,15 @@ class ABAPLexer(RegexLexer):
|
|
388
388
|
r'LANGUAGE|LEAVE|LENGTH|LINES|LOAD|LOCAL|'
|
389
389
|
r'JOIN|'
|
390
390
|
r'KEY|'
|
391
|
-
r'NEXT|'
|
391
|
+
r'NEW|NEXT|'
|
392
392
|
r'MAXIMUM|MESSAGE|METHOD[S]?|MINIMUM|MODULE|MODIFIER|MODIFY|MOVE|MULTIPLY|'
|
393
393
|
r'NODES|NUMBER|'
|
394
394
|
r'OBLIGATORY|OBJECT|OF|OFF|ON|OTHERS|OVERLAY|'
|
395
395
|
r'PACK|PAD|PARAMETERS|PERCENTAGE|POSITION|PROGRAM|PROVIDE|PUBLIC|PUT|PF\d\d|'
|
396
396
|
r'RAISE|RAISING|RANGES?|READ|RECEIVE|REDEFINITION|REFRESH|REJECT|REPORT|RESERVE|'
|
397
|
-
r'RESUME|RETRY|RETURN|RETURNING|RIGHT|ROLLBACK|REPLACE|'
|
397
|
+
r'REF|RESUME|RETRY|RETURN|RETURNING|RIGHT|ROLLBACK|REPLACE|'
|
398
398
|
r'SCROLL|SEARCH|SELECT|SHIFT|SIGN|SINGLE|SIZE|SKIP|SORT|SPLIT|STATICS|STOP|'
|
399
|
-
r'STYLE|SUBMATCHES|SUBMIT|SUBTRACT|SUM(?!\()|SUMMARY|SUMMING|SUPPLY|'
|
399
|
+
r'STYLE|SUBMATCHES|SUBMIT|SUBTRACT|SUM(?!\()|SUMMARY|SUMMING|SUPPLY|SWITCH|'
|
400
400
|
r'TABLE|TABLES|TIMESTAMP|TIMES?|TIMEZONE|TITLE|\??TO|'
|
401
401
|
r'TOP-OF-PAGE|TRANSFER|TRANSLATE|TRY|TYPES|'
|
402
402
|
r'ULINE|UNDER|UNPACK|UPDATE|USING|'
|
@@ -481,7 +481,7 @@ class OpenEdgeLexer(RegexLexer):
|
|
481
481
|
(r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
|
482
482
|
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
483
483
|
(r'[0-9]+', Number.Integer),
|
484
|
-
(r'\s+',
|
484
|
+
(r'\s+', Whitespace),
|
485
485
|
(r'[+*/=-]', Operator),
|
486
486
|
(r'[.:()]', Punctuation),
|
487
487
|
(r'.', Name.Variable), # Lazy catch-all
|
@@ -552,7 +552,7 @@ com/gooddata/processor/COMMANDS.txt>`_
|
|
552
552
|
(r'"', String, 'string-literal'),
|
553
553
|
(r'[0-9]+(?:\.[0-9]+)?(?:e[+-]?[0-9]{1,3})?', Number),
|
554
554
|
# Space is not significant
|
555
|
-
(r'\s',
|
555
|
+
(r'\s', Whitespace)
|
556
556
|
],
|
557
557
|
'string-literal': [
|
558
558
|
(r'\\[tnrfbae"\\]', String.Escape),
|
@@ -616,7 +616,7 @@ class MaqlLexer(RegexLexer):
|
|
616
616
|
# Punctuation
|
617
617
|
(r'[,;()]', Punctuation),
|
618
618
|
# Space is not significant
|
619
|
-
(r'\s+',
|
619
|
+
(r'\s+', Whitespace)
|
620
620
|
],
|
621
621
|
'string-literal': [
|
622
622
|
(r'\\[tnrfbae"\\]', String.Escape),
|