pygments.rb 2.4.0 → 3.0.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 +8 -8
- data/.github/workflows/release.yml +5 -5
- data/.gitignore +2 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.adoc +12 -0
- data/README.adoc +2 -2
- data/lib/pygments/popen.rb +2 -2
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +3 -3
- data/vendor/pygments-main/bin/pygmentize +1 -1
- data/vendor/pygments-main/pygments/__init__.py +2 -2
- data/vendor/pygments-main/pygments/__main__.py +1 -1
- data/vendor/pygments-main/pygments/cmdline.py +12 -12
- data/vendor/pygments-main/pygments/console.py +5 -5
- data/vendor/pygments-main/pygments/filter.py +2 -3
- data/vendor/pygments-main/pygments/filters/__init__.py +4 -4
- data/vendor/pygments-main/pygments/formatter.py +6 -1
- data/vendor/pygments-main/pygments/formatters/__init__.py +7 -8
- data/vendor/pygments-main/pygments/formatters/_mapping.py +0 -0
- data/vendor/pygments-main/pygments/formatters/bbcode.py +2 -2
- data/vendor/pygments-main/pygments/formatters/groff.py +3 -3
- data/vendor/pygments-main/pygments/formatters/html.py +38 -40
- data/vendor/pygments-main/pygments/formatters/img.py +51 -11
- data/vendor/pygments-main/pygments/formatters/irc.py +1 -1
- data/vendor/pygments-main/pygments/formatters/latex.py +24 -27
- data/vendor/pygments-main/pygments/formatters/other.py +3 -4
- data/vendor/pygments-main/pygments/formatters/pangomarkup.py +2 -2
- data/vendor/pygments-main/pygments/formatters/rtf.py +228 -25
- data/vendor/pygments-main/pygments/formatters/svg.py +17 -20
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
- data/vendor/pygments-main/pygments/lexer.py +51 -33
- data/vendor/pygments-main/pygments/lexers/__init__.py +12 -12
- data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +1 -1
- 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 +1 -1
- data/vendor/pygments-main/pygments/lexers/_css_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +5 -5
- data/vendor/pygments-main/pygments/lexers/_luau_builtins.py +62 -0
- data/vendor/pygments-main/pygments/lexers/_mapping.py +41 -11
- data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_php_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +5 -5
- data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +4 -4
- data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +1 -1
- 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 +6 -8
- data/vendor/pygments-main/pygments/lexers/ada.py +3 -3
- data/vendor/pygments-main/pygments/lexers/agile.py +3 -1
- data/vendor/pygments-main/pygments/lexers/algebra.py +9 -13
- data/vendor/pygments-main/pygments/lexers/ambient.py +2 -3
- data/vendor/pygments-main/pygments/lexers/amdgpu.py +3 -3
- data/vendor/pygments-main/pygments/lexers/ampl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/apdlexer.py +4 -3
- data/vendor/pygments-main/pygments/lexers/apl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/archetype.py +8 -12
- data/vendor/pygments-main/pygments/lexers/arrow.py +2 -3
- data/vendor/pygments-main/pygments/lexers/arturo.py +2 -3
- data/vendor/pygments-main/pygments/lexers/asc.py +4 -4
- data/vendor/pygments-main/pygments/lexers/asm.py +28 -15
- data/vendor/pygments-main/pygments/lexers/asn1.py +178 -0
- data/vendor/pygments-main/pygments/lexers/automation.py +6 -8
- data/vendor/pygments-main/pygments/lexers/bare.py +2 -3
- data/vendor/pygments-main/pygments/lexers/basic.py +48 -57
- data/vendor/pygments-main/pygments/lexers/bdd.py +3 -4
- data/vendor/pygments-main/pygments/lexers/berry.py +4 -4
- data/vendor/pygments-main/pygments/lexers/bibtex.py +5 -5
- data/vendor/pygments-main/pygments/lexers/blueprint.py +173 -0
- data/vendor/pygments-main/pygments/lexers/boa.py +4 -4
- data/vendor/pygments-main/pygments/lexers/bqn.py +109 -0
- data/vendor/pygments-main/pygments/lexers/business.py +21 -22
- data/vendor/pygments-main/pygments/lexers/c_cpp.py +9 -4
- data/vendor/pygments-main/pygments/lexers/c_like.py +99 -27
- data/vendor/pygments-main/pygments/lexers/capnproto.py +2 -3
- data/vendor/pygments-main/pygments/lexers/carbon.py +10 -11
- data/vendor/pygments-main/pygments/lexers/cddl.py +8 -9
- data/vendor/pygments-main/pygments/lexers/chapel.py +2 -3
- data/vendor/pygments-main/pygments/lexers/clean.py +2 -1
- data/vendor/pygments-main/pygments/lexers/comal.py +2 -1
- data/vendor/pygments-main/pygments/lexers/compiled.py +2 -1
- data/vendor/pygments-main/pygments/lexers/configs.py +342 -108
- data/vendor/pygments-main/pygments/lexers/console.py +5 -5
- data/vendor/pygments-main/pygments/lexers/cplint.py +2 -3
- data/vendor/pygments-main/pygments/lexers/crystal.py +4 -5
- data/vendor/pygments-main/pygments/lexers/csound.py +6 -8
- data/vendor/pygments-main/pygments/lexers/css.py +5 -5
- data/vendor/pygments-main/pygments/lexers/d.py +4 -3
- data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -3
- data/vendor/pygments-main/pygments/lexers/data.py +8 -12
- data/vendor/pygments-main/pygments/lexers/dax.py +2 -3
- data/vendor/pygments-main/pygments/lexers/devicetree.py +2 -3
- data/vendor/pygments-main/pygments/lexers/diff.py +7 -6
- data/vendor/pygments-main/pygments/lexers/dns.py +109 -0
- data/vendor/pygments-main/pygments/lexers/dotnet.py +19 -14
- data/vendor/pygments-main/pygments/lexers/dsls.py +24 -35
- data/vendor/pygments-main/pygments/lexers/dylan.py +8 -16
- data/vendor/pygments-main/pygments/lexers/ecl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/eiffel.py +3 -4
- data/vendor/pygments-main/pygments/lexers/elm.py +3 -4
- data/vendor/pygments-main/pygments/lexers/elpi.py +28 -21
- data/vendor/pygments-main/pygments/lexers/email.py +3 -3
- data/vendor/pygments-main/pygments/lexers/erlang.py +22 -24
- data/vendor/pygments-main/pygments/lexers/esoteric.py +11 -12
- data/vendor/pygments-main/pygments/lexers/ezhil.py +2 -3
- data/vendor/pygments-main/pygments/lexers/factor.py +2 -3
- data/vendor/pygments-main/pygments/lexers/fantom.py +3 -3
- data/vendor/pygments-main/pygments/lexers/felix.py +9 -10
- data/vendor/pygments-main/pygments/lexers/fift.py +2 -1
- data/vendor/pygments-main/pygments/lexers/floscript.py +2 -3
- data/vendor/pygments-main/pygments/lexers/forth.py +2 -3
- data/vendor/pygments-main/pygments/lexers/fortran.py +6 -7
- data/vendor/pygments-main/pygments/lexers/foxpro.py +3 -3
- data/vendor/pygments-main/pygments/lexers/freefem.py +2 -3
- data/vendor/pygments-main/pygments/lexers/func.py +3 -1
- data/vendor/pygments-main/pygments/lexers/functional.py +2 -1
- data/vendor/pygments-main/pygments/lexers/futhark.py +6 -7
- data/vendor/pygments-main/pygments/lexers/gcodelexer.py +3 -3
- data/vendor/pygments-main/pygments/lexers/gdscript.py +2 -1
- data/vendor/pygments-main/pygments/lexers/go.py +3 -4
- data/vendor/pygments-main/pygments/lexers/grammar_notation.py +6 -9
- data/vendor/pygments-main/pygments/lexers/graph.py +12 -9
- data/vendor/pygments-main/pygments/lexers/graphics.py +13 -17
- data/vendor/pygments-main/pygments/lexers/graphql.py +176 -0
- data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -3
- data/vendor/pygments-main/pygments/lexers/gsql.py +2 -3
- data/vendor/pygments-main/pygments/lexers/haskell.py +27 -32
- data/vendor/pygments-main/pygments/lexers/haxe.py +3 -5
- data/vendor/pygments-main/pygments/lexers/hdl.py +8 -7
- data/vendor/pygments-main/pygments/lexers/hexdump.py +3 -3
- data/vendor/pygments-main/pygments/lexers/html.py +34 -13
- data/vendor/pygments-main/pygments/lexers/idl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/igor.py +305 -290
- data/vendor/pygments-main/pygments/lexers/inferno.py +2 -3
- data/vendor/pygments-main/pygments/lexers/installers.py +7 -9
- data/vendor/pygments-main/pygments/lexers/int_fiction.py +150 -162
- data/vendor/pygments-main/pygments/lexers/iolang.py +2 -3
- data/vendor/pygments-main/pygments/lexers/j.py +2 -3
- data/vendor/pygments-main/pygments/lexers/javascript.py +18 -19
- data/vendor/pygments-main/pygments/lexers/jmespath.py +2 -1
- data/vendor/pygments-main/pygments/lexers/jslt.py +2 -3
- data/vendor/pygments-main/pygments/lexers/jsonnet.py +4 -3
- data/vendor/pygments-main/pygments/lexers/jsx.py +75 -0
- data/vendor/pygments-main/pygments/lexers/julia.py +4 -5
- data/vendor/pygments-main/pygments/lexers/jvm.py +98 -116
- data/vendor/pygments-main/pygments/lexers/kuin.py +2 -3
- data/vendor/pygments-main/pygments/lexers/kusto.py +93 -0
- data/vendor/pygments-main/pygments/lexers/ldap.py +155 -0
- data/vendor/pygments-main/pygments/lexers/lean.py +241 -0
- data/vendor/pygments-main/pygments/lexers/lilypond.py +2 -3
- data/vendor/pygments-main/pygments/lexers/lisp.py +373 -65
- data/vendor/pygments-main/pygments/lexers/macaulay2.py +53 -4
- data/vendor/pygments-main/pygments/lexers/make.py +7 -5
- data/vendor/pygments-main/pygments/lexers/markup.py +242 -91
- data/vendor/pygments-main/pygments/lexers/math.py +2 -1
- data/vendor/pygments-main/pygments/lexers/matlab.py +10 -12
- data/vendor/pygments-main/pygments/lexers/maxima.py +2 -3
- data/vendor/pygments-main/pygments/lexers/meson.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mime.py +4 -4
- data/vendor/pygments-main/pygments/lexers/minecraft.py +24 -27
- data/vendor/pygments-main/pygments/lexers/mips.py +3 -1
- data/vendor/pygments-main/pygments/lexers/ml.py +59 -61
- data/vendor/pygments-main/pygments/lexers/modeling.py +19 -22
- data/vendor/pygments-main/pygments/lexers/modula2.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mojo.py +704 -0
- data/vendor/pygments-main/pygments/lexers/monte.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mosel.py +3 -3
- data/vendor/pygments-main/pygments/lexers/ncl.py +4 -3
- data/vendor/pygments-main/pygments/lexers/nimrod.py +7 -8
- data/vendor/pygments-main/pygments/lexers/nit.py +2 -3
- data/vendor/pygments-main/pygments/lexers/nix.py +40 -31
- data/vendor/pygments-main/pygments/lexers/oberon.py +3 -3
- data/vendor/pygments-main/pygments/lexers/objective.py +14 -6
- data/vendor/pygments-main/pygments/lexers/ooc.py +2 -3
- data/vendor/pygments-main/pygments/lexers/openscad.py +96 -0
- data/vendor/pygments-main/pygments/lexers/other.py +2 -1
- data/vendor/pygments-main/pygments/lexers/parasail.py +2 -3
- data/vendor/pygments-main/pygments/lexers/parsers.py +41 -44
- data/vendor/pygments-main/pygments/lexers/pascal.py +6 -3
- data/vendor/pygments-main/pygments/lexers/pawn.py +5 -5
- data/vendor/pygments-main/pygments/lexers/perl.py +3 -3
- data/vendor/pygments-main/pygments/lexers/phix.py +2 -3
- data/vendor/pygments-main/pygments/lexers/php.py +4 -5
- data/vendor/pygments-main/pygments/lexers/pointless.py +2 -3
- data/vendor/pygments-main/pygments/lexers/pony.py +3 -3
- data/vendor/pygments-main/pygments/lexers/praat.py +2 -3
- data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
- data/vendor/pygments-main/pygments/lexers/prolog.py +23 -9
- data/vendor/pygments-main/pygments/lexers/promql.py +2 -1
- data/vendor/pygments-main/pygments/lexers/prql.py +251 -0
- data/vendor/pygments-main/pygments/lexers/ptx.py +119 -0
- data/vendor/pygments-main/pygments/lexers/python.py +24 -24
- data/vendor/pygments-main/pygments/lexers/q.py +5 -6
- data/vendor/pygments-main/pygments/lexers/qlik.py +3 -3
- data/vendor/pygments-main/pygments/lexers/qvt.py +5 -3
- data/vendor/pygments-main/pygments/lexers/r.py +8 -6
- data/vendor/pygments-main/pygments/lexers/rdf.py +19 -13
- data/vendor/pygments-main/pygments/lexers/rebol.py +7 -7
- data/vendor/pygments-main/pygments/lexers/resource.py +5 -6
- data/vendor/pygments-main/pygments/lexers/ride.py +4 -5
- data/vendor/pygments-main/pygments/lexers/rita.py +2 -3
- data/vendor/pygments-main/pygments/lexers/rnc.py +2 -3
- data/vendor/pygments-main/pygments/lexers/roboconf.py +5 -5
- data/vendor/pygments-main/pygments/lexers/robotframework.py +2 -3
- data/vendor/pygments-main/pygments/lexers/ruby.py +8 -13
- data/vendor/pygments-main/pygments/lexers/rust.py +9 -10
- data/vendor/pygments-main/pygments/lexers/sas.py +3 -3
- data/vendor/pygments-main/pygments/lexers/savi.py +131 -130
- data/vendor/pygments-main/pygments/lexers/scdoc.py +13 -7
- data/vendor/pygments-main/pygments/lexers/scripting.py +354 -42
- data/vendor/pygments-main/pygments/lexers/sgf.py +2 -3
- data/vendor/pygments-main/pygments/lexers/shell.py +107 -129
- data/vendor/pygments-main/pygments/lexers/sieve.py +3 -3
- data/vendor/pygments-main/pygments/lexers/slash.py +4 -5
- data/vendor/pygments-main/pygments/lexers/smalltalk.py +3 -5
- data/vendor/pygments-main/pygments/lexers/smithy.py +2 -3
- data/vendor/pygments-main/pygments/lexers/smv.py +3 -3
- data/vendor/pygments-main/pygments/lexers/snobol.py +3 -3
- data/vendor/pygments-main/pygments/lexers/solidity.py +3 -3
- data/vendor/pygments-main/pygments/lexers/soong.py +78 -0
- data/vendor/pygments-main/pygments/lexers/sophia.py +3 -4
- data/vendor/pygments-main/pygments/lexers/special.py +8 -3
- data/vendor/pygments-main/pygments/lexers/spice.py +15 -16
- data/vendor/pygments-main/pygments/lexers/sql.py +24 -18
- data/vendor/pygments-main/pygments/lexers/srcinfo.py +3 -3
- data/vendor/pygments-main/pygments/lexers/stata.py +2 -3
- data/vendor/pygments-main/pygments/lexers/supercollider.py +2 -3
- data/vendor/pygments-main/pygments/lexers/tact.py +303 -0
- data/vendor/pygments-main/pygments/lexers/tal.py +13 -10
- data/vendor/pygments-main/pygments/lexers/tcl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/teal.py +2 -3
- data/vendor/pygments-main/pygments/lexers/templates.py +131 -72
- data/vendor/pygments-main/pygments/lexers/teraterm.py +2 -3
- data/vendor/pygments-main/pygments/lexers/testing.py +4 -5
- data/vendor/pygments-main/pygments/lexers/text.py +2 -1
- data/vendor/pygments-main/pygments/lexers/textedit.py +9 -6
- data/vendor/pygments-main/pygments/lexers/textfmts.py +20 -15
- data/vendor/pygments-main/pygments/lexers/theorem.py +41 -115
- data/vendor/pygments-main/pygments/lexers/thingsdb.py +50 -26
- data/vendor/pygments-main/pygments/lexers/tlb.py +3 -1
- data/vendor/pygments-main/pygments/lexers/tls.py +54 -0
- data/vendor/pygments-main/pygments/lexers/tnt.py +2 -3
- data/vendor/pygments-main/pygments/lexers/trafficscript.py +3 -3
- data/vendor/pygments-main/pygments/lexers/typoscript.py +6 -7
- data/vendor/pygments-main/pygments/lexers/typst.py +104 -0
- data/vendor/pygments-main/pygments/lexers/ul4.py +47 -5
- data/vendor/pygments-main/pygments/lexers/unicon.py +9 -7
- data/vendor/pygments-main/pygments/lexers/urbi.py +3 -3
- data/vendor/pygments-main/pygments/lexers/usd.py +6 -11
- data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
- data/vendor/pygments-main/pygments/lexers/verification.py +4 -5
- data/vendor/pygments-main/pygments/lexers/verifpal.py +65 -0
- data/vendor/pygments-main/pygments/lexers/vip.py +150 -0
- data/vendor/pygments-main/pygments/lexers/vyper.py +140 -0
- data/vendor/pygments-main/pygments/lexers/web.py +2 -1
- data/vendor/pygments-main/pygments/lexers/webassembly.py +2 -3
- data/vendor/pygments-main/pygments/lexers/webidl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/webmisc.py +11 -15
- data/vendor/pygments-main/pygments/lexers/wgsl.py +6 -7
- data/vendor/pygments-main/pygments/lexers/whiley.py +2 -3
- data/vendor/pygments-main/pygments/lexers/wowtoc.py +3 -3
- data/vendor/pygments-main/pygments/lexers/wren.py +3 -4
- data/vendor/pygments-main/pygments/lexers/x10.py +6 -7
- data/vendor/pygments-main/pygments/lexers/xorg.py +2 -1
- data/vendor/pygments-main/pygments/lexers/yang.py +2 -3
- data/vendor/pygments-main/pygments/lexers/yara.py +69 -0
- data/vendor/pygments-main/pygments/lexers/zig.py +2 -1
- data/vendor/pygments-main/pygments/modeline.py +4 -4
- data/vendor/pygments-main/pygments/plugin.py +3 -19
- data/vendor/pygments-main/pygments/regexopt.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +1 -1
- data/vendor/pygments-main/pygments/sphinxext.py +38 -8
- data/vendor/pygments-main/pygments/style.py +8 -2
- data/vendor/pygments-main/pygments/styles/__init__.py +17 -59
- data/vendor/pygments-main/pygments/styles/_mapping.py +54 -0
- data/vendor/pygments-main/pygments/styles/abap.py +5 -1
- data/vendor/pygments-main/pygments/styles/algol.py +5 -1
- data/vendor/pygments-main/pygments/styles/algol_nu.py +5 -1
- data/vendor/pygments-main/pygments/styles/arduino.py +76 -72
- data/vendor/pygments-main/pygments/styles/autumn.py +6 -1
- data/vendor/pygments-main/pygments/styles/borland.py +6 -1
- data/vendor/pygments-main/pygments/styles/bw.py +6 -1
- data/vendor/pygments-main/pygments/styles/coffee.py +80 -0
- data/vendor/pygments-main/pygments/styles/colorful.py +6 -1
- data/vendor/pygments-main/pygments/styles/default.py +6 -1
- data/vendor/pygments-main/pygments/styles/dracula.py +68 -80
- data/vendor/pygments-main/pygments/styles/emacs.py +6 -1
- data/vendor/pygments-main/pygments/styles/friendly.py +6 -1
- data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +6 -1
- data/vendor/pygments-main/pygments/styles/fruity.py +7 -1
- data/vendor/pygments-main/pygments/styles/gh_dark.py +7 -1
- data/vendor/pygments-main/pygments/styles/gruvbox.py +10 -1
- data/vendor/pygments-main/pygments/styles/igor.py +6 -1
- data/vendor/pygments-main/pygments/styles/inkpot.py +7 -2
- data/vendor/pygments-main/pygments/styles/lightbulb.py +110 -0
- data/vendor/pygments-main/pygments/styles/lilypond.py +8 -2
- data/vendor/pygments-main/pygments/styles/lovelace.py +16 -10
- data/vendor/pygments-main/pygments/styles/manni.py +7 -2
- data/vendor/pygments-main/pygments/styles/material.py +21 -14
- data/vendor/pygments-main/pygments/styles/monokai.py +16 -10
- data/vendor/pygments-main/pygments/styles/murphy.py +7 -2
- data/vendor/pygments-main/pygments/styles/native.py +10 -5
- data/vendor/pygments-main/pygments/styles/nord.py +9 -3
- data/vendor/pygments-main/pygments/styles/onedark.py +6 -2
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +7 -2
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +7 -2
- data/vendor/pygments-main/pygments/styles/pastie.py +7 -1
- data/vendor/pygments-main/pygments/styles/perldoc.py +7 -1
- data/vendor/pygments-main/pygments/styles/rainbow_dash.py +26 -19
- data/vendor/pygments-main/pygments/styles/rrt.py +8 -2
- data/vendor/pygments-main/pygments/styles/sas.py +6 -1
- data/vendor/pygments-main/pygments/styles/solarized.py +9 -1
- data/vendor/pygments-main/pygments/styles/staroffice.py +6 -1
- data/vendor/pygments-main/pygments/styles/stata_dark.py +6 -2
- data/vendor/pygments-main/pygments/styles/stata_light.py +6 -1
- data/vendor/pygments-main/pygments/styles/tango.py +7 -3
- data/vendor/pygments-main/pygments/styles/trac.py +7 -1
- data/vendor/pygments-main/pygments/styles/vim.py +7 -1
- data/vendor/pygments-main/pygments/styles/vs.py +7 -2
- data/vendor/pygments-main/pygments/styles/xcode.py +6 -1
- data/vendor/pygments-main/pygments/styles/zenburn.py +6 -1
- data/vendor/pygments-main/pygments/token.py +2 -1
- data/vendor/pygments-main/pygments/unistring.py +5 -5
- data/vendor/pygments-main/pygments/util.py +13 -19
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/METADATA +14 -13
- data/vendor/pygments-main/pygments-2.18.0.dist-info/RECORD +663 -0
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/WHEEL +1 -2
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/AUTHORS +13 -0
- metadata +41 -17
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +0 -614
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/top_level.txt +0 -1
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/INSTALLER +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/REQUESTED +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/entry_points.txt +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/LICENSE +0 -0
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for the Monte programming language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -78,13 +78,12 @@ _safeScope = [
|
|
78
78
|
class MonteLexer(RegexLexer):
|
79
79
|
"""
|
80
80
|
Lexer for the Monte programming language.
|
81
|
-
|
82
|
-
.. versionadded:: 2.2
|
83
81
|
"""
|
84
82
|
name = 'Monte'
|
85
83
|
url = 'https://monte.readthedocs.io/'
|
86
84
|
aliases = ['monte']
|
87
85
|
filenames = ['*.mt']
|
86
|
+
version_added = '2.2'
|
88
87
|
|
89
88
|
tokens = {
|
90
89
|
'root': [
|
@@ -5,7 +5,7 @@
|
|
5
5
|
Lexers for the mosel language.
|
6
6
|
http://www.fico.com/en/products/fico-xpress-optimization
|
7
7
|
|
8
|
-
:copyright: Copyright 2006-
|
8
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
9
9
|
:license: BSD, see LICENSE for details.
|
10
10
|
"""
|
11
11
|
|
@@ -391,12 +391,12 @@ FUNCTIONS = (
|
|
391
391
|
class MoselLexer(RegexLexer):
|
392
392
|
"""
|
393
393
|
For the Mosel optimization language.
|
394
|
-
|
395
|
-
.. versionadded:: 2.6
|
396
394
|
"""
|
397
395
|
name = 'Mosel'
|
398
396
|
aliases = ['mosel']
|
399
397
|
filenames = ['*.mos']
|
398
|
+
url = 'https://www.fico.com/fico-xpress-optimization/docs/latest/mosel/mosel_lang/dhtml/moselreflang.html'
|
399
|
+
version_added = '2.6'
|
400
400
|
|
401
401
|
tokens = {
|
402
402
|
'root': [
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for NCAR Command Language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -20,13 +20,14 @@ __all__ = ['NCLLexer']
|
|
20
20
|
class NCLLexer(RegexLexer):
|
21
21
|
"""
|
22
22
|
Lexer for NCL code.
|
23
|
-
|
24
|
-
.. versionadded:: 2.2
|
25
23
|
"""
|
26
24
|
name = 'NCL'
|
27
25
|
aliases = ['ncl']
|
28
26
|
filenames = ['*.ncl']
|
29
27
|
mimetypes = ['text/ncl']
|
28
|
+
url = 'https://www.ncl.ucar.edu'
|
29
|
+
version_added = '2.2'
|
30
|
+
|
30
31
|
flags = re.MULTILINE
|
31
32
|
|
32
33
|
tokens = {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for the Nim language (formerly known as Nimrod).
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -20,8 +20,6 @@ __all__ = ['NimrodLexer']
|
|
20
20
|
class NimrodLexer(RegexLexer):
|
21
21
|
"""
|
22
22
|
For Nim source code.
|
23
|
-
|
24
|
-
.. versionadded:: 1.5
|
25
23
|
"""
|
26
24
|
|
27
25
|
name = 'Nimrod'
|
@@ -29,6 +27,7 @@ class NimrodLexer(RegexLexer):
|
|
29
27
|
aliases = ['nimrod', 'nim']
|
30
28
|
filenames = ['*.nim', '*.nimrod']
|
31
29
|
mimetypes = ['text/x-nim']
|
30
|
+
version_added = '1.5'
|
32
31
|
|
33
32
|
flags = re.MULTILINE | re.IGNORECASE
|
34
33
|
|
@@ -97,15 +96,15 @@ class NimrodLexer(RegexLexer):
|
|
97
96
|
("'", String.Char, 'chars'),
|
98
97
|
|
99
98
|
# Keywords
|
100
|
-
(
|
99
|
+
(rf'({underscorize(opWords)})\b', Operator.Word),
|
101
100
|
(r'(proc|func|method|macro|template)(\s)(?![(\[\]])',
|
102
101
|
bygroups(Keyword, Text.Whitespace), 'funcname'),
|
103
|
-
(
|
104
|
-
(r'(
|
102
|
+
(rf'({underscorize(keywords)})\b', Keyword),
|
103
|
+
(r'({})\b'.format(underscorize(['from', 'import', 'include', 'export'])),
|
105
104
|
Keyword.Namespace),
|
106
105
|
(r'(v_?a_?r)\b', Keyword.Declaration),
|
107
|
-
(
|
108
|
-
(
|
106
|
+
(rf'({underscorize(types)})\b', Name.Builtin),
|
107
|
+
(rf'({underscorize(keywordsPseudo)})\b', Keyword.Pseudo),
|
109
108
|
|
110
109
|
# Identifiers
|
111
110
|
(r'\b((?![_\d])\w)(((?!_)\w)|(_(?!_)\w))*', Name),
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for the Nit language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -18,14 +18,13 @@ __all__ = ['NitLexer']
|
|
18
18
|
class NitLexer(RegexLexer):
|
19
19
|
"""
|
20
20
|
For nit source.
|
21
|
-
|
22
|
-
.. versionadded:: 2.0
|
23
21
|
"""
|
24
22
|
|
25
23
|
name = 'Nit'
|
26
24
|
url = 'http://nitlanguage.org'
|
27
25
|
aliases = ['nit']
|
28
26
|
filenames = ['*.nit']
|
27
|
+
version_added = '2.0'
|
29
28
|
tokens = {
|
30
29
|
'root': [
|
31
30
|
(r'#.*?$', Comment.Single),
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for the NixOS Nix language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -20,8 +20,6 @@ __all__ = ['NixLexer']
|
|
20
20
|
class NixLexer(RegexLexer):
|
21
21
|
"""
|
22
22
|
For the Nix language.
|
23
|
-
|
24
|
-
.. versionadded:: 2.0
|
25
23
|
"""
|
26
24
|
|
27
25
|
name = 'Nix'
|
@@ -29,13 +27,14 @@ class NixLexer(RegexLexer):
|
|
29
27
|
aliases = ['nixos', 'nix']
|
30
28
|
filenames = ['*.nix']
|
31
29
|
mimetypes = ['text/x-nix']
|
30
|
+
version_added = '2.0'
|
32
31
|
|
33
32
|
keywords = ['rec', 'with', 'let', 'in', 'inherit', 'assert', 'if',
|
34
33
|
'else', 'then', '...']
|
35
34
|
builtins = ['import', 'abort', 'baseNameOf', 'dirOf', 'isNull', 'builtins',
|
36
35
|
'map', 'removeAttrs', 'throw', 'toString', 'derivation']
|
37
|
-
operators = ['++', '+', '?', '.', '!', '//', '==',
|
38
|
-
'!=', '&&', '||', '->', '=']
|
36
|
+
operators = ['++', '+', '?', '.', '!', '//', '==', '/',
|
37
|
+
'!=', '&&', '||', '->', '=', '<', '>', '*', '-']
|
39
38
|
|
40
39
|
punctuations = ["(", ")", "[", "]", ";", "{", "}", ":", ",", "@"]
|
41
40
|
|
@@ -51,42 +50,49 @@ class NixLexer(RegexLexer):
|
|
51
50
|
(r'\s+', Text),
|
52
51
|
|
53
52
|
# keywords
|
54
|
-
('(
|
53
|
+
('({})'.format('|'.join(re.escape(entry) + '\\b' for entry in keywords)), Keyword),
|
55
54
|
|
56
55
|
# highlight the builtins
|
57
|
-
('(
|
56
|
+
('({})'.format('|'.join(re.escape(entry) + '\\b' for entry in builtins)),
|
58
57
|
Name.Builtin),
|
59
58
|
|
60
59
|
(r'\b(true|false|null)\b', Name.Constant),
|
61
60
|
|
61
|
+
# floats
|
62
|
+
(r'-?(\d+\.\d*|\.\d+)([eE][-+]?\d+)?', Number.Float),
|
63
|
+
|
64
|
+
# integers
|
65
|
+
(r'-?[0-9]+', Number.Integer),
|
66
|
+
|
67
|
+
# paths
|
68
|
+
(r'[\w.+-]*(\/[\w.+-]+)+', Literal),
|
69
|
+
(r'~(\/[\w.+-]+)+', Literal),
|
70
|
+
(r'\<[\w.+-]+(\/[\w.+-]+)*\>', Literal),
|
71
|
+
|
62
72
|
# operators
|
63
|
-
('(
|
73
|
+
('({})'.format('|'.join(re.escape(entry) for entry in operators)),
|
64
74
|
Operator),
|
65
75
|
|
66
76
|
# word operators
|
67
77
|
(r'\b(or|and)\b', Operator.Word),
|
68
78
|
|
69
|
-
|
70
|
-
('(%s)' % '|'.join(re.escape(entry) for entry in punctuations), Punctuation),
|
79
|
+
(r'\{', Punctuation, 'block'),
|
71
80
|
|
72
|
-
#
|
73
|
-
(
|
81
|
+
# punctuations
|
82
|
+
('({})'.format('|'.join(re.escape(entry) for entry in punctuations)), Punctuation),
|
74
83
|
|
75
84
|
# strings
|
76
85
|
(r'"', String.Double, 'doublequote'),
|
77
|
-
(r"''", String.
|
78
|
-
|
79
|
-
# paths
|
80
|
-
(r'[\w.+-]*(\/[\w.+-]+)+', Literal),
|
81
|
-
(r'\<[\w.+-]+(\/[\w.+-]+)*\>', Literal),
|
86
|
+
(r"''", String.Multiline, 'multiline'),
|
82
87
|
|
83
88
|
# urls
|
84
89
|
(r'[a-zA-Z][a-zA-Z0-9\+\-\.]*\:[\w%/?:@&=+$,\\.!~*\'-]+', Literal),
|
85
90
|
|
86
91
|
# names of variables
|
87
|
-
(r'[\w-]
|
92
|
+
(r'[\w-]+(?=\s*=)', String.Symbol),
|
88
93
|
(r'[a-zA-Z_][\w\'-]*', Text),
|
89
94
|
|
95
|
+
(r"\$\{", String.Interpol, 'antiquote'),
|
90
96
|
],
|
91
97
|
'comment': [
|
92
98
|
(r'[^/*]+', Comment.Multiline),
|
@@ -94,24 +100,23 @@ class NixLexer(RegexLexer):
|
|
94
100
|
(r'\*/', Comment.Multiline, '#pop'),
|
95
101
|
(r'[*/]', Comment.Multiline),
|
96
102
|
],
|
97
|
-
'
|
98
|
-
(r"'''", String.Escape),
|
99
|
-
(r"''
|
100
|
-
(r"''\n", String.Escape),
|
101
|
-
(r"''\r", String.Escape),
|
102
|
-
(r"''\t", String.Escape),
|
103
|
-
(r"''", String.Single, '#pop'),
|
103
|
+
'multiline': [
|
104
|
+
(r"''(\$|'|\\n|\\r|\\t|\\)", String.Escape),
|
105
|
+
(r"''", String.Multiline, '#pop'),
|
104
106
|
(r'\$\{', String.Interpol, 'antiquote'),
|
105
|
-
(r"['
|
106
|
-
(r"[
|
107
|
+
(r"[^'\$]+", String.Multiline),
|
108
|
+
(r"\$[^\{']", String.Multiline),
|
109
|
+
(r"'[^']", String.Multiline),
|
110
|
+
(r"\$(?=')", String.Multiline),
|
107
111
|
],
|
108
112
|
'doublequote': [
|
109
|
-
(r'\\', String.Escape),
|
110
|
-
(r'\\"', String.Escape),
|
111
|
-
(r'\\$\{', String.Escape),
|
113
|
+
(r'\\(\\|"|\$|n)', String.Escape),
|
112
114
|
(r'"', String.Double, '#pop'),
|
113
115
|
(r'\$\{', String.Interpol, 'antiquote'),
|
114
|
-
(r'[^"]', String.Double),
|
116
|
+
(r'[^"\\\$]+', String.Double),
|
117
|
+
(r'\$[^\{"]', String.Double),
|
118
|
+
(r'\$(?=")', String.Double),
|
119
|
+
(r'\\', String.Double),
|
115
120
|
],
|
116
121
|
'antiquote': [
|
117
122
|
(r"\}", String.Interpol, '#pop'),
|
@@ -119,6 +124,10 @@ class NixLexer(RegexLexer):
|
|
119
124
|
(r"\$\{", String.Interpol, '#push'),
|
120
125
|
include('root'),
|
121
126
|
],
|
127
|
+
'block': [
|
128
|
+
(r"\}", Punctuation, '#pop'),
|
129
|
+
include('root'),
|
130
|
+
],
|
122
131
|
}
|
123
132
|
|
124
133
|
def analyse_text(text):
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for Oberon family languages.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -20,13 +20,13 @@ __all__ = ['ComponentPascalLexer']
|
|
20
20
|
class ComponentPascalLexer(RegexLexer):
|
21
21
|
"""
|
22
22
|
For Component Pascal source code.
|
23
|
-
|
24
|
-
.. versionadded:: 2.1
|
25
23
|
"""
|
26
24
|
name = 'Component Pascal'
|
27
25
|
aliases = ['componentpascal', 'cp']
|
28
26
|
filenames = ['*.cp', '*.cps']
|
29
27
|
mimetypes = ['text/x-component-pascal']
|
28
|
+
url = 'https://blackboxframework.org'
|
29
|
+
version_added = '2.1'
|
30
30
|
|
31
31
|
flags = re.MULTILINE | re.DOTALL
|
32
32
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for Objective-C family languages.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -201,6 +201,7 @@ class ObjectiveCLexer(objective(CLexer)):
|
|
201
201
|
aliases = ['objective-c', 'objectivec', 'obj-c', 'objc']
|
202
202
|
filenames = ['*.m', '*.h']
|
203
203
|
mimetypes = ['text/x-objective-c']
|
204
|
+
version_added = ''
|
204
205
|
priority = 0.05 # Lower than C
|
205
206
|
|
206
207
|
|
@@ -213,20 +214,20 @@ class ObjectiveCppLexer(objective(CppLexer)):
|
|
213
214
|
aliases = ['objective-c++', 'objectivec++', 'obj-c++', 'objc++']
|
214
215
|
filenames = ['*.mm', '*.hh']
|
215
216
|
mimetypes = ['text/x-objective-c++']
|
217
|
+
version_added = ''
|
216
218
|
priority = 0.05 # Lower than C++
|
217
219
|
|
218
220
|
|
219
221
|
class LogosLexer(ObjectiveCppLexer):
|
220
222
|
"""
|
221
223
|
For Logos + Objective-C source code with preprocessor directives.
|
222
|
-
|
223
|
-
.. versionadded:: 1.6
|
224
224
|
"""
|
225
225
|
|
226
226
|
name = 'Logos'
|
227
227
|
aliases = ['logos']
|
228
228
|
filenames = ['*.x', '*.xi', '*.xm', '*.xmi']
|
229
229
|
mimetypes = ['text/x-logos']
|
230
|
+
version_added = '1.6'
|
230
231
|
priority = 0.25
|
231
232
|
|
232
233
|
tokens = {
|
@@ -283,14 +284,13 @@ class LogosLexer(ObjectiveCppLexer):
|
|
283
284
|
class SwiftLexer(RegexLexer):
|
284
285
|
"""
|
285
286
|
For Swift source.
|
286
|
-
|
287
|
-
.. versionadded:: 2.0
|
288
287
|
"""
|
289
288
|
name = 'Swift'
|
290
289
|
url = 'https://www.swift.org/'
|
291
290
|
filenames = ['*.swift']
|
292
291
|
aliases = ['swift']
|
293
292
|
mimetypes = ['text/x-swift']
|
293
|
+
version_added = '2.0'
|
294
294
|
|
295
295
|
tokens = {
|
296
296
|
'root': [
|
@@ -403,6 +403,7 @@ class SwiftLexer(RegexLexer):
|
|
403
403
|
r'\.[0-9_]*|[eE][+\-]?[0-9_]+)', Number.Float),
|
404
404
|
(r'[0-9][0-9_]*', Number.Integer),
|
405
405
|
# String Literal
|
406
|
+
(r'"""', String, 'string-multi'),
|
406
407
|
(r'"', String, 'string'),
|
407
408
|
|
408
409
|
# Operators and Punctuation
|
@@ -477,8 +478,15 @@ class SwiftLexer(RegexLexer):
|
|
477
478
|
include('root')
|
478
479
|
],
|
479
480
|
'string': [
|
480
|
-
(r'\\\(', String.Interpol, 'string-intp'),
|
481
481
|
(r'"', String, '#pop'),
|
482
|
+
include("string-common"),
|
483
|
+
],
|
484
|
+
'string-multi': [
|
485
|
+
(r'"""', String, '#pop'),
|
486
|
+
include("string-common"),
|
487
|
+
],
|
488
|
+
'string-common': [
|
489
|
+
(r'\\\(', String.Interpol, 'string-intp'),
|
482
490
|
(r"""\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}"""
|
483
491
|
r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}""", String.Escape),
|
484
492
|
(r'[^\\"]+', String),
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for the Ooc language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -18,14 +18,13 @@ __all__ = ['OocLexer']
|
|
18
18
|
class OocLexer(RegexLexer):
|
19
19
|
"""
|
20
20
|
For Ooc source code
|
21
|
-
|
22
|
-
.. versionadded:: 1.2
|
23
21
|
"""
|
24
22
|
name = 'Ooc'
|
25
23
|
url = 'http://ooc-lang.org/'
|
26
24
|
aliases = ['ooc']
|
27
25
|
filenames = ['*.ooc']
|
28
26
|
mimetypes = ['text/x-ooc']
|
27
|
+
version_added = '1.2'
|
29
28
|
|
30
29
|
tokens = {
|
31
30
|
'root': [
|
@@ -0,0 +1,96 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.openscad
|
3
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexers for the OpenSCAD languages.
|
6
|
+
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
|
+
:license: BSD, see LICENSE for details.
|
9
|
+
"""
|
10
|
+
|
11
|
+
from pygments.lexer import RegexLexer, bygroups, words, include
|
12
|
+
from pygments.token import Text, Comment, Punctuation, Operator, Keyword, Name, Number, Whitespace, Literal, String
|
13
|
+
|
14
|
+
__all__ = ['OpenScadLexer']
|
15
|
+
|
16
|
+
|
17
|
+
class OpenScadLexer(RegexLexer):
|
18
|
+
"""For openSCAD code.
|
19
|
+
"""
|
20
|
+
name = "OpenSCAD"
|
21
|
+
url = "https://openscad.org/"
|
22
|
+
aliases = ["openscad"]
|
23
|
+
filenames = ["*.scad"]
|
24
|
+
mimetypes = ["application/x-openscad"]
|
25
|
+
version_added = '2.16'
|
26
|
+
|
27
|
+
tokens = {
|
28
|
+
"root": [
|
29
|
+
(r"[^\S\n]+", Whitespace),
|
30
|
+
(r'//', Comment.Single, 'comment-single'),
|
31
|
+
(r'/\*', Comment.Multiline, 'comment-multi'),
|
32
|
+
(r"[{}\[\]\(\),;:]", Punctuation),
|
33
|
+
(r"[*!#%\-+=?/]", Operator),
|
34
|
+
(r"<=|<|==|!=|>=|>|&&|\|\|", Operator),
|
35
|
+
(r"\$(f[asn]|t|vp[rtd]|children)", Operator),
|
36
|
+
(r"(undef|PI)\b", Keyword.Constant),
|
37
|
+
(
|
38
|
+
r"(use|include)((?:\s|\\\\s)+)",
|
39
|
+
bygroups(Keyword.Namespace, Text),
|
40
|
+
"includes",
|
41
|
+
),
|
42
|
+
(r"(module)(\s*)([^\s\(]+)",
|
43
|
+
bygroups(Keyword.Namespace, Whitespace, Name.Namespace)),
|
44
|
+
(r"(function)(\s*)([^\s\(]+)",
|
45
|
+
bygroups(Keyword.Declaration, Whitespace, Name.Function)),
|
46
|
+
(words(("true", "false"), prefix=r"\b", suffix=r"\b"), Literal),
|
47
|
+
(words((
|
48
|
+
"function", "module", "include", "use", "for",
|
49
|
+
"intersection_for", "if", "else", "return"
|
50
|
+
), prefix=r"\b", suffix=r"\b"), Keyword
|
51
|
+
),
|
52
|
+
(words((
|
53
|
+
"circle", "square", "polygon", "text", "sphere", "cube",
|
54
|
+
"cylinder", "polyhedron", "translate", "rotate", "scale",
|
55
|
+
"resize", "mirror", "multmatrix", "color", "offset", "hull",
|
56
|
+
"minkowski", "union", "difference", "intersection", "abs",
|
57
|
+
"sign", "sin", "cos", "tan", "acos", "asin", "atan", "atan2",
|
58
|
+
"floor", "round", "ceil", "ln", "log", "pow", "sqrt", "exp",
|
59
|
+
"rands", "min", "max", "concat", "lookup", "str", "chr",
|
60
|
+
"search", "version", "version_num", "norm", "cross",
|
61
|
+
"parent_module", "echo", "import", "import_dxf",
|
62
|
+
"dxf_linear_extrude", "linear_extrude", "rotate_extrude",
|
63
|
+
"surface", "projection", "render", "dxf_cross",
|
64
|
+
"dxf_dim", "let", "assign", "len"
|
65
|
+
), prefix=r"\b", suffix=r"\b"),
|
66
|
+
Name.Builtin
|
67
|
+
),
|
68
|
+
(r"\bchildren\b", Name.Builtin.Pseudo),
|
69
|
+
(r'""".*?"""', String.Double),
|
70
|
+
(r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
|
71
|
+
(r"-?\d+(\.\d+)?(e[+-]?\d+)?", Number),
|
72
|
+
(r"\w+", Name),
|
73
|
+
],
|
74
|
+
"includes": [
|
75
|
+
(
|
76
|
+
r"(<)([^>]*)(>)",
|
77
|
+
bygroups(Punctuation, Comment.PreprocFile, Punctuation),
|
78
|
+
),
|
79
|
+
],
|
80
|
+
'comment': [
|
81
|
+
(r':param: [a-zA-Z_]\w*|:returns?:|(FIXME|MARK|TODO):',
|
82
|
+
Comment.Special)
|
83
|
+
],
|
84
|
+
'comment-single': [
|
85
|
+
(r'\n', Text, '#pop'),
|
86
|
+
include('comment'),
|
87
|
+
(r'[^\n]+', Comment.Single)
|
88
|
+
],
|
89
|
+
'comment-multi': [
|
90
|
+
include('comment'),
|
91
|
+
(r'[^*/]+', Comment.Multiline),
|
92
|
+
(r'/\*', Comment.Multiline, '#push'),
|
93
|
+
(r'\*/', Comment.Multiline, '#pop'),
|
94
|
+
(r'[*/]', Comment.Multiline)
|
95
|
+
],
|
96
|
+
}
|
@@ -4,10 +4,11 @@
|
|
4
4
|
|
5
5
|
Just export lexer classes previously contained in this module.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
|
+
# ruff: noqa: F401
|
11
12
|
from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConsoleLexer
|
12
13
|
from pygments.lexers.shell import BashLexer, BashSessionLexer, BatchLexer, \
|
13
14
|
TcshLexer
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for ParaSail.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -20,8 +20,6 @@ __all__ = ['ParaSailLexer']
|
|
20
20
|
class ParaSailLexer(RegexLexer):
|
21
21
|
"""
|
22
22
|
For ParaSail source code.
|
23
|
-
|
24
|
-
.. versionadded:: 2.1
|
25
23
|
"""
|
26
24
|
|
27
25
|
name = 'ParaSail'
|
@@ -29,6 +27,7 @@ class ParaSailLexer(RegexLexer):
|
|
29
27
|
aliases = ['parasail']
|
30
28
|
filenames = ['*.psi', '*.psl']
|
31
29
|
mimetypes = ['text/x-parasail']
|
30
|
+
version_added = '2.1'
|
32
31
|
|
33
32
|
flags = re.MULTILINE
|
34
33
|
|