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
@@ -1,19 +1,18 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
"""
|
3
2
|
pygments.lexers.apdlexer
|
4
3
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
5
4
|
|
6
5
|
Lexers for ANSYS Parametric Design 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
11
|
import re
|
13
12
|
|
14
|
-
from pygments.lexer import RegexLexer, include, words
|
15
|
-
from pygments.token import Comment, Keyword, Name,
|
16
|
-
String, Generic, Punctuation
|
13
|
+
from pygments.lexer import RegexLexer, include, words, default
|
14
|
+
from pygments.token import Comment, Keyword, Name, Number, Operator, \
|
15
|
+
String, Generic, Punctuation, Whitespace, Escape
|
17
16
|
|
18
17
|
__all__ = ['apdlexer']
|
19
18
|
|
@@ -145,7 +144,7 @@ class apdlexer(RegexLexer):
|
|
145
144
|
"CMDELE", "CMDOMEGA", "CMEDIT", "CMGRP", "CMLIST",
|
146
145
|
"CMMOD", "CMOMEGA", "CMPLOT", "CMROTATE", "CMSEL",
|
147
146
|
"CMSFILE", "CMSOPT", "CMWRITE", "CNCHECK", "CNKMOD",
|
148
|
-
"CNTR", "CNVTOL", "/COLOR", "
|
147
|
+
"CNTR", "CNVTOL", "/COLOR", "*COMP", "COMBINE",
|
149
148
|
"COMPRESS", "CON4", "CONE", "/CONFIG", "CONJUG",
|
150
149
|
"/CONTOUR", "/COPY", "CORIOLIS", "COUPLE", "COVAL",
|
151
150
|
"CP", "CPCYC", "CPDELE", "CPINTF", "/CPLANE", "CPLGEN",
|
@@ -159,7 +158,7 @@ class apdlexer(RegexLexer):
|
|
159
158
|
"DADELE", "DALIST", "DAMORPH", "DATA", "DATADEF",
|
160
159
|
"DCGOMG", "DCUM", "DCVSWP", "DDASPEC", "DDELE",
|
161
160
|
"DDOPTION", "DEACT", "DEFINE", "*DEL", "DELETE",
|
162
|
-
"/DELETE", "DELTIM", "DEMORPH", "DERIV", "DESIZE",
|
161
|
+
"/DELETE", "DELTIM", "DELTIME", "DEMORPH", "DERIV", "DESIZE",
|
163
162
|
"DESOL", "DETAB", "/DEVDISP", "/DEVICE", "/DFLAB",
|
164
163
|
"DFLX", "DFSWAVE", "DIG", "DIGIT", "*DIM",
|
165
164
|
"/DIRECTORY", "DISPLAY", "/DIST", "DJ", "DJDELE",
|
@@ -351,7 +350,7 @@ class apdlexer(RegexLexer):
|
|
351
350
|
"SSBT", "/SSCALE", "SSLN", "SSMT", "SSPA", "SSPB",
|
352
351
|
"SSPD", "SSPE", "SSPM", "SSUM", "SSTATE", "STABILIZE",
|
353
352
|
"STAOPT", "STAT", "*STATUS", "/STATUS", "STEF",
|
354
|
-
"
|
353
|
+
"STORE", "SUBOPT", "SUBSET", "SUCALC",
|
355
354
|
"SUCR", "SUDEL", "SUEVAL", "SUGET", "SUMAP", "SUMTYPE",
|
356
355
|
"SUPL", "SUPR", "SURESU", "SUSAVE", "SUSEL", "SUVECT",
|
357
356
|
"SV", "SVPLOT", "SVTYP", "SWADD", "SWDEL", "SWGEN",
|
@@ -360,13 +359,13 @@ class apdlexer(RegexLexer):
|
|
360
359
|
"TBEO", "TBIN", "TBFIELD", "TBFT", "TBLE", "TBLIST",
|
361
360
|
"TBMODIF", "TBPLOT", "TBPT", "TBTEMP", "TCHG", "/TEE",
|
362
361
|
"TERM", "THEXPAND", "THOPT", "TIFF", "TIME",
|
363
|
-
"TIMERANGE", "TIMINT", "TIMP", "TINTP",
|
362
|
+
"TIMERANGE", "TIMINT", "TIMP", "TINTP",
|
364
363
|
"/TLABEL", "TOFFST", "*TOPER", "TORQ2D", "TORQC2D",
|
365
364
|
"TORQSUM", "TORUS", "TRANS", "TRANSFER", "*TREAD",
|
366
365
|
"TREF", "/TRIAD", "/TRLCY", "TRNOPT", "TRPDEL",
|
367
366
|
"TRPLIS", "TRPOIN", "TRTIME", "TSHAP", "/TSPEC",
|
368
367
|
"TSRES", "TUNIF", "TVAR", "/TXTRE", "/TYPE", "TYPE",
|
369
|
-
"/UCMD", "/UDOC", "/UI", "UIMP", "/UIS", "*ULIB",
|
368
|
+
"/UCMD", "/UDOC", "/UI", "UIMP", "/UIS", "*ULIB", "/UPF",
|
370
369
|
"UNDELETE", "UNDO", "/UNITS", "UNPAUSE", "UPCOORD",
|
371
370
|
"UPGEOM", "*USE", "/USER", "USRCAL", "USRDOF",
|
372
371
|
"USRELEM", "V", "V2DOPT", "VA", "*VABS", "VADD",
|
@@ -417,23 +416,168 @@ class apdlexer(RegexLexer):
|
|
417
416
|
"/ANNOT", "ANORM", "ANPRES", "ANSOL", "ANSTOAQWA",
|
418
417
|
"ANSTOASAS", "ANTIME", "ANTYPE")
|
419
418
|
|
419
|
+
special = ("/COM", "/TITLE", "STITLE")
|
420
|
+
|
421
|
+
elements = ("SOLID5",
|
422
|
+
"LINK11",
|
423
|
+
"PLANE13",
|
424
|
+
"COMBIN14",
|
425
|
+
"MASS2",
|
426
|
+
"PLANE25",
|
427
|
+
"MATRIX27",
|
428
|
+
"FLUID29",
|
429
|
+
"FLUID30",
|
430
|
+
"LINK31",
|
431
|
+
"LINK33",
|
432
|
+
"LINK34",
|
433
|
+
"PLANE35",
|
434
|
+
"SOURC36",
|
435
|
+
"COMBIN37",
|
436
|
+
"FLUID38",
|
437
|
+
"COMBIN39",
|
438
|
+
"COMBIN40",
|
439
|
+
"INFIN47",
|
440
|
+
"MATRIX50",
|
441
|
+
"PLANE55",
|
442
|
+
"SHELL61",
|
443
|
+
"LINK68",
|
444
|
+
"SOLID70",
|
445
|
+
"MASS71",
|
446
|
+
"PLANE75",
|
447
|
+
"PLANE77",
|
448
|
+
"PLANE78",
|
449
|
+
"PLANE83",
|
450
|
+
"SOLID87",
|
451
|
+
"SOLID90",
|
452
|
+
"CIRCU94",
|
453
|
+
"SOLID96",
|
454
|
+
"SOLID98",
|
455
|
+
"INFIN110",
|
456
|
+
"INFIN111",
|
457
|
+
"FLUID116",
|
458
|
+
"PLANE121",
|
459
|
+
"SOLID122",
|
460
|
+
"SOLID123",
|
461
|
+
"CIRCU124",
|
462
|
+
"CIRCU125",
|
463
|
+
"TRANS126",
|
464
|
+
"FLUID129",
|
465
|
+
"FLUID130",
|
466
|
+
"SHELL131",
|
467
|
+
"SHELL132",
|
468
|
+
"FLUID136",
|
469
|
+
"FLUID138",
|
470
|
+
"FLUID139",
|
471
|
+
"SURF151",
|
472
|
+
"SURF152",
|
473
|
+
"SURF153",
|
474
|
+
"SURF154",
|
475
|
+
"SURF155",
|
476
|
+
"SURF156",
|
477
|
+
"SHELL157",
|
478
|
+
"SURF159",
|
479
|
+
"TARGE169",
|
480
|
+
"TARGE170",
|
481
|
+
"CONTA172",
|
482
|
+
"CONTA174",
|
483
|
+
"CONTA175",
|
484
|
+
"CONTA177",
|
485
|
+
"CONTA178",
|
486
|
+
"PRETS179",
|
487
|
+
"LINK180",
|
488
|
+
"SHELL181",
|
489
|
+
"PLANE182",
|
490
|
+
"PLANE183",
|
491
|
+
"MPC184",
|
492
|
+
"SOLID185",
|
493
|
+
"SOLID186",
|
494
|
+
"SOLID187",
|
495
|
+
"BEAM188",
|
496
|
+
"BEAM189",
|
497
|
+
"SOLSH190",
|
498
|
+
"INTER192",
|
499
|
+
"INTER193",
|
500
|
+
"INTER194",
|
501
|
+
"INTER195",
|
502
|
+
"MESH200",
|
503
|
+
"FOLLW201",
|
504
|
+
"INTER202",
|
505
|
+
"INTER203",
|
506
|
+
"INTER204",
|
507
|
+
"INTER205",
|
508
|
+
"SHELL208",
|
509
|
+
"SHELL209",
|
510
|
+
"CPT212",
|
511
|
+
"CPT213",
|
512
|
+
"COMBI214",
|
513
|
+
"CPT215",
|
514
|
+
"CPT216",
|
515
|
+
"CPT217",
|
516
|
+
"FLUID218",
|
517
|
+
"FLUID220",
|
518
|
+
"FLUID221",
|
519
|
+
"PLANE222",
|
520
|
+
"PLANE223",
|
521
|
+
"SOLID225",
|
522
|
+
"SOLID226",
|
523
|
+
"SOLID227",
|
524
|
+
"PLANE230",
|
525
|
+
"SOLID231",
|
526
|
+
"SOLID232",
|
527
|
+
"PLANE233",
|
528
|
+
"SOLID236",
|
529
|
+
"SOLID237",
|
530
|
+
"PLANE238",
|
531
|
+
"SOLID239",
|
532
|
+
"SOLID240",
|
533
|
+
"HSFLD241",
|
534
|
+
"HSFLD242",
|
535
|
+
"COMBI250",
|
536
|
+
"SURF251",
|
537
|
+
"SURF252",
|
538
|
+
"INFIN257",
|
539
|
+
"REINF263",
|
540
|
+
"REINF264",
|
541
|
+
"REINF265",
|
542
|
+
"SOLID272",
|
543
|
+
"SOLID273",
|
544
|
+
"SOLID278",
|
545
|
+
"SOLID279",
|
546
|
+
"CABLE280",
|
547
|
+
"SHELL281",
|
548
|
+
"SOLID285",
|
549
|
+
"PIPE288",
|
550
|
+
"PIPE289",
|
551
|
+
"ELBOW290",
|
552
|
+
"SOLID291",
|
553
|
+
"PLANE292",
|
554
|
+
"PLANE293",
|
555
|
+
"USER300")
|
556
|
+
|
420
557
|
tokens = {
|
421
558
|
'root': [
|
422
|
-
(r'
|
559
|
+
(r'[^\S\n]+', Whitespace),
|
560
|
+
(words((elafunb+elafunc+elafund+elafune+elafunh+special), suffix=r'\b'), Keyword, 'non-keyword'),
|
561
|
+
default('non-keyword'),
|
562
|
+
],
|
563
|
+
'non-keyword': [
|
564
|
+
(r'!.*\n', Comment, '#pop'),
|
565
|
+
(r'%.*?%', Escape),
|
423
566
|
include('strings'),
|
424
|
-
include('core'),
|
425
567
|
include('nums'),
|
426
|
-
(words((elafunb+elafunc+elafund+elafune+elafunh), suffix=r'\b'), Keyword),
|
427
568
|
(words((elafunf+elafung), suffix=r'\b'), Name.Builtin),
|
569
|
+
(words((elements), suffix=r'\b'), Name.Property),
|
570
|
+
include('core'),
|
428
571
|
(r'AR[0-9]+', Name.Variable.Instance),
|
429
|
-
(r'[a-
|
430
|
-
(r'
|
572
|
+
(r'[a-z_][a-z0-9_]*', Name.Variable),
|
573
|
+
(r'\n+', Whitespace, '#pop'),
|
574
|
+
(r'[^\S\n]+', Whitespace),
|
431
575
|
],
|
432
576
|
'core': [
|
433
577
|
# Operators
|
434
|
-
(r'(
|
578
|
+
(r'(\*\*|\*|\+|-|\/|<|>|<=|>=|==|\/=|=|\(|\))', Operator),
|
435
579
|
(r'/EOF', Generic.Emph),
|
436
|
-
(r'[(),:&;]', Punctuation),
|
580
|
+
(r'[\.(),:&;]', Punctuation),
|
437
581
|
],
|
438
582
|
'strings': [
|
439
583
|
(r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
|
@@ -441,8 +585,8 @@ class apdlexer(RegexLexer):
|
|
441
585
|
(r'[$%]', String.Symbol),
|
442
586
|
],
|
443
587
|
'nums': [
|
444
|
-
(r'
|
445
|
-
(r'[+-]?\d
|
446
|
-
(r'
|
588
|
+
(r'[+-]?\d*\.\d+([efEF][-+]?\d+)?', Number.Float), # with dot
|
589
|
+
(r'([+-]?\d+([efEF][-+]?\d+))', Number.Float), # With scientific notation
|
590
|
+
(r'\b\d+(?![.ef])', Number.Integer), # integer simple
|
447
591
|
]
|
448
592
|
}
|
@@ -4,24 +4,25 @@
|
|
4
4
|
|
5
5
|
Lexers for APL.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
from pygments.lexer import RegexLexer
|
12
|
-
from pygments.token import
|
13
|
-
Number, Punctuation
|
12
|
+
from pygments.token import Comment, Operator, Keyword, Name, String, \
|
13
|
+
Number, Punctuation, Whitespace
|
14
14
|
|
15
15
|
__all__ = ['APLLexer']
|
16
16
|
|
17
17
|
|
18
18
|
class APLLexer(RegexLexer):
|
19
19
|
"""
|
20
|
-
A simple
|
20
|
+
A simple APL lexer.
|
21
21
|
|
22
22
|
.. versionadded:: 2.0
|
23
23
|
"""
|
24
24
|
name = 'APL'
|
25
|
+
url = 'https://en.m.wikipedia.org/wiki/APL_(programming_language)'
|
25
26
|
aliases = ['apl']
|
26
27
|
filenames = [
|
27
28
|
'*.apl', '*.aplf', '*.aplo', '*.apln',
|
@@ -32,7 +33,7 @@ class APLLexer(RegexLexer):
|
|
32
33
|
'root': [
|
33
34
|
# Whitespace
|
34
35
|
# ==========
|
35
|
-
(r'\s+',
|
36
|
+
(r'\s+', Whitespace),
|
36
37
|
#
|
37
38
|
# Comment
|
38
39
|
# =======
|
@@ -13,13 +13,13 @@
|
|
13
13
|
Contributed by Thomas Beale <https://github.com/wolandscat>,
|
14
14
|
<https://bitbucket.org/thomas_beale>.
|
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
|
|
20
20
|
from pygments.lexer import RegexLexer, include, bygroups, using, default
|
21
21
|
from pygments.token import Text, Comment, Name, Literal, Number, String, \
|
22
|
-
Punctuation, Keyword, Operator, Generic
|
22
|
+
Punctuation, Keyword, Operator, Generic, Whitespace
|
23
23
|
|
24
24
|
__all__ = ['OdinLexer', 'CadlLexer', 'AdlLexer']
|
25
25
|
|
@@ -34,13 +34,14 @@ class AtomsLexer(RegexLexer):
|
|
34
34
|
tokens = {
|
35
35
|
# ----- pseudo-states for inclusion -----
|
36
36
|
'whitespace': [
|
37
|
-
(r'\n',
|
38
|
-
(r'\s+',
|
39
|
-
(r'[ \t]
|
37
|
+
(r'\n', Whitespace),
|
38
|
+
(r'\s+', Whitespace),
|
39
|
+
(r'([ \t]*)(--.*)$', bygroups(Whitespace, Comment)),
|
40
40
|
],
|
41
41
|
'archetype_id': [
|
42
|
-
(r'[ \t]*([a-zA-Z]\w+(\.[a-zA-Z]\w+)*::)?[a-zA-Z]\w+(-[a-zA-Z]\w+){2}'
|
43
|
-
r'\.\w+[\w-]*\.v\d+(\.\d+){,2}((-[a-z]+)(\.\d+)?)?',
|
42
|
+
(r'([ \t]*)(([a-zA-Z]\w+(\.[a-zA-Z]\w+)*::)?[a-zA-Z]\w+(-[a-zA-Z]\w+){2}'
|
43
|
+
r'\.\w+[\w-]*\.v\d+(\.\d+){,2}((-[a-z]+)(\.\d+)?)?)',
|
44
|
+
bygroups(Whitespace, Name.Decorator)),
|
44
45
|
],
|
45
46
|
'date_constraints': [
|
46
47
|
# ISO 8601-based date/time constraints
|
@@ -107,7 +108,7 @@ class AtomsLexer(RegexLexer):
|
|
107
108
|
(r'[<>=] *', Punctuation),
|
108
109
|
# handle +/-
|
109
110
|
(r'\+/-', Punctuation),
|
110
|
-
(r'\s+',
|
111
|
+
(r'\s+', Whitespace),
|
111
112
|
],
|
112
113
|
'any_code': [
|
113
114
|
include('archetype_id'),
|
@@ -120,7 +121,7 @@ class AtomsLexer(RegexLexer):
|
|
120
121
|
(r'\|', Punctuation, 'code_rubric'),
|
121
122
|
(r'\]', Punctuation, '#pop'),
|
122
123
|
# handle use_archetype statement
|
123
|
-
(r'\s
|
124
|
+
(r'(\s*)(,)(\s*)', bygroups(Whitespace, Punctuation, Whitespace)),
|
124
125
|
],
|
125
126
|
'code_rubric': [
|
126
127
|
(r'\|', Punctuation, '#pop'),
|
@@ -153,8 +154,8 @@ class OdinLexer(AtomsLexer):
|
|
153
154
|
(r'[a-z_]\w*', Name.Class),
|
154
155
|
(r'/', Punctuation),
|
155
156
|
(r'\[', Punctuation, 'key'),
|
156
|
-
(r'\s
|
157
|
-
(r'\s+',
|
157
|
+
(r'(\s*)(,)(\s*)', bygroups(Whitespace, Punctuation, Whitespace), '#pop'),
|
158
|
+
(r'\s+', Whitespace, '#pop'),
|
158
159
|
],
|
159
160
|
'key': [
|
160
161
|
include('values'),
|
@@ -216,11 +217,11 @@ class CadlLexer(AtomsLexer):
|
|
216
217
|
('(\u2203|\u2204|\u2200|\u2227|\u2228|\u22BB|\223C)',
|
217
218
|
Operator),
|
218
219
|
# regex in slot or as string constraint
|
219
|
-
(r'(\{)(\s
|
220
|
-
bygroups(Punctuation, String.Regex, Punctuation)),
|
220
|
+
(r'(\{)(\s*)(/[^}]+/)(\s*)(\})',
|
221
|
+
bygroups(Punctuation, Whitespace, String.Regex, Whitespace, Punctuation)),
|
221
222
|
# regex in slot or as string constraint
|
222
|
-
(r'(\{)(\s
|
223
|
-
bygroups(Punctuation, String.Regex, Punctuation)),
|
223
|
+
(r'(\{)(\s*)(\^[^}]+\^)(\s*)(\})',
|
224
|
+
bygroups(Punctuation, Whitespace, String.Regex, Whitespace, Punctuation)),
|
224
225
|
(r'/', Punctuation, 'path'),
|
225
226
|
# for cardinality etc
|
226
227
|
(r'(\{)((?:\d+\.\.)?(?:\d+|\*))'
|
@@ -263,16 +264,17 @@ class AdlLexer(AtomsLexer):
|
|
263
264
|
tokens = {
|
264
265
|
'whitespace': [
|
265
266
|
# blank line ends
|
266
|
-
(r'\s*\n',
|
267
|
+
(r'\s*\n', Whitespace),
|
267
268
|
# comment-only line
|
268
|
-
(r'^[ \t]
|
269
|
+
(r'^([ \t]*)(--.*)$', bygroups(Whitespace, Comment)),
|
269
270
|
],
|
270
271
|
'odin_section': [
|
271
272
|
# repeating the following two rules from the root state enable multi-line
|
272
273
|
# strings that start in the first column to be dealt with
|
273
274
|
(r'^(language|description|ontology|terminology|annotations|'
|
274
|
-
r'component_terminologies|revision_history)[ \t]*\n',
|
275
|
-
|
275
|
+
r'component_terminologies|revision_history)([ \t]*\n)',
|
276
|
+
bygroups(Generic.Heading, Whitespace)),
|
277
|
+
(r'^(definition)([ \t]*\n)', bygroups(Generic.Heading, Whitespace), 'cadl_section'),
|
276
278
|
(r'^([ \t]*|[ \t]+.*)\n', using(OdinLexer)),
|
277
279
|
(r'^([^"]*")(>[ \t]*\n)', bygroups(String, Punctuation)),
|
278
280
|
# template overlay delimiter
|
@@ -299,7 +301,7 @@ class AdlLexer(AtomsLexer):
|
|
299
301
|
(r'\w+', Name.Class),
|
300
302
|
(r'"', String, 'string'),
|
301
303
|
(r'=', Operator),
|
302
|
-
(r'[ \t]+',
|
304
|
+
(r'[ \t]+', Whitespace),
|
303
305
|
default('#pop'),
|
304
306
|
],
|
305
307
|
'root': [
|
@@ -311,7 +313,7 @@ class AdlLexer(AtomsLexer):
|
|
311
313
|
(r'^(definition)[ \t]*\n', Generic.Heading, 'cadl_section'),
|
312
314
|
(r'^(rules)[ \t]*\n', Generic.Heading, 'rules_section'),
|
313
315
|
include('archetype_id'),
|
314
|
-
(r'[ \t]
|
316
|
+
(r'([ \t]*)(\()', bygroups(Whitespace, Punctuation), 'metadata'),
|
315
317
|
include('whitespace'),
|
316
318
|
],
|
317
319
|
}
|
@@ -4,13 +4,13 @@
|
|
4
4
|
|
5
5
|
Lexer for Arrow.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
from pygments.lexer import RegexLexer, bygroups, default, include
|
12
12
|
from pygments.token import Text, Operator, Keyword, Punctuation, Name, \
|
13
|
-
String, Number
|
13
|
+
String, Number, Whitespace
|
14
14
|
|
15
15
|
__all__ = ['ArrowLexer']
|
16
16
|
|
@@ -21,18 +21,19 @@ DECL = TYPES + r'(\s+)' + IDENT
|
|
21
21
|
|
22
22
|
class ArrowLexer(RegexLexer):
|
23
23
|
"""
|
24
|
-
Lexer for Arrow
|
24
|
+
Lexer for Arrow
|
25
25
|
|
26
26
|
.. versionadded:: 2.7
|
27
27
|
"""
|
28
28
|
|
29
29
|
name = 'Arrow'
|
30
|
+
url = 'https://pypi.org/project/py-arrow-lang/'
|
30
31
|
aliases = ['arrow']
|
31
32
|
filenames = ['*.arw']
|
32
33
|
|
33
34
|
tokens = {
|
34
35
|
'root': [
|
35
|
-
(r'\s+',
|
36
|
+
(r'\s+', Whitespace),
|
36
37
|
(r'^[|\s]+', Punctuation),
|
37
38
|
include('blocks'),
|
38
39
|
include('statements'),
|
@@ -42,8 +43,8 @@ class ArrowLexer(RegexLexer):
|
|
42
43
|
(r'(function)(\n+)(/-->)(\s*)' +
|
43
44
|
DECL + # 4 groups
|
44
45
|
r'(\()', bygroups(
|
45
|
-
Keyword.Reserved,
|
46
|
-
|
46
|
+
Keyword.Reserved, Whitespace, Punctuation,
|
47
|
+
Whitespace, Keyword.Type, Punctuation, Whitespace,
|
47
48
|
Name.Function, Punctuation
|
48
49
|
), 'fparams'),
|
49
50
|
(r'/-->$|\\-->$|/--<|\\--<|\^', Punctuation),
|
@@ -56,7 +57,7 @@ class ArrowLexer(RegexLexer):
|
|
56
57
|
(r'print', Keyword.Reserved, 'print'),
|
57
58
|
],
|
58
59
|
'expressions': [
|
59
|
-
(r'\s+',
|
60
|
+
(r'\s+', Whitespace),
|
60
61
|
(r'[0-9]+', Number.Integer),
|
61
62
|
(r'true|false', Keyword.Constant),
|
62
63
|
(r"'", String.Char, 'char'),
|
@@ -65,7 +66,7 @@ class ArrowLexer(RegexLexer):
|
|
65
66
|
(r'==|!=|<|>|\+|-|\*|/|%', Operator),
|
66
67
|
(r'and|or|not|length', Operator.Word),
|
67
68
|
(r'(input)(\s+)(int|char\[\])', bygroups(
|
68
|
-
Keyword.Reserved,
|
69
|
+
Keyword.Reserved, Whitespace, Keyword.Type
|
69
70
|
)),
|
70
71
|
(IDENT + r'(\()', bygroups(
|
71
72
|
Name.Function, Punctuation
|
@@ -81,7 +82,7 @@ class ArrowLexer(RegexLexer):
|
|
81
82
|
default('#pop'),
|
82
83
|
],
|
83
84
|
'fparams': [
|
84
|
-
(DECL, bygroups(Keyword.Type, Punctuation,
|
85
|
+
(DECL, bygroups(Keyword.Type, Punctuation, Whitespace, Name.Variable)),
|
85
86
|
(r',', Punctuation),
|
86
87
|
(r'\)', Punctuation, '#pop'),
|
87
88
|
],
|