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,49 +4,49 @@
|
|
4
4
|
|
5
5
|
Lexers for theorem-proving 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
|
-
import re
|
12
|
-
|
13
11
|
from pygments.lexer import RegexLexer, default, words
|
14
12
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
15
|
-
Number, Punctuation, Generic
|
13
|
+
Number, Punctuation, Generic, Whitespace
|
16
14
|
|
17
15
|
__all__ = ['CoqLexer', 'IsabelleLexer', 'LeanLexer']
|
18
16
|
|
19
17
|
|
20
18
|
class CoqLexer(RegexLexer):
|
21
19
|
"""
|
22
|
-
For the
|
20
|
+
For the Coq theorem prover.
|
23
21
|
|
24
22
|
.. versionadded:: 1.5
|
25
23
|
"""
|
26
24
|
|
27
25
|
name = 'Coq'
|
26
|
+
url = 'http://coq.inria.fr/'
|
28
27
|
aliases = ['coq']
|
29
28
|
filenames = ['*.v']
|
30
29
|
mimetypes = ['text/x-coq']
|
31
30
|
|
32
|
-
flags = re.
|
31
|
+
flags = 0 # no re.MULTILINE
|
33
32
|
|
34
33
|
keywords1 = (
|
35
34
|
# Vernacular commands
|
36
35
|
'Section', 'Module', 'End', 'Require', 'Import', 'Export', 'Variable',
|
37
|
-
'Variables', 'Parameter', 'Parameters', 'Axiom', 'Hypothesis',
|
36
|
+
'Variables', 'Parameter', 'Parameters', 'Axiom', 'Axioms', 'Hypothesis',
|
38
37
|
'Hypotheses', 'Notation', 'Local', 'Tactic', 'Reserved', 'Scope',
|
39
|
-
'Open', 'Close', 'Bind', 'Delimit', 'Definition', '
|
40
|
-
'Fixpoint', 'CoFixpoint', 'Morphism', 'Relation', 'Implicit',
|
41
|
-
'Arguments', '
|
38
|
+
'Open', 'Close', 'Bind', 'Delimit', 'Definition', 'Example', 'Let',
|
39
|
+
'Ltac', 'Fixpoint', 'CoFixpoint', 'Morphism', 'Relation', 'Implicit',
|
40
|
+
'Arguments', 'Types', 'Unset', 'Contextual', 'Strict', 'Prenex',
|
42
41
|
'Implicits', 'Inductive', 'CoInductive', 'Record', 'Structure',
|
43
|
-
'Canonical', 'Coercion', 'Theorem', 'Lemma', '
|
44
|
-
'
|
45
|
-
'
|
46
|
-
'
|
42
|
+
'Variant', 'Canonical', 'Coercion', 'Theorem', 'Lemma', 'Fact',
|
43
|
+
'Remark', 'Corollary', 'Proposition', 'Property', 'Goal',
|
44
|
+
'Proof', 'Restart', 'Save', 'Qed', 'Defined', 'Abort', 'Admitted',
|
45
|
+
'Hint', 'Resolve', 'Rewrite', 'View', 'Search', 'Compute', 'Eval',
|
47
46
|
'Show', 'Print', 'Printing', 'All', 'Graph', 'Projections', 'inside',
|
48
47
|
'outside', 'Check', 'Global', 'Instance', 'Class', 'Existing',
|
49
|
-
'Universe', 'Polymorphic', 'Monomorphic', 'Context'
|
48
|
+
'Universe', 'Polymorphic', 'Monomorphic', 'Context', 'Scheme', 'From',
|
49
|
+
'Undo', 'Fail', 'Function',
|
50
50
|
)
|
51
51
|
keywords2 = (
|
52
52
|
# Gallina
|
@@ -56,7 +56,7 @@ class CoqLexer(RegexLexer):
|
|
56
56
|
)
|
57
57
|
keywords3 = (
|
58
58
|
# Sorts
|
59
|
-
'Type', 'Prop', 'SProp',
|
59
|
+
'Type', 'Prop', 'SProp', 'Set',
|
60
60
|
)
|
61
61
|
keywords4 = (
|
62
62
|
# Tactics
|
@@ -74,9 +74,10 @@ class CoqLexer(RegexLexer):
|
|
74
74
|
)
|
75
75
|
keywords5 = (
|
76
76
|
# Terminators
|
77
|
-
'by', '
|
77
|
+
'by', 'now', 'done', 'exact', 'reflexivity',
|
78
|
+
'tauto', 'romega', 'omega', 'lia', 'nia', 'lra', 'nra', 'psatz',
|
78
79
|
'assumption', 'solve', 'contradiction', 'discriminate',
|
79
|
-
'congruence',
|
80
|
+
'congruence', 'admit'
|
80
81
|
)
|
81
82
|
keywords6 = (
|
82
83
|
# Control
|
@@ -107,6 +108,10 @@ class CoqLexer(RegexLexer):
|
|
107
108
|
(r'\s+', Text),
|
108
109
|
(r'false|true|\(\)|\[\]', Name.Builtin.Pseudo),
|
109
110
|
(r'\(\*', Comment, 'comment'),
|
111
|
+
(r'\b(?:[^\W\d][\w\']*\.)+[^\W\d][\w\']*\b', Name),
|
112
|
+
(r'\bEquations\b\??', Keyword.Namespace),
|
113
|
+
# Very weak heuristic to distinguish the Set vernacular from the Set sort
|
114
|
+
(r'\bSet(?=[ \t]+[A-Z][a-z][^\n]*?\.)', Keyword.Namespace),
|
110
115
|
(words(keywords1, prefix=r'\b', suffix=r'\b'), Keyword.Namespace),
|
111
116
|
(words(keywords2, prefix=r'\b', suffix=r'\b'), Keyword),
|
112
117
|
(words(keywords3, prefix=r'\b', suffix=r'\b'), Keyword.Type),
|
@@ -164,12 +169,13 @@ class CoqLexer(RegexLexer):
|
|
164
169
|
|
165
170
|
class IsabelleLexer(RegexLexer):
|
166
171
|
"""
|
167
|
-
For the
|
172
|
+
For the Isabelle proof assistant.
|
168
173
|
|
169
174
|
.. versionadded:: 2.0
|
170
175
|
"""
|
171
176
|
|
172
177
|
name = 'Isabelle'
|
178
|
+
url = 'https://isabelle.in.tum.de/'
|
173
179
|
aliases = ['isabelle']
|
174
180
|
filenames = ['*.thy']
|
175
181
|
mimetypes = ['text/x-isabelle']
|
@@ -302,9 +308,10 @@ class IsabelleLexer(RegexLexer):
|
|
302
308
|
|
303
309
|
tokens = {
|
304
310
|
'root': [
|
305
|
-
(r'\s+',
|
311
|
+
(r'\s+', Whitespace),
|
306
312
|
(r'\(\*', Comment, 'comment'),
|
307
|
-
(r'
|
313
|
+
(r'\\<open>', String.Symbol, 'cartouche'),
|
314
|
+
(r'\{\*|‹', String, 'cartouche'),
|
308
315
|
|
309
316
|
(words(operators), Operator),
|
310
317
|
(words(proof_operators), Operator.Word),
|
@@ -335,19 +342,17 @@ class IsabelleLexer(RegexLexer):
|
|
335
342
|
|
336
343
|
(words(keyword_proof_script, prefix=r'\b', suffix=r'\b'), Keyword.Pseudo),
|
337
344
|
|
338
|
-
(r'
|
345
|
+
(r'\\<(\w|\^)*>', Text.Symbol),
|
339
346
|
|
340
|
-
(r"[^\W\d][.\w']*", Name),
|
341
|
-
(r"\?[^\W\d][.\w']*", Name),
|
342
347
|
(r"'[^\W\d][.\w']*", Name.Type),
|
343
348
|
|
344
|
-
(r'\d[\d_]*', Name), # display numbers as name
|
345
349
|
(r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex),
|
346
350
|
(r'0[oO][0-7][0-7_]*', Number.Oct),
|
347
351
|
(r'0[bB][01][01_]*', Number.Bin),
|
348
352
|
|
349
353
|
(r'"', String, 'string'),
|
350
354
|
(r'`', String.Other, 'fact'),
|
355
|
+
(r'[^\s:|\[\]\-()=,+!?{}._][^\s:|\[\]\-()=,+!?{}]*', Name),
|
351
356
|
],
|
352
357
|
'comment': [
|
353
358
|
(r'[^(*)]+', Comment),
|
@@ -355,22 +360,25 @@ class IsabelleLexer(RegexLexer):
|
|
355
360
|
(r'\*\)', Comment, '#pop'),
|
356
361
|
(r'[(*)]', Comment),
|
357
362
|
],
|
358
|
-
'
|
359
|
-
(r'[
|
360
|
-
(r'
|
361
|
-
(r'
|
362
|
-
(r'
|
363
|
+
'cartouche': [
|
364
|
+
(r'[^{*}\\‹›]+', String),
|
365
|
+
(r'\\<open>', String.Symbol, '#push'),
|
366
|
+
(r'\{\*|‹', String, '#push'),
|
367
|
+
(r'\\<close>', String.Symbol, '#pop'),
|
368
|
+
(r'\*\}|›', String, '#pop'),
|
369
|
+
(r'\\<(\w|\^)*>', String.Symbol),
|
370
|
+
(r'[{*}\\]', String),
|
363
371
|
],
|
364
372
|
'string': [
|
365
373
|
(r'[^"\\]+', String),
|
366
|
-
(r'
|
374
|
+
(r'\\<(\w|\^)*>', String.Symbol),
|
367
375
|
(r'\\"', String),
|
368
376
|
(r'\\', String),
|
369
377
|
(r'"', String, '#pop'),
|
370
378
|
],
|
371
379
|
'fact': [
|
372
380
|
(r'[^`\\]+', String.Other),
|
373
|
-
(r'
|
381
|
+
(r'\\<(\w|\^)*>', String.Symbol),
|
374
382
|
(r'\\`', String.Other),
|
375
383
|
(r'\\', String.Other),
|
376
384
|
(r'`', String.Other, '#pop'),
|
@@ -380,18 +388,16 @@ class IsabelleLexer(RegexLexer):
|
|
380
388
|
|
381
389
|
class LeanLexer(RegexLexer):
|
382
390
|
"""
|
383
|
-
For the
|
384
|
-
theorem prover.
|
391
|
+
For the Lean theorem prover.
|
385
392
|
|
386
393
|
.. versionadded:: 2.0
|
387
394
|
"""
|
388
395
|
name = 'Lean'
|
396
|
+
url = 'https://github.com/leanprover/lean'
|
389
397
|
aliases = ['lean']
|
390
398
|
filenames = ['*.lean']
|
391
399
|
mimetypes = ['text/x-lean']
|
392
400
|
|
393
|
-
flags = re.MULTILINE | re.UNICODE
|
394
|
-
|
395
401
|
tokens = {
|
396
402
|
'root': [
|
397
403
|
(r'\s+', Text),
|
@@ -1,15 +1,13 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
"""
|
3
2
|
pygments.lexers.thingsdb
|
4
|
-
|
3
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
5
4
|
|
6
5
|
Lexers for the ThingsDB language.
|
7
6
|
|
8
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
9
8
|
:license: BSD, see LICENSE for details.
|
10
9
|
"""
|
11
10
|
|
12
|
-
import re
|
13
11
|
from pygments.lexer import RegexLexer, include, bygroups
|
14
12
|
from pygments.token import Comment, Keyword, Name, Number, String, Text, \
|
15
13
|
Operator, Punctuation, Whitespace
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.tlb
|
3
|
+
~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexers for TL-b.
|
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, include, words
|
12
|
+
from pygments.token import Operator, Name, \
|
13
|
+
Number, Whitespace, Punctuation, Comment
|
14
|
+
|
15
|
+
__all__ = ['TlbLexer']
|
16
|
+
|
17
|
+
|
18
|
+
class TlbLexer(RegexLexer):
|
19
|
+
"""
|
20
|
+
For TL-b source code.
|
21
|
+
"""
|
22
|
+
|
23
|
+
name = 'Tl-b'
|
24
|
+
aliases = ['tlb']
|
25
|
+
filenames = ['*.tlb']
|
26
|
+
|
27
|
+
tokens = {
|
28
|
+
'root': [
|
29
|
+
(r'\s+', Whitespace),
|
30
|
+
|
31
|
+
include('comments'),
|
32
|
+
|
33
|
+
(r'[0-9]+', Number),
|
34
|
+
(words((
|
35
|
+
'+', '-', '*', '=', '?', '~', '.',
|
36
|
+
'^', '==', '<', '>', '<=', '>=', '!='
|
37
|
+
)), Operator),
|
38
|
+
(words(('##', '#<', '#<=')), Name.Tag),
|
39
|
+
(r'#[0-9a-f]*_?', Name.Tag),
|
40
|
+
(r'\$[01]*_?', Name.Tag),
|
41
|
+
|
42
|
+
(r'[a-zA-Z_][0-9a-zA-Z_]*', Name),
|
43
|
+
|
44
|
+
(r'[;():\[\]{}]', Punctuation)
|
45
|
+
],
|
46
|
+
|
47
|
+
'comments': [
|
48
|
+
(r'//.*', Comment.Singleline),
|
49
|
+
(r'/\*', Comment.Multiline, 'comment'),
|
50
|
+
],
|
51
|
+
'comment': [
|
52
|
+
(r'[^/*]+', Comment.Multiline),
|
53
|
+
(r'/\*', Comment.Multiline, '#push'),
|
54
|
+
(r'\*/', Comment.Multiline, '#pop'),
|
55
|
+
(r'[*/]', Comment.Multiline),
|
56
|
+
],
|
57
|
+
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for Typographic Number Theory.
|
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
|
|
@@ -20,14 +20,13 @@ __all__ = ['TNTLexer']
|
|
20
20
|
class TNTLexer(Lexer):
|
21
21
|
"""
|
22
22
|
Lexer for Typographic Number Theory, as described in the book
|
23
|
-
Gödel, Escher, Bach, by Douglas R. Hofstadter
|
24
|
-
or as summarized here:
|
25
|
-
https://github.com/Kenny2github/language-tnt/blob/master/README.md#summary-of-tnt
|
23
|
+
Gödel, Escher, Bach, by Douglas R. Hofstadter
|
26
24
|
|
27
25
|
.. versionadded:: 2.7
|
28
26
|
"""
|
29
27
|
|
30
28
|
name = 'Typographic Number Theory'
|
29
|
+
url = 'https://github.com/Kenny2github/language-tnt'
|
31
30
|
aliases = ['tnt']
|
32
31
|
filenames = ['*.tnt']
|
33
32
|
|
@@ -4,12 +4,10 @@
|
|
4
4
|
|
5
5
|
Lexer for RiverBed's TrafficScript (RTS) 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
|
14
12
|
from pygments.token import String, Number, Name, Keyword, Operator, Text, Comment
|
15
13
|
|
@@ -18,7 +16,7 @@ __all__ = ['RtsLexer']
|
|
18
16
|
|
19
17
|
class RtsLexer(RegexLexer):
|
20
18
|
"""
|
21
|
-
For
|
19
|
+
For Riverbed Stingray Traffic Manager
|
22
20
|
|
23
21
|
.. versionadded:: 2.1
|
24
22
|
"""
|
@@ -13,7 +13,7 @@
|
|
13
13
|
`TypoScriptHtmlDataLexer`
|
14
14
|
Lexer that highlights markers, constants and registers within html tags.
|
15
15
|
|
16
|
-
:copyright: Copyright 2006-
|
16
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
17
17
|
:license: BSD, see LICENSE for details.
|
18
18
|
"""
|
19
19
|
|
@@ -100,12 +100,11 @@ class TypoScriptLexer(RegexLexer):
|
|
100
100
|
"""
|
101
101
|
Lexer for TypoScript code.
|
102
102
|
|
103
|
-
http://docs.typo3.org/typo3cms/TyposcriptReference/
|
104
|
-
|
105
103
|
.. versionadded:: 2.2
|
106
104
|
"""
|
107
105
|
|
108
106
|
name = 'TypoScript'
|
107
|
+
url = 'http://docs.typo3.org/typo3cms/TyposcriptReference/'
|
109
108
|
aliases = ['typoscript']
|
110
109
|
filenames = ['*.typoscript']
|
111
110
|
mimetypes = ['text/x-typoscript']
|
@@ -0,0 +1,267 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.ul4
|
3
|
+
~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexer for the UL4 templating language.
|
6
|
+
|
7
|
+
More information: https://python.livinglogic.de/UL4.html
|
8
|
+
|
9
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
10
|
+
:license: BSD, see LICENSE for details.
|
11
|
+
"""
|
12
|
+
|
13
|
+
import re
|
14
|
+
|
15
|
+
from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, words, include
|
16
|
+
from pygments.token import Comment, Text, Keyword, String, Number, Literal, \
|
17
|
+
Name, Other, Operator
|
18
|
+
from pygments.lexers.web import HtmlLexer, XmlLexer, CssLexer, JavascriptLexer
|
19
|
+
from pygments.lexers.python import PythonLexer
|
20
|
+
|
21
|
+
__all__ = ['UL4Lexer', 'HTMLUL4Lexer', 'XMLUL4Lexer', 'CSSUL4Lexer',
|
22
|
+
'JavascriptUL4Lexer', 'PythonUL4Lexer']
|
23
|
+
|
24
|
+
|
25
|
+
class UL4Lexer(RegexLexer):
|
26
|
+
"""
|
27
|
+
Generic lexer for UL4.
|
28
|
+
|
29
|
+
.. versionadded:: 2.12
|
30
|
+
"""
|
31
|
+
|
32
|
+
flags = re.MULTILINE | re.DOTALL
|
33
|
+
|
34
|
+
name = 'UL4'
|
35
|
+
aliases = ['ul4']
|
36
|
+
filenames = ['*.ul4']
|
37
|
+
|
38
|
+
tokens = {
|
39
|
+
"root": [
|
40
|
+
(
|
41
|
+
# Template header without name:
|
42
|
+
# ``<?ul4?>``
|
43
|
+
r"(<\?)(\s*)(ul4)(\s*)(\?>)",
|
44
|
+
bygroups(Comment.Preproc, Text.Whitespace, Keyword,
|
45
|
+
Text.Whitespace, Comment.Preproc),
|
46
|
+
),
|
47
|
+
(
|
48
|
+
# Template header with name (potentially followed by the signature):
|
49
|
+
# ``<?ul4 foo(bar=42)?>``
|
50
|
+
r"(<\?)(\s*)(ul4)(\s*)([a-zA-Z_][a-zA-Z_0-9]*)?",
|
51
|
+
bygroups(Comment.Preproc, Text.Whitespace, Keyword,
|
52
|
+
Text.Whitespace, Name.Function),
|
53
|
+
"ul4", # Switch to "expression" mode
|
54
|
+
),
|
55
|
+
(
|
56
|
+
# Comment:
|
57
|
+
# ``<?note foobar?>``
|
58
|
+
r"<\?\s*note\s.*?\?>",
|
59
|
+
Comment,
|
60
|
+
),
|
61
|
+
(
|
62
|
+
# Template documentation:
|
63
|
+
# ``<?doc foobar?>``
|
64
|
+
r"<\?\s*doc\s.*?\?>",
|
65
|
+
String.Doc,
|
66
|
+
),
|
67
|
+
(
|
68
|
+
# ``<?ignore?>`` tag for commenting out code:
|
69
|
+
# ``<?ignore?>...<?end ignore?>``
|
70
|
+
r"<\?\s*ignore\s*\?>",
|
71
|
+
Comment,
|
72
|
+
"ignore", # Switch to "ignore" mode
|
73
|
+
),
|
74
|
+
(
|
75
|
+
# ``<?def?>`` tag for defining local templates
|
76
|
+
# ``<?def foo(bar=42)?>...<?end def?>``
|
77
|
+
r"(<\?)(\s*)(def)(\s*)([a-zA-Z_][a-zA-Z_0-9]*)?",
|
78
|
+
bygroups(Comment.Preproc, Text.Whitespace, Keyword,
|
79
|
+
Text.Whitespace, Name.Function),
|
80
|
+
"ul4", # Switch to "expression" mode
|
81
|
+
),
|
82
|
+
(
|
83
|
+
# The rest of the supported tags
|
84
|
+
r"(<\?)(\s*)(printx|print|for|if|elif|else|while|code|renderblocks?|render)\b",
|
85
|
+
bygroups(Comment.Preproc, Text.Whitespace, Keyword),
|
86
|
+
"ul4", # Switch to "expression" mode
|
87
|
+
),
|
88
|
+
(
|
89
|
+
# ``<?end?>`` tag for ending ``<?def?>``, ``<?for?>``,
|
90
|
+
# ``<?if?>``, ``<?while?>``, ``<?renderblock?>`` and
|
91
|
+
# ``<?renderblocks?>`` blocks.
|
92
|
+
r"(<\?)(\s*)(end)\b",
|
93
|
+
bygroups(Comment.Preproc, Text.Whitespace, Keyword),
|
94
|
+
"end", # Switch to "end tag" mode
|
95
|
+
),
|
96
|
+
(
|
97
|
+
# ``<?whitespace?>`` tag for configuring whitespace handlng
|
98
|
+
r"(<\?)(\s*)(whitespace)\b",
|
99
|
+
bygroups(Comment.Preproc, Text.Whitespace, Keyword),
|
100
|
+
"whitespace", # Switch to "whitespace" mode
|
101
|
+
),
|
102
|
+
# Plain text
|
103
|
+
(r"[^<]+", Other),
|
104
|
+
(r"<", Other),
|
105
|
+
],
|
106
|
+
# Ignore mode ignores everything upto the matching ``<?end ignore?>`` tag
|
107
|
+
"ignore": [
|
108
|
+
# Nested ``<?ignore?>`` tag
|
109
|
+
(r"<\?\s*ignore\s*\?>", Comment, "#push"),
|
110
|
+
# ``<?end ignore?>`` tag
|
111
|
+
(r"<\?\s*end\s+ignore\s*\?>", Comment, "#pop"),
|
112
|
+
# Everything else
|
113
|
+
(r"[^<]+", Comment),
|
114
|
+
(r".", Comment),
|
115
|
+
],
|
116
|
+
# UL4 expressions
|
117
|
+
"ul4": [
|
118
|
+
# End the tag
|
119
|
+
(r"\?>", Comment.Preproc, "#pop"),
|
120
|
+
# Start triple quoted string constant
|
121
|
+
("'''", String, "string13"),
|
122
|
+
('"""', String, "string23"),
|
123
|
+
# Start single quoted string constant
|
124
|
+
("'", String, "string1"),
|
125
|
+
('"', String, "string2"),
|
126
|
+
# Floating point number
|
127
|
+
(r"\d+\.\d*([eE][+-]?\d+)?", Number.Float),
|
128
|
+
(r"\.\d+([eE][+-]?\d+)?", Number.Float),
|
129
|
+
(r"\d+[eE][+-]?\d+", Number.Float),
|
130
|
+
# Binary integer: ``0b101010``
|
131
|
+
(r"0[bB][01]+", Number.Bin),
|
132
|
+
# Octal integer: ``0o52``
|
133
|
+
(r"0[oO][0-7]+", Number.Oct),
|
134
|
+
# Hexadecimal integer: ``0x2a``
|
135
|
+
(r"0[xX][0-9a-fA-F]+", Number.Hex),
|
136
|
+
# Date or datetime: ``@(2000-02-29)``/``@(2000-02-29T12:34:56.987654)``
|
137
|
+
(r"@\(\d\d\d\d-\d\d-\d\d(T(\d\d:\d\d(:\d\d(\.\d{6})?)?)?)?\)", Literal.Date),
|
138
|
+
# Color: ``#fff``, ``#fff8f0`` etc.
|
139
|
+
(r"#[0-9a-fA-F]{8}", Literal.Color),
|
140
|
+
(r"#[0-9a-fA-F]{6}", Literal.Color),
|
141
|
+
(r"#[0-9a-fA-F]{3,4}", Literal.Color),
|
142
|
+
# Decimal integer: ``42``
|
143
|
+
(r"\d+", Number.Integer),
|
144
|
+
# Operators
|
145
|
+
(r"//|==|!=|>=|<=|<<|>>|\+=|-=|\*=|/=|//=|<<=|>>=|&=|\|=|^=|=|[\[\]{},:*/().~%&|<>^+-]", Operator),
|
146
|
+
# Keywords
|
147
|
+
(words(("for", "in", "if", "else", "not", "is", "and", "or"), suffix=r"\b"), Keyword),
|
148
|
+
# Builtin constants
|
149
|
+
(words(("None", "False", "True"), suffix=r"\b"), Keyword.Constant),
|
150
|
+
# Variable names
|
151
|
+
(r"[a-zA-Z_][a-zA-Z0-9_]*", Name),
|
152
|
+
# Whitespace
|
153
|
+
(r"\s+", Text.Whitespace),
|
154
|
+
],
|
155
|
+
# ``<?end ...?>`` tag for closing the last open block
|
156
|
+
"end": [
|
157
|
+
(r"\?>", Comment.Preproc, "#pop"),
|
158
|
+
(words(("for", "if", "def", "while", "renderblock", "renderblocks"), suffix=r"\b"), Keyword),
|
159
|
+
(r"\s+", Text),
|
160
|
+
],
|
161
|
+
# Content of the ``<?whitespace ...?>`` tag:
|
162
|
+
# ``keep``, ``strip`` or ``smart``
|
163
|
+
"whitespace": [
|
164
|
+
(r"\?>", Comment.Preproc, "#pop"),
|
165
|
+
(words(("keep", "strip", "smart"), suffix=r"\b"), Comment.Preproc),
|
166
|
+
(r"\s+", Text.Whitespace),
|
167
|
+
],
|
168
|
+
# Inside a string constant
|
169
|
+
"stringescapes": [
|
170
|
+
(r"""\\[\\'"abtnfr]""", String.Escape),
|
171
|
+
(r"\\x[0-9a-fA-F]{2}", String.Escape),
|
172
|
+
(r"\\u[0-9a-fA-F]{4}", String.Escape),
|
173
|
+
(r"\\U[0-9a-fA-F]{8}", String.Escape),
|
174
|
+
],
|
175
|
+
# Inside a triple quoted string started with ``'''``
|
176
|
+
"string13": [
|
177
|
+
(r"'''", String, "#pop"),
|
178
|
+
include("stringescapes"),
|
179
|
+
(r"[^\\']+", String),
|
180
|
+
(r'.', String),
|
181
|
+
],
|
182
|
+
# Inside a triple quoted string started with ``"""``
|
183
|
+
"string23": [
|
184
|
+
(r'"""', String, "#pop"),
|
185
|
+
include("stringescapes"),
|
186
|
+
(r'[^\\"]+', String),
|
187
|
+
(r'.', String),
|
188
|
+
],
|
189
|
+
# Inside a single quoted string started with ``'``
|
190
|
+
"string1": [
|
191
|
+
(r"'", String, "#pop"),
|
192
|
+
include("stringescapes"),
|
193
|
+
(r"[^\\']+", String),
|
194
|
+
(r'.', String),
|
195
|
+
],
|
196
|
+
# Inside a single quoted string started with ``"``
|
197
|
+
"string2": [
|
198
|
+
(r'"', String, "#pop"),
|
199
|
+
include("stringescapes"),
|
200
|
+
(r'[^\\"]+', String),
|
201
|
+
(r'.', String),
|
202
|
+
],
|
203
|
+
}
|
204
|
+
|
205
|
+
class HTMLUL4Lexer(DelegatingLexer):
|
206
|
+
"""
|
207
|
+
Lexer for UL4 embedded in HTML.
|
208
|
+
"""
|
209
|
+
|
210
|
+
name = 'HTML+UL4'
|
211
|
+
aliases = ['html+ul4']
|
212
|
+
filenames = ['*.htmlul4']
|
213
|
+
|
214
|
+
def __init__(self, **options):
|
215
|
+
super().__init__(HtmlLexer, UL4Lexer, **options)
|
216
|
+
|
217
|
+
|
218
|
+
class XMLUL4Lexer(DelegatingLexer):
|
219
|
+
"""
|
220
|
+
Lexer for UL4 embedded in XML.
|
221
|
+
"""
|
222
|
+
|
223
|
+
name = 'XML+UL4'
|
224
|
+
aliases = ['xml+ul4']
|
225
|
+
filenames = ['*.xmlul4']
|
226
|
+
|
227
|
+
def __init__(self, **options):
|
228
|
+
super().__init__(XmlLexer, UL4Lexer, **options)
|
229
|
+
|
230
|
+
|
231
|
+
class CSSUL4Lexer(DelegatingLexer):
|
232
|
+
"""
|
233
|
+
Lexer for UL4 embedded in CSS.
|
234
|
+
"""
|
235
|
+
|
236
|
+
name = 'CSS+UL4'
|
237
|
+
aliases = ['css+ul4']
|
238
|
+
filenames = ['*.cssul4']
|
239
|
+
|
240
|
+
def __init__(self, **options):
|
241
|
+
super().__init__(CssLexer, UL4Lexer, **options)
|
242
|
+
|
243
|
+
|
244
|
+
class JavascriptUL4Lexer(DelegatingLexer):
|
245
|
+
"""
|
246
|
+
Lexer for UL4 embedded in Javascript.
|
247
|
+
"""
|
248
|
+
|
249
|
+
name = 'Javascript+UL4'
|
250
|
+
aliases = ['js+ul4']
|
251
|
+
filenames = ['*.jsul4']
|
252
|
+
|
253
|
+
def __init__(self, **options):
|
254
|
+
super().__init__(JavascriptLexer, UL4Lexer, **options)
|
255
|
+
|
256
|
+
|
257
|
+
class PythonUL4Lexer(DelegatingLexer):
|
258
|
+
"""
|
259
|
+
Lexer for UL4 embedded in Python.
|
260
|
+
"""
|
261
|
+
|
262
|
+
name = 'Python+UL4'
|
263
|
+
aliases = ['py+ul4']
|
264
|
+
filenames = ['*.pyul4']
|
265
|
+
|
266
|
+
def __init__(self, **options):
|
267
|
+
super().__init__(PythonLexer, UL4Lexer, **options)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for UrbiScript 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
|
|
@@ -51,7 +51,7 @@ class UrbiscriptLexer(ExtendedRegexLexer):
|
|
51
51
|
ctx.pos += len(result)
|
52
52
|
return
|
53
53
|
|
54
|
-
# if blob is well
|
54
|
+
# if blob is well formatted, yield as Escape
|
55
55
|
blob_text = blob_start + ctx.text[match.end():match.end()+blob_size] + ")"
|
56
56
|
yield match.start(), String.Escape, blob_text
|
57
57
|
ctx.pos = match.end() + blob_size + 1 # +1 is the ending ")"
|
@@ -78,9 +78,9 @@ class UrbiscriptLexer(ExtendedRegexLexer):
|
|
78
78
|
'struct', 'template', 'typedef', 'typeid', 'typename', 'union',
|
79
79
|
'unsigned', 'using', 'virtual', 'volatile', 'wchar_t'), suffix=r'\b'),
|
80
80
|
Keyword.Reserved),
|
81
|
-
# deprecated keywords, use a
|
81
|
+
# deprecated keywords, use a meaningful token when available
|
82
82
|
(r'(emit|foreach|internal|loopn|static)\b', Keyword),
|
83
|
-
# ignored keywords, use a
|
83
|
+
# ignored keywords, use a meaningful token when available
|
84
84
|
(r'(private|protected|public)\b', Keyword),
|
85
85
|
(r'(var|do|const|function|class)\b', Keyword.Declaration),
|
86
86
|
(r'(true|false|nil|void)\b', Keyword.Constant),
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
The module that parses Pixar's Universal Scene Description file format.
|
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
|
|
@@ -35,6 +35,7 @@ class UsdLexer(RegexLexer):
|
|
35
35
|
"""
|
36
36
|
|
37
37
|
name = "USD"
|
38
|
+
url = 'https://graphics.pixar.com/usd/release/index.html'
|
38
39
|
aliases = ["usd", "usda"]
|
39
40
|
filenames = ["*.usd", "*.usda"]
|
40
41
|
|