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,188 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.q
|
3
|
+
~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexer for the Q programming 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, words, include, bygroups, inherit
|
12
|
+
from pygments.token import Comment, Name, Number, Operator, Punctuation, \
|
13
|
+
String, Whitespace, Literal, Generic
|
14
|
+
|
15
|
+
__all__ = ["KLexer", "QLexer"]
|
16
|
+
|
17
|
+
|
18
|
+
class KLexer(RegexLexer):
|
19
|
+
"""
|
20
|
+
For `K <https://code.kx.com/>`_ source code.
|
21
|
+
|
22
|
+
.. versionadded:: 2.12
|
23
|
+
"""
|
24
|
+
|
25
|
+
name = "K"
|
26
|
+
aliases = ["k"]
|
27
|
+
filenames = ["*.k"]
|
28
|
+
|
29
|
+
tokens = {
|
30
|
+
"whitespace": [
|
31
|
+
# hashbang script
|
32
|
+
(r"^#!.*", Comment.Hashbang),
|
33
|
+
# Comments
|
34
|
+
(r"^/\s*\n", Comment.Multiline, "comments"),
|
35
|
+
(r"(?<!\S)/.*", Comment.Single),
|
36
|
+
# Whitespace
|
37
|
+
(r"\s+", Whitespace),
|
38
|
+
# Strings
|
39
|
+
(r"\"", String.Double, "strings"),
|
40
|
+
],
|
41
|
+
"root": [
|
42
|
+
include("whitespace"),
|
43
|
+
include("keywords"),
|
44
|
+
include("declarations"),
|
45
|
+
],
|
46
|
+
"keywords": [
|
47
|
+
(words(("abs", "acos", "asin", "atan", "avg", "bin",
|
48
|
+
"binr", "by", "cor", "cos", "cov", "dev",
|
49
|
+
"delete", "div", "do", "enlist", "exec", "exit",
|
50
|
+
"exp", "from", "getenv", "hopen", "if", "in",
|
51
|
+
"insert", "last", "like", "log", "max", "min",
|
52
|
+
"prd", "select", "setenv", "sin", "sqrt", "ss",
|
53
|
+
"sum", "tan", "update", "var", "wavg", "while",
|
54
|
+
"within", "wsum", "xexp"),
|
55
|
+
suffix=r"\b"), Operator.Word),
|
56
|
+
],
|
57
|
+
"declarations": [
|
58
|
+
# Timing
|
59
|
+
(r"^\\ts?", Comment.Preproc),
|
60
|
+
(r"^(\\\w\s+[^/\n]*?)(/.*)",
|
61
|
+
bygroups(Comment.Preproc, Comment.Single)),
|
62
|
+
# Generic System Commands
|
63
|
+
(r"^\\\w.*", Comment.Preproc),
|
64
|
+
# Prompt
|
65
|
+
(r"^[a-zA-Z]\)", Generic.Prompt),
|
66
|
+
# Function Names
|
67
|
+
(r"([.]?[a-zA-Z][\w.]*)(\s*)([-.~=!@#$%^&*_+|,<>?/\\:']?:)(\s*)(\{)",
|
68
|
+
bygroups(Name.Function, Whitespace, Operator, Whitespace, Punctuation),
|
69
|
+
"functions"),
|
70
|
+
# Variable Names
|
71
|
+
(r"([.]?[a-zA-Z][\w.]*)(\s*)([-.~=!@#$%^&*_+|,<>?/\\:']?:)",
|
72
|
+
bygroups(Name.Variable, Whitespace, Operator)),
|
73
|
+
# Functions
|
74
|
+
(r"\{", Punctuation, "functions"),
|
75
|
+
# Parentheses
|
76
|
+
(r"\(", Punctuation, "parentheses"),
|
77
|
+
# Brackets
|
78
|
+
(r"\[", Punctuation, "brackets"),
|
79
|
+
# Errors
|
80
|
+
(r"'`([a-zA-Z][\w.]*)?", Name.Exception),
|
81
|
+
# File Symbols
|
82
|
+
(r"`:([a-zA-Z/][\w./]*)?", String.Symbol),
|
83
|
+
# Symbols
|
84
|
+
(r"`([a-zA-Z][\w.]*)?", String.Symbol),
|
85
|
+
# Numbers
|
86
|
+
include("numbers"),
|
87
|
+
# Variable Names
|
88
|
+
(r"[a-zA-Z][\w.]*", Name),
|
89
|
+
# Operators
|
90
|
+
(r"[-=+*#$%@!~^&:.,<>'\\|/?_]", Operator),
|
91
|
+
# Punctuation
|
92
|
+
(r";", Punctuation),
|
93
|
+
],
|
94
|
+
"functions": [
|
95
|
+
include("root"),
|
96
|
+
(r"\}", Punctuation, "#pop"),
|
97
|
+
],
|
98
|
+
"parentheses": [
|
99
|
+
include("root"),
|
100
|
+
(r"\)", Punctuation, "#pop"),
|
101
|
+
],
|
102
|
+
"brackets": [
|
103
|
+
include("root"),
|
104
|
+
(r"\]", Punctuation, "#pop"),
|
105
|
+
],
|
106
|
+
"numbers": [
|
107
|
+
# Binary Values
|
108
|
+
(r"[01]+b", Number.Bin),
|
109
|
+
# Nulls/Infinities
|
110
|
+
(r"0[nNwW][cefghijmndzuvtp]?", Number),
|
111
|
+
# Timestamps
|
112
|
+
((r"(?:[0-9]{4}[.][0-9]{2}[.][0-9]{2}|[0-9]+)"
|
113
|
+
"D(?:[0-9](?:[0-9](?::[0-9]{2}"
|
114
|
+
"(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)?"), Literal.Date),
|
115
|
+
# Datetimes
|
116
|
+
((r"[0-9]{4}[.][0-9]{2}"
|
117
|
+
"(?:m|[.][0-9]{2}(?:T(?:[0-9]{2}:[0-9]{2}"
|
118
|
+
"(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)"), Literal.Date),
|
119
|
+
# Times
|
120
|
+
(r"[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:[.][0-9]{1,3})?)?",
|
121
|
+
Literal.Date),
|
122
|
+
# GUIDs
|
123
|
+
(r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
|
124
|
+
Number.Hex),
|
125
|
+
# Byte Vectors
|
126
|
+
(r"0x[0-9a-fA-F]+", Number.Hex),
|
127
|
+
# Floats
|
128
|
+
(r"([0-9]*[.]?[0-9]+|[0-9]+[.]?[0-9]*)[eE][+-]?[0-9]+[ef]?",
|
129
|
+
Number.Float),
|
130
|
+
(r"([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)[ef]?", Number.Float),
|
131
|
+
(r"[0-9]+[ef]", Number.Float),
|
132
|
+
# Characters
|
133
|
+
(r"[0-9]+c", Number),
|
134
|
+
# Integers
|
135
|
+
(r"[0-9]+[ihtuv]", Number.Integer),
|
136
|
+
# Long Integers
|
137
|
+
(r"[0-9]+[jnp]?", Number.Integer.Long),
|
138
|
+
],
|
139
|
+
"comments": [
|
140
|
+
(r"[^\\]+", Comment.Multiline),
|
141
|
+
(r"^\\", Comment.Multiline, "#pop"),
|
142
|
+
(r"\\", Comment.Multiline),
|
143
|
+
],
|
144
|
+
"strings": [
|
145
|
+
(r'[^"\\]+', String.Double),
|
146
|
+
(r"\\.", String.Escape),
|
147
|
+
(r'"', String.Double, "#pop"),
|
148
|
+
],
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
class QLexer(KLexer):
|
153
|
+
"""
|
154
|
+
For `Q <https://code.kx.com/>`_ source code.
|
155
|
+
|
156
|
+
.. versionadded:: 2.12
|
157
|
+
"""
|
158
|
+
|
159
|
+
name = "Q"
|
160
|
+
aliases = ["q"]
|
161
|
+
filenames = ["*.q"]
|
162
|
+
|
163
|
+
tokens = {
|
164
|
+
"root": [
|
165
|
+
(words(("aj", "aj0", "ajf", "ajf0", "all", "and", "any", "asc",
|
166
|
+
"asof", "attr", "avgs", "ceiling", "cols", "count", "cross",
|
167
|
+
"csv", "cut", "deltas", "desc", "differ", "distinct", "dsave",
|
168
|
+
"each", "ej", "ema", "eval", "except", "fby", "fills", "first",
|
169
|
+
"fkeys", "flip", "floor", "get", "group", "gtime", "hclose",
|
170
|
+
"hcount", "hdel", "hsym", "iasc", "idesc", "ij", "ijf",
|
171
|
+
"inter", "inv", "key", "keys", "lj", "ljf", "load", "lower",
|
172
|
+
"lsq", "ltime", "ltrim", "mavg", "maxs", "mcount", "md5",
|
173
|
+
"mdev", "med", "meta", "mins", "mmax", "mmin", "mmu", "mod",
|
174
|
+
"msum", "neg", "next", "not", "null", "or", "over", "parse",
|
175
|
+
"peach", "pj", "prds", "prior", "prev", "rand", "rank", "ratios",
|
176
|
+
"raze", "read0", "read1", "reciprocal", "reval", "reverse",
|
177
|
+
"rload", "rotate", "rsave", "rtrim", "save", "scan", "scov",
|
178
|
+
"sdev", "set", "show", "signum", "ssr", "string", "sublist",
|
179
|
+
"sums", "sv", "svar", "system", "tables", "til", "trim", "txf",
|
180
|
+
"type", "uj", "ujf", "ungroup", "union", "upper", "upsert",
|
181
|
+
"value", "view", "views", "vs", "where", "wj", "wj1", "ww",
|
182
|
+
"xasc", "xbar", "xcol", "xcols", "xdesc", "xgroup", "xkey",
|
183
|
+
"xlog", "xprev", "xrank"),
|
184
|
+
suffix=r"\b"), Name.Builtin,
|
185
|
+
),
|
186
|
+
inherit,
|
187
|
+
],
|
188
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.qlik
|
3
|
+
~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexer for the qlik scripting language
|
6
|
+
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
|
+
:license: BSD, see LICENSE for details.
|
9
|
+
"""
|
10
|
+
|
11
|
+
import re
|
12
|
+
|
13
|
+
from pygments.lexer import RegexLexer, include, bygroups, words
|
14
|
+
from pygments.token import Comment, Keyword, Name, Number, Operator, \
|
15
|
+
Punctuation, String, Text
|
16
|
+
from pygments.lexers._qlik_builtins import OPERATORS_LIST, STATEMENT_LIST, \
|
17
|
+
SCRIPT_FUNCTIONS, CONSTANT_LIST
|
18
|
+
|
19
|
+
__all__ = ["QlikLexer"]
|
20
|
+
|
21
|
+
|
22
|
+
class QlikLexer(RegexLexer):
|
23
|
+
"""
|
24
|
+
Lexer for qlik code, including .qvs files
|
25
|
+
|
26
|
+
.. versionadded:: 2.12
|
27
|
+
"""
|
28
|
+
|
29
|
+
name = "Qlik"
|
30
|
+
aliases = ["qlik", "qlikview", "qliksense", "qlikscript"]
|
31
|
+
filenames = ["*.qvs", "*.qvw"]
|
32
|
+
|
33
|
+
flags = re.IGNORECASE
|
34
|
+
|
35
|
+
tokens = {
|
36
|
+
# Handle multi-line comments
|
37
|
+
"comment": [
|
38
|
+
(r"\*/", Comment.Multiline, "#pop"),
|
39
|
+
(r"[^*]+", Comment.Multiline),
|
40
|
+
],
|
41
|
+
# Handle numbers
|
42
|
+
"numerics": [
|
43
|
+
(r"\b\d+\.\d+(e\d+)?[fd]?\b", Number.Float),
|
44
|
+
(r"\b\d+\b", Number.Integer),
|
45
|
+
],
|
46
|
+
# Handle variable names in things
|
47
|
+
"interp": [
|
48
|
+
(
|
49
|
+
r"(\$\()(\w+)(\))",
|
50
|
+
bygroups(String.Interpol, Name.Variable, String.Interpol),
|
51
|
+
),
|
52
|
+
],
|
53
|
+
# Handle strings
|
54
|
+
"string": [
|
55
|
+
(r"'", String, "#pop"),
|
56
|
+
include("interp"),
|
57
|
+
(r"[^'$]+", String),
|
58
|
+
(r"\$", String),
|
59
|
+
],
|
60
|
+
#
|
61
|
+
"assignment": [
|
62
|
+
(r";", Punctuation, "#pop"),
|
63
|
+
include("root"),
|
64
|
+
],
|
65
|
+
"field_name_quote": [
|
66
|
+
(r'"', String.Symbol, "#pop"),
|
67
|
+
include("interp"),
|
68
|
+
(r"[^\"$]+", String.Symbol),
|
69
|
+
(r"\$", String.Symbol),
|
70
|
+
],
|
71
|
+
"field_name_bracket": [
|
72
|
+
(r"\]", String.Symbol, "#pop"),
|
73
|
+
include("interp"),
|
74
|
+
(r"[^\]$]+", String.Symbol),
|
75
|
+
(r"\$", String.Symbol),
|
76
|
+
],
|
77
|
+
"function": [(r"\)", Punctuation, "#pop"), include("root")],
|
78
|
+
"root": [
|
79
|
+
# Whitespace and comments
|
80
|
+
(r"\s+", Text.Whitespace),
|
81
|
+
(r"/\*", Comment.Multiline, "comment"),
|
82
|
+
(r"//.*\n", Comment.Single),
|
83
|
+
# variable assignment
|
84
|
+
(r"(let|set)(\s+)", bygroups(Keyword.Declaration, Text.Whitespace),
|
85
|
+
"assignment"),
|
86
|
+
# Word operators
|
87
|
+
(words(OPERATORS_LIST["words"], prefix=r"\b", suffix=r"\b"),
|
88
|
+
Operator.Word),
|
89
|
+
# Statements
|
90
|
+
(words(STATEMENT_LIST, suffix=r"\b"), Keyword),
|
91
|
+
# Table names
|
92
|
+
(r"[a-z]\w*:", Keyword.Declaration),
|
93
|
+
# Constants
|
94
|
+
(words(CONSTANT_LIST, suffix=r"\b"), Keyword.Constant),
|
95
|
+
# Functions
|
96
|
+
(words(SCRIPT_FUNCTIONS, suffix=r"(?=\s*\()"), Name.Builtin,
|
97
|
+
"function"),
|
98
|
+
# interpolation - e.g. $(variableName)
|
99
|
+
include("interp"),
|
100
|
+
# Quotes denote a field/file name
|
101
|
+
(r'"', String.Symbol, "field_name_quote"),
|
102
|
+
# Square brackets denote a field/file name
|
103
|
+
(r"\[", String.Symbol, "field_name_bracket"),
|
104
|
+
# Strings
|
105
|
+
(r"'", String, "string"),
|
106
|
+
# Numbers
|
107
|
+
include("numerics"),
|
108
|
+
# Operator symbols
|
109
|
+
(words(OPERATORS_LIST["symbols"]), Operator),
|
110
|
+
# Strings denoted by single quotes
|
111
|
+
(r"'.+?'", String),
|
112
|
+
# Words as text
|
113
|
+
(r"\b\w+\b", Text),
|
114
|
+
# Basic punctuation
|
115
|
+
(r"[,;.()\\/]", Punctuation),
|
116
|
+
],
|
117
|
+
}
|
@@ -4,15 +4,15 @@
|
|
4
4
|
|
5
5
|
Lexers for the R/S 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
|
|
11
11
|
import re
|
12
12
|
|
13
|
-
from pygments.lexer import Lexer, RegexLexer, include, do_insertions
|
13
|
+
from pygments.lexer import Lexer, RegexLexer, include, do_insertions
|
14
14
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
15
|
-
Number, Punctuation, Generic
|
15
|
+
Number, Punctuation, Generic, Whitespace
|
16
16
|
|
17
17
|
__all__ = ['RConsoleLexer', 'SLexer', 'RdLexer']
|
18
18
|
|
@@ -114,7 +114,7 @@ class SLexer(RegexLexer):
|
|
114
114
|
'statements': [
|
115
115
|
include('comments'),
|
116
116
|
# whitespaces
|
117
|
-
(r'\s+',
|
117
|
+
(r'\s+', Whitespace),
|
118
118
|
(r'\'', String, 'string_squote'),
|
119
119
|
(r'\"', String, 'string_dquote'),
|
120
120
|
include('builtin_symbols'),
|
@@ -4,15 +4,15 @@
|
|
4
4
|
|
5
5
|
Lexers for semantic web and RDF query languages and markup.
|
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
13
|
from pygments.lexer import RegexLexer, bygroups, default
|
14
|
-
from pygments.token import Keyword, Punctuation, String, Number, Operator,
|
15
|
-
Whitespace, Name, Literal, Comment, Text
|
14
|
+
from pygments.token import Keyword, Punctuation, String, Number, Operator, \
|
15
|
+
Generic, Whitespace, Name, Literal, Comment, Text
|
16
16
|
|
17
17
|
__all__ = ['SparqlLexer', 'TurtleLexer', 'ShExCLexer']
|
18
18
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for the REBOL and related 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
|
|
@@ -119,11 +119,6 @@ class RebolLexer(RegexLexer):
|
|
119
119
|
|
120
120
|
tokens = {
|
121
121
|
'root': [
|
122
|
-
(r'[^R]+', Comment),
|
123
|
-
(r'REBOL\s+\[', Generic.Strong, 'script'),
|
124
|
-
(r'R', Comment)
|
125
|
-
],
|
126
|
-
'script': [
|
127
122
|
(r'\s+', Text),
|
128
123
|
(r'#"', String.Char, 'char'),
|
129
124
|
(r'#\{[0-9a-f]*\}', Number.Hex),
|
@@ -314,12 +309,6 @@ class RedLexer(RegexLexer):
|
|
314
309
|
|
315
310
|
tokens = {
|
316
311
|
'root': [
|
317
|
-
(r'[^R]+', Comment),
|
318
|
-
(r'Red/System\s+\[', Generic.Strong, 'script'),
|
319
|
-
(r'Red\s+\[', Generic.Strong, 'script'),
|
320
|
-
(r'R', Comment)
|
321
|
-
],
|
322
|
-
'script': [
|
323
312
|
(r'\s+', Text),
|
324
313
|
(r'#"', String.Char, 'char'),
|
325
314
|
(r'#\{[0-9a-f\s]*\}', Number.Hex),
|
@@ -4,12 +4,13 @@
|
|
4
4
|
|
5
5
|
Lexer for the Ride programming 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
|
from pygments.lexer import RegexLexer, words, include
|
12
|
-
from pygments.token import Comment, Keyword, Name, Number, Punctuation,
|
12
|
+
from pygments.token import Comment, Keyword, Name, Number, Punctuation, \
|
13
|
+
String, Text
|
13
14
|
|
14
15
|
__all__ = ['RideLexer']
|
15
16
|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.rita
|
3
|
+
~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexers for RITA 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
|
12
|
+
from pygments.token import Comment, Operator, Keyword, Name, Literal, \
|
13
|
+
Punctuation, Whitespace
|
14
|
+
|
15
|
+
__all__ = ['RitaLexer']
|
16
|
+
|
17
|
+
|
18
|
+
class RitaLexer(RegexLexer):
|
19
|
+
"""
|
20
|
+
Lexer for RITA.
|
21
|
+
|
22
|
+
.. versionadded:: 2.11
|
23
|
+
"""
|
24
|
+
name = 'Rita'
|
25
|
+
url = 'https://github.com/zaibacu/rita-dsl'
|
26
|
+
filenames = ['*.rita']
|
27
|
+
aliases = ['rita']
|
28
|
+
mimetypes = ['text/rita']
|
29
|
+
|
30
|
+
tokens = {
|
31
|
+
'root': [
|
32
|
+
(r'\n', Whitespace),
|
33
|
+
(r'\s+', Whitespace),
|
34
|
+
(r'#(.*?)\n', Comment.Single),
|
35
|
+
(r'@(.*?)\n', Operator), # Yes, whole line as an operator
|
36
|
+
(r'"(\w|\d|\s|(\\")|[\'_\-./,\?\!])+?"', Literal),
|
37
|
+
(r'\'(\w|\d|\s|(\\\')|["_\-./,\?\!])+?\'', Literal),
|
38
|
+
(r'([A-Z_]+)', Keyword),
|
39
|
+
(r'([a-z0-9_]+)', Name),
|
40
|
+
(r'((->)|[!?+*|=])', Operator),
|
41
|
+
(r'[\(\),\{\}]', Punctuation)
|
42
|
+
]
|
43
|
+
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for Relax-NG Compact syntax
|
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
|
|
@@ -17,12 +17,13 @@ __all__ = ['RNCCompactLexer']
|
|
17
17
|
|
18
18
|
class RNCCompactLexer(RegexLexer):
|
19
19
|
"""
|
20
|
-
For
|
20
|
+
For RelaxNG-compact syntax.
|
21
21
|
|
22
22
|
.. versionadded:: 2.2
|
23
23
|
"""
|
24
24
|
|
25
25
|
name = 'Relax-NG Compact'
|
26
|
+
url = 'http://relaxng.org'
|
26
27
|
aliases = ['rng-compact', 'rnc']
|
27
28
|
filenames = ['*.rnc']
|
28
29
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for Roboconf DSL.
|
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
|
|
@@ -16,7 +16,7 @@ __all__ = ['RoboconfGraphLexer', 'RoboconfInstancesLexer']
|
|
16
16
|
|
17
17
|
class RoboconfGraphLexer(RegexLexer):
|
18
18
|
"""
|
19
|
-
Lexer for
|
19
|
+
Lexer for Roboconf graph files.
|
20
20
|
|
21
21
|
.. versionadded:: 2.1
|
22
22
|
"""
|
@@ -51,7 +51,7 @@ class RoboconfGraphLexer(RegexLexer):
|
|
51
51
|
|
52
52
|
class RoboconfInstancesLexer(RegexLexer):
|
53
53
|
"""
|
54
|
-
Lexer for
|
54
|
+
Lexer for Roboconf instances files.
|
55
55
|
|
56
56
|
.. versionadded:: 2.1
|
57
57
|
"""
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for Robot Framework.
|
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
|
|
@@ -54,15 +54,16 @@ def normalize(string, remove=''):
|
|
54
54
|
|
55
55
|
class RobotFrameworkLexer(Lexer):
|
56
56
|
"""
|
57
|
-
For
|
57
|
+
For Robot Framework test data.
|
58
58
|
|
59
59
|
Supports both space and pipe separated plain text formats.
|
60
60
|
|
61
61
|
.. versionadded:: 1.6
|
62
62
|
"""
|
63
63
|
name = 'RobotFramework'
|
64
|
+
url = 'http://robotframework.org'
|
64
65
|
aliases = ['robotframework']
|
65
|
-
filenames = ['*.robot']
|
66
|
+
filenames = ['*.robot', '*.resource']
|
66
67
|
mimetypes = ['text/x-robotframework']
|
67
68
|
|
68
69
|
def __init__(self, **options):
|
@@ -99,7 +100,7 @@ class VariableTokenizer:
|
|
99
100
|
yield var.identifier + '{', SYNTAX
|
100
101
|
yield from self.tokenize(var.base, VARIABLE)
|
101
102
|
yield '}', SYNTAX
|
102
|
-
if var.index:
|
103
|
+
if var.index is not None:
|
103
104
|
yield '[', SYNTAX
|
104
105
|
yield from self.tokenize(var.index, VARIABLE)
|
105
106
|
yield ']', SYNTAX
|
@@ -285,7 +286,7 @@ class KeywordCall(Tokenizer):
|
|
285
286
|
|
286
287
|
|
287
288
|
class GherkinTokenizer:
|
288
|
-
_gherkin_prefix = re.compile('^(Given|When|Then|And) ', re.IGNORECASE)
|
289
|
+
_gherkin_prefix = re.compile('^(Given|When|Then|And|But) ', re.IGNORECASE)
|
289
290
|
|
290
291
|
def tokenize(self, value, token):
|
291
292
|
match = self._gherkin_prefix.match(value)
|