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,67 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.fift
|
3
|
+
~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexers for fift.
|
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
|
12
|
+
from pygments.token import Literal, Comment, Name, String, Number, Whitespace
|
13
|
+
|
14
|
+
__all__ = ['FiftLexer']
|
15
|
+
|
16
|
+
|
17
|
+
class FiftLexer(RegexLexer):
|
18
|
+
"""
|
19
|
+
For Fift source code.
|
20
|
+
"""
|
21
|
+
|
22
|
+
name = 'Fift'
|
23
|
+
aliases = ['fift', 'fif']
|
24
|
+
filenames = ['*.fif']
|
25
|
+
url = 'https://ton-blockchain.github.io/docs/fiftbase.pdf'
|
26
|
+
|
27
|
+
tokens = {
|
28
|
+
'root': [
|
29
|
+
(r'\s+', Whitespace),
|
30
|
+
|
31
|
+
include('comments'),
|
32
|
+
|
33
|
+
(r'[\.+]?\"', String, 'string'),
|
34
|
+
|
35
|
+
# numbers
|
36
|
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
37
|
+
(r'0b[01]+', Number.Bin),
|
38
|
+
(r'-?[0-9]+("/"-?[0-9]+)?', Number.Decimal),
|
39
|
+
|
40
|
+
# slices
|
41
|
+
(r'b\{[01]+\}', Literal),
|
42
|
+
(r'x\{[0-9a-fA-F_]+\}', Literal),
|
43
|
+
|
44
|
+
# byte literal
|
45
|
+
(r'B\{[0-9a-fA-F_]+\}', Literal),
|
46
|
+
|
47
|
+
# treat anything as word
|
48
|
+
(r'\S+', Name)
|
49
|
+
],
|
50
|
+
|
51
|
+
'string': [
|
52
|
+
(r'\\.', String.Escape),
|
53
|
+
(r'\"', String, '#pop'),
|
54
|
+
(r'[^\"\r\n\\]+', String)
|
55
|
+
],
|
56
|
+
|
57
|
+
'comments': [
|
58
|
+
(r'//.*', Comment.Singleline),
|
59
|
+
(r'/\*', Comment.Multiline, 'comment'),
|
60
|
+
],
|
61
|
+
'comment': [
|
62
|
+
(r'[^/*]+', Comment.Multiline),
|
63
|
+
(r'/\*', Comment.Multiline, '#push'),
|
64
|
+
(r'\*/', Comment.Multiline, '#pop'),
|
65
|
+
(r'[*/]', Comment.Multiline),
|
66
|
+
],
|
67
|
+
}
|
@@ -4,25 +4,26 @@
|
|
4
4
|
|
5
5
|
Lexer for FloScript
|
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
|
-
from pygments.lexer import RegexLexer, include
|
11
|
+
from pygments.lexer import RegexLexer, include, bygroups
|
12
12
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
13
|
-
Number, Punctuation
|
13
|
+
Number, Punctuation, Whitespace
|
14
14
|
|
15
15
|
__all__ = ['FloScriptLexer']
|
16
16
|
|
17
17
|
|
18
18
|
class FloScriptLexer(RegexLexer):
|
19
19
|
"""
|
20
|
-
For
|
20
|
+
For FloScript configuration language source code.
|
21
21
|
|
22
22
|
.. versionadded:: 2.4
|
23
23
|
"""
|
24
24
|
|
25
25
|
name = 'FloScript'
|
26
|
+
url = 'https://github.com/ioflo/ioflo'
|
26
27
|
aliases = ['floscript', 'flo']
|
27
28
|
filenames = ['*.flo']
|
28
29
|
|
@@ -41,11 +42,10 @@ class FloScriptLexer(RegexLexer):
|
|
41
42
|
|
42
43
|
tokens = {
|
43
44
|
'root': [
|
44
|
-
(r'\
|
45
|
-
(r'[^\S\n]+', Text),
|
45
|
+
(r'\s+', Whitespace),
|
46
46
|
|
47
47
|
(r'[]{}:(),;[]', Punctuation),
|
48
|
-
(r'
|
48
|
+
(r'(\\)(\n)', bygroups(Text, Whitespace)),
|
49
49
|
(r'\\', Text),
|
50
50
|
(r'(to|by|with|from|per|for|cum|qua|via|as|at|in|of|on|re|is|if|be|into|'
|
51
51
|
r'and|not)\b', Operator.Word),
|
@@ -4,14 +4,15 @@
|
|
4
4
|
|
5
5
|
Lexer for the Forth language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
import re
|
12
12
|
|
13
13
|
from pygments.lexer import RegexLexer, bygroups
|
14
|
-
from pygments.token import Text, Comment, Keyword, Name, String, Number
|
14
|
+
from pygments.token import Text, Comment, Keyword, Name, String, Number, \
|
15
|
+
Whitespace
|
15
16
|
|
16
17
|
|
17
18
|
__all__ = ['ForthLexer']
|
@@ -24,6 +25,7 @@ class ForthLexer(RegexLexer):
|
|
24
25
|
.. versionadded:: 2.2
|
25
26
|
"""
|
26
27
|
name = 'Forth'
|
28
|
+
url = 'https://www.forth.com/forth/'
|
27
29
|
aliases = ['forth']
|
28
30
|
filenames = ['*.frt', '*.fs']
|
29
31
|
mimetypes = ['application/x-forth']
|
@@ -32,15 +34,15 @@ class ForthLexer(RegexLexer):
|
|
32
34
|
|
33
35
|
tokens = {
|
34
36
|
'root': [
|
35
|
-
(r'\s+',
|
37
|
+
(r'\s+', Whitespace),
|
36
38
|
# All comment types
|
37
|
-
(r'
|
39
|
+
(r'\\.*?$', Comment.Single),
|
38
40
|
(r'\([\s].*?\)', Comment.Single),
|
39
41
|
# defining words. The next word is a new command name
|
40
42
|
(r'(:|variable|constant|value|buffer:)(\s+)',
|
41
|
-
bygroups(Keyword.Namespace,
|
43
|
+
bygroups(Keyword.Namespace, Whitespace), 'worddef'),
|
42
44
|
# strings are rather simple
|
43
|
-
(r'([.sc]")(\s+?)', bygroups(String,
|
45
|
+
(r'([.sc]")(\s+?)', bygroups(String, Whitespace), 'stringdef'),
|
44
46
|
# keywords from the various wordsets
|
45
47
|
# *** Wordset BLOCK
|
46
48
|
(r'(blk|block|buffer|evaluate|flush|load|save-buffers|update|'
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for Fortran 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
|
|
@@ -24,7 +24,8 @@ class FortranLexer(RegexLexer):
|
|
24
24
|
.. versionadded:: 0.10
|
25
25
|
"""
|
26
26
|
name = 'Fortran'
|
27
|
-
|
27
|
+
url = 'https://fortran-lang.org/'
|
28
|
+
aliases = ['fortran', 'f90']
|
28
29
|
filenames = ['*.f03', '*.f90', '*.F03', '*.F90']
|
29
30
|
mimetypes = ['text/x-fortran']
|
30
31
|
flags = re.IGNORECASE | re.MULTILINE
|
@@ -44,15 +45,19 @@ class FortranLexer(RegexLexer):
|
|
44
45
|
include('core'),
|
45
46
|
(r'[a-z][\w$]*', Name),
|
46
47
|
include('nums'),
|
47
|
-
(r'[\s]+', Text),
|
48
|
+
(r'[\s]+', Text.Whitespace),
|
48
49
|
],
|
49
50
|
'core': [
|
50
51
|
# Statements
|
52
|
+
|
53
|
+
(r'\b(DO)(\s+)(CONCURRENT)\b', bygroups(Keyword, Text.Whitespace, Keyword)),
|
54
|
+
(r'\b(GO)(\s*)(TO)\b', bygroups(Keyword, Text.Whitespace, Keyword)),
|
55
|
+
|
51
56
|
(words((
|
52
57
|
'ABSTRACT', 'ACCEPT', 'ALL', 'ALLSTOP', 'ALLOCATABLE', 'ALLOCATE',
|
53
58
|
'ARRAY', 'ASSIGN', 'ASSOCIATE', 'ASYNCHRONOUS', 'BACKSPACE', 'BIND',
|
54
59
|
'BLOCK', 'BLOCKDATA', 'BYTE', 'CALL', 'CASE', 'CLASS', 'CLOSE',
|
55
|
-
'CODIMENSION', 'COMMON', '
|
60
|
+
'CODIMENSION', 'COMMON', 'CONTIGUOUS', 'CONTAINS',
|
56
61
|
'CONTINUE', 'CRITICAL', 'CYCLE', 'DATA', 'DEALLOCATE', 'DECODE',
|
57
62
|
'DEFERRED', 'DIMENSION', 'DO', 'ELEMENTAL', 'ELSE', 'ENCODE', 'END',
|
58
63
|
'ENDASSOCIATE', 'ENDBLOCK', 'ENDDO', 'ENDENUM', 'ENDFORALL',
|
@@ -60,11 +65,11 @@ class FortranLexer(RegexLexer):
|
|
60
65
|
'ENDSELECT', 'ENDSUBMODULE', 'ENDSUBROUTINE', 'ENDTYPE', 'ENDWHERE',
|
61
66
|
'ENTRY', 'ENUM', 'ENUMERATOR', 'EQUIVALENCE', 'ERROR STOP', 'EXIT',
|
62
67
|
'EXTENDS', 'EXTERNAL', 'EXTRINSIC', 'FILE', 'FINAL', 'FORALL', 'FORMAT',
|
63
|
-
'FUNCTION', 'GENERIC', '
|
68
|
+
'FUNCTION', 'GENERIC', 'IF', 'IMAGES', 'IMPLICIT',
|
64
69
|
'IMPORT', 'IMPURE', 'INCLUDE', 'INQUIRE', 'INTENT', 'INTERFACE',
|
65
70
|
'INTRINSIC', 'IS', 'LOCK', 'MEMORY', 'MODULE', 'NAMELIST', 'NULLIFY',
|
66
|
-
'NONE', 'NON_INTRINSIC', 'NON_OVERRIDABLE', 'NOPASS', 'ONLY', 'OPEN',
|
67
|
-
'OPTIONAL', 'OPTIONS', 'PARAMETER', 'PASS', 'PAUSE', 'POINTER', 'PRINT',
|
71
|
+
'NONE', 'NON_INTRINSIC', 'NON_OVERRIDABLE', 'NOPASS', 'ONLY', 'OPEN',
|
72
|
+
'OPTIONAL', 'OPTIONS', 'PARAMETER', 'PASS', 'PAUSE', 'POINTER', 'PRINT',
|
68
73
|
'PRIVATE', 'PROGRAM', 'PROCEDURE', 'PROTECTED', 'PUBLIC', 'PURE', 'READ',
|
69
74
|
'RECURSIVE', 'RESULT', 'RETURN', 'REWIND', 'SAVE', 'SELECT', 'SEQUENCE',
|
70
75
|
'STOP', 'SUBMODULE', 'SUBROUTINE', 'SYNC', 'SYNCALL', 'SYNCIMAGES',
|
@@ -152,8 +157,8 @@ class FortranLexer(RegexLexer):
|
|
152
157
|
],
|
153
158
|
|
154
159
|
'strings': [
|
155
|
-
(r'
|
156
|
-
(r"
|
160
|
+
(r'"(\\[0-7]+|\\[^0-7]|[^"\\])*"', String.Double),
|
161
|
+
(r"'(\\[0-7]+|\\[^0-7]|[^'\\])*'", String.Single),
|
157
162
|
],
|
158
163
|
|
159
164
|
'nums': [
|
@@ -201,8 +206,8 @@ class FortranFixedLexer(RegexLexer):
|
|
201
206
|
],
|
202
207
|
'code': [
|
203
208
|
(r'(.{66})(.*)(\n)',
|
204
|
-
bygroups(_lex_fortran, Comment, Text), 'root'),
|
205
|
-
(r'(.*)(\n)', bygroups(_lex_fortran, Text), 'root'),
|
209
|
+
bygroups(_lex_fortran, Comment, Text.Whitespace), 'root'),
|
210
|
+
(r'(.*)(\n)', bygroups(_lex_fortran, Text.Whitespace), 'root'),
|
206
211
|
default('root'),
|
207
212
|
]
|
208
213
|
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Simple lexer for Microsoft Visual FoxPro source code.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -12,7 +12,7 @@ import re
|
|
12
12
|
|
13
13
|
from pygments.lexer import RegexLexer
|
14
14
|
from pygments.token import Punctuation, Text, Comment, Operator, Keyword, \
|
15
|
-
|
15
|
+
Name, String
|
16
16
|
|
17
17
|
__all__ = ['FoxProLexer']
|
18
18
|
|
@@ -4,24 +4,20 @@
|
|
4
4
|
|
5
5
|
Lexer for FreeFem++ 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
|
-
from pygments.
|
12
|
-
default
|
13
|
-
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
14
|
-
Number, Punctuation
|
11
|
+
from pygments.token import Comment, Operator, Keyword, Name
|
15
12
|
|
16
|
-
from pygments.lexers.c_cpp import
|
17
|
-
from pygments.lexers import _mql_builtins
|
13
|
+
from pygments.lexers.c_cpp import CppLexer
|
18
14
|
|
19
15
|
__all__ = ['FreeFemLexer']
|
20
16
|
|
21
17
|
|
22
18
|
class FreeFemLexer(CppLexer):
|
23
19
|
"""
|
24
|
-
For
|
20
|
+
For FreeFem++ source.
|
25
21
|
|
26
22
|
This is an extension of the CppLexer, as the FreeFem Language is a superset
|
27
23
|
of C++.
|
@@ -30,6 +26,7 @@ class FreeFemLexer(CppLexer):
|
|
30
26
|
"""
|
31
27
|
|
32
28
|
name = 'Freefem'
|
29
|
+
url = 'https://freefem.org/'
|
33
30
|
aliases = ['freefem']
|
34
31
|
filenames = ['*.edp']
|
35
32
|
mimetypes = ['text/x-freefem']
|
@@ -875,8 +872,8 @@ class FreeFemLexer(CppLexer):
|
|
875
872
|
'using'
|
876
873
|
}
|
877
874
|
|
878
|
-
def get_tokens_unprocessed(self, text):
|
879
|
-
for index, token, value in CppLexer.get_tokens_unprocessed(self, text):
|
875
|
+
def get_tokens_unprocessed(self, text, stack=('root',)):
|
876
|
+
for index, token, value in CppLexer.get_tokens_unprocessed(self, text, stack):
|
880
877
|
if value in self.operators:
|
881
878
|
yield index, Operator, value
|
882
879
|
elif value in self.types:
|
@@ -0,0 +1,108 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.func
|
3
|
+
~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexers for FunC.
|
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 Text, Comment, Operator, Keyword, Name, String, \
|
13
|
+
Number, Whitespace, Punctuation
|
14
|
+
|
15
|
+
__all__ = ['FuncLexer']
|
16
|
+
|
17
|
+
|
18
|
+
class FuncLexer(RegexLexer):
|
19
|
+
"""
|
20
|
+
For FunC source code.
|
21
|
+
"""
|
22
|
+
|
23
|
+
name = 'FunC'
|
24
|
+
aliases = ['func', 'fc']
|
25
|
+
filenames = ['*.fc', '*.func']
|
26
|
+
|
27
|
+
# 1. Does not start from "
|
28
|
+
# 2. Can start from ` and end with `, containing any character
|
29
|
+
# 3. Starts with underscore or { or } and have more than 1 character after it
|
30
|
+
# 4. Starts with letter, contains letters, numbers and underscores
|
31
|
+
identifier = r'(?!")(`([^`]+)`|((?=_)_|(?=\{)\{|(?=\})\}|(?![_`{}]))([^;,\[\]\(\)\s~.]+))'
|
32
|
+
|
33
|
+
tokens = {
|
34
|
+
'root': [
|
35
|
+
(r'\n', Whitespace),
|
36
|
+
(r'\s+', Whitespace),
|
37
|
+
|
38
|
+
include('keywords'),
|
39
|
+
include('strings'),
|
40
|
+
include('directives'),
|
41
|
+
include('numeric'),
|
42
|
+
include('comments'),
|
43
|
+
include('storage'),
|
44
|
+
include('functions'),
|
45
|
+
include('variables'),
|
46
|
+
|
47
|
+
(r'[.;(),\[\]~{}]', Punctuation)
|
48
|
+
],
|
49
|
+
'keywords': [
|
50
|
+
(words((
|
51
|
+
'<=>', '>=', '<=', '!=', '==', '^>>', '~>>',
|
52
|
+
'>>', '<<', '/%', '^%', '~%', '^/', '~/', '+=',
|
53
|
+
'-=', '*=', '/=', '~/=', '^/=', '%=', '^%=', '<<=',
|
54
|
+
'>>=', '~>>=', '^>>=', '&=', '|=', '^=', '^', '=',
|
55
|
+
'~', '/', '%', '-', '*', '+','>',
|
56
|
+
'<', '&', '|', ':', '?'), prefix=r'(?<=\s)', suffix=r'(?=\s)'),
|
57
|
+
Operator),
|
58
|
+
(words((
|
59
|
+
'if', 'ifnot',
|
60
|
+
'else', 'elseif', 'elseifnot',
|
61
|
+
'while', 'do', 'until', 'repeat',
|
62
|
+
'return', 'impure', 'method_id',
|
63
|
+
'forall', 'asm', 'inline', 'inline_ref'), prefix=r'\b', suffix=r'\b'),
|
64
|
+
Keyword),
|
65
|
+
(words(('true', 'false'), prefix=r'\b', suffix=r'\b'), Keyword.Constant),
|
66
|
+
],
|
67
|
+
'directives': [
|
68
|
+
(r'#include|#pragma', Keyword, 'directive'),
|
69
|
+
],
|
70
|
+
'directive': [
|
71
|
+
include('strings'),
|
72
|
+
(r'\s+', Whitespace),
|
73
|
+
(r'version|not-version', Keyword),
|
74
|
+
(r'(>=|<=|=|>|<|\^)?([0-9]+)(.[0-9]+)?(.[0-9]+)?', Number), # version
|
75
|
+
(r';', Text, '#pop')
|
76
|
+
],
|
77
|
+
'strings': [
|
78
|
+
(r'\"([^\n\"]+)\"[Hhcusa]?', String),
|
79
|
+
],
|
80
|
+
'numeric': [
|
81
|
+
(r'\b(-?(?!_)([\d_]+|0x[\d_a-fA-F]+)|0b[1_0]+)(?<!_)(?=[\s\)\],;])', Number)
|
82
|
+
],
|
83
|
+
'comments': [
|
84
|
+
(r';;([^\n]*)', Comment.Singleline),
|
85
|
+
(r'\{-', Comment.Multiline, 'comment'),
|
86
|
+
],
|
87
|
+
'comment': [
|
88
|
+
(r'[^-}{]+', Comment.Multiline),
|
89
|
+
(r'\{-', Comment.Multiline, '#push'),
|
90
|
+
(r'-\}', Comment.Multiline, '#pop'),
|
91
|
+
(r'[-}{]', Comment.Multiline),
|
92
|
+
],
|
93
|
+
'storage': [
|
94
|
+
(words((
|
95
|
+
'var', 'int', 'slice', 'tuple',
|
96
|
+
'cell', 'builder', 'cont', '_'),
|
97
|
+
prefix=r'\b', suffix=r'(?=[\s\(\),\[\]])'),
|
98
|
+
Keyword.Type),
|
99
|
+
(words(('global', 'const'), prefix=r'\b', suffix=r'\b'), Keyword.Constant),
|
100
|
+
],
|
101
|
+
'variables': [
|
102
|
+
(identifier, Name.Variable),
|
103
|
+
],
|
104
|
+
'functions': [
|
105
|
+
# identifier followed by (
|
106
|
+
(identifier + r'(?=[\(])', Name.Function),
|
107
|
+
]
|
108
|
+
}
|
@@ -4,23 +4,18 @@
|
|
4
4
|
|
5
5
|
Lexer for the Futhark 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
|
12
|
-
|
13
|
-
|
14
|
-
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
15
|
-
Number, Punctuation
|
11
|
+
from pygments.lexer import RegexLexer, bygroups
|
12
|
+
from pygments.token import Comment, Operator, Keyword, Name, String, \
|
13
|
+
Number, Punctuation, Whitespace
|
16
14
|
from pygments import unistring as uni
|
17
15
|
|
18
16
|
__all__ = ['FutharkLexer']
|
19
17
|
|
20
18
|
|
21
|
-
line_re = re.compile('.*?\n')
|
22
|
-
|
23
|
-
|
24
19
|
class FutharkLexer(RegexLexer):
|
25
20
|
"""
|
26
21
|
A Futhark lexer
|
@@ -28,17 +23,17 @@ class FutharkLexer(RegexLexer):
|
|
28
23
|
.. versionadded:: 2.8
|
29
24
|
"""
|
30
25
|
name = 'Futhark'
|
26
|
+
url = 'https://futhark-lang.org/'
|
31
27
|
aliases = ['futhark']
|
32
28
|
filenames = ['*.fut']
|
33
29
|
mimetypes = ['text/x-futhark']
|
34
30
|
|
35
|
-
flags = re.MULTILINE | re.UNICODE
|
36
|
-
|
37
31
|
num_types = ('i8', 'i16', 'i32', 'i64', 'u8', 'u16', 'u32', 'u64', 'f32', 'f64')
|
38
32
|
|
39
33
|
other_types = ('bool', )
|
40
34
|
|
41
|
-
reserved = ('if', 'then', 'else', 'let', 'loop', 'in', 'with',
|
35
|
+
reserved = ('if', 'then', 'else', 'def', 'let', 'loop', 'in', 'with',
|
36
|
+
'type', 'type~', 'type^',
|
42
37
|
'val', 'entry', 'for', 'while', 'do', 'case', 'match',
|
43
38
|
'include', 'import', 'module', 'open', 'local', 'assert', '_')
|
44
39
|
|
@@ -55,19 +50,19 @@ class FutharkLexer(RegexLexer):
|
|
55
50
|
|
56
51
|
tokens = {
|
57
52
|
'root': [
|
58
|
-
(r'--(.*?)
|
59
|
-
(r'\s+',
|
53
|
+
(r'--(.*?)$', Comment.Single),
|
54
|
+
(r'\s+', Whitespace),
|
60
55
|
(r'\(\)', Punctuation),
|
61
56
|
(r'\b(%s)(?!\')\b' % '|'.join(reserved), Keyword.Reserved),
|
62
57
|
(r'\b(%s)(?!\')\b' % '|'.join(num_types + other_types), Keyword.Type),
|
63
58
|
|
64
59
|
# Identifiers
|
65
60
|
(r'#\[([a-zA-Z_\(\) ]*)\]', Comment.Preproc),
|
66
|
-
(r'
|
61
|
+
(r'[#!]?(%s\.)*%s' % (identifier_re, identifier_re), Name),
|
67
62
|
|
68
63
|
(r'\\', Operator),
|
69
64
|
(r'[-+/%=!><|&*^][-+/%=!><|&*^.]*', Operator),
|
70
|
-
(r'[][(),:;`{}]', Punctuation),
|
65
|
+
(r'[][(),:;`{}?.\'~^]', Punctuation),
|
71
66
|
|
72
67
|
# Numbers
|
73
68
|
(r'0[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*' + num_postfix,
|
@@ -106,6 +101,6 @@ class FutharkLexer(RegexLexer):
|
|
106
101
|
(r'o[0-7]+', String.Escape, '#pop'),
|
107
102
|
(r'x[\da-fA-F]+', String.Escape, '#pop'),
|
108
103
|
(r'\d+', String.Escape, '#pop'),
|
109
|
-
(r'\s
|
104
|
+
(r'(\s+)(\\)', bygroups(Whitespace, String.Escape), '#pop'),
|
110
105
|
],
|
111
106
|
}
|
@@ -1,11 +1,10 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
"""
|
3
2
|
pygments.lexers.gcodelexer
|
4
3
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
5
4
|
|
6
5
|
Lexers for the G Code 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
|
|