diff options
| author | robot-piglet <[email protected]> | 2026-05-20 14:32:16 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2026-05-20 16:18:53 +0300 |
| commit | 4a4ff781d4a9d3a49658e7aa494b0683dcb73e3b (patch) | |
| tree | 7f1b851067a3043f388a9848013f47a89f14e756 /contrib/python/Pygments | |
| parent | d0fa929c8414276a05083a1e5b06f690b3c8fac0 (diff) | |
Intermediate changes
commit_hash:1f540eb64a7d0f5f2171dadb7b44f303876ddc85
Diffstat (limited to 'contrib/python/Pygments')
339 files changed, 3172 insertions, 788 deletions
diff --git a/contrib/python/Pygments/py3/.dist-info/METADATA b/contrib/python/Pygments/py3/.dist-info/METADATA index 3b102e1c8fc..2eff6a0c386 100644 --- a/contrib/python/Pygments/py3/.dist-info/METADATA +++ b/contrib/python/Pygments/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ -Metadata-Version: 2.3 +Metadata-Version: 2.4 Name: Pygments -Version: 2.18.0 +Version: 2.19.2 Summary: Pygments is a syntax highlighting package written in Python. Project-URL: Homepage, https://pygments.org Project-URL: Documentation, https://pygments.org/docs @@ -27,6 +27,7 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Text Processing :: Filters @@ -53,5 +54,5 @@ are: formats that PIL supports and ANSI sequences * it is usable as a command-line tool and as a library -Copyright 2006-2024 by the Pygments team, see ``AUTHORS``. +Copyright 2006-2025 by the Pygments team, see ``AUTHORS``. Licensed under the BSD, see ``LICENSE`` for details. diff --git a/contrib/python/Pygments/py3/AUTHORS b/contrib/python/Pygments/py3/AUTHORS index 4ec64ba1ef0..811c66ae178 100644 --- a/contrib/python/Pygments/py3/AUTHORS +++ b/contrib/python/Pygments/py3/AUTHORS @@ -42,14 +42,17 @@ Other contributors, listed alphabetically, are: * Frits van Bommel -- assembler lexers * Pierre Bourdon -- bugfixes * Martijn Braam -- Kernel log lexer, BARE lexer +* JD Browne, Google LLC -- GoogleSQL lexer * Matthias Bussonnier -- ANSI style handling for terminal-256 formatter * chebee7i -- Python traceback lexer improvements * Hiram Chirino -- Scaml and Jade lexers * Mauricio Caceres -- SAS and Stata lexers. * Michael Camilleri, John Gabriele, sogaiu -- Janet lexer +* Daren Chandisingh -- Gleam lexer * Ian Cooper -- VGL lexer * David Corbett -- Inform, Jasmin, JSGF, Snowball, and TADS 3 lexers * Leaf Corcoran -- MoonScript lexer +* Fraser Cormack -- TableGen lexer * Gabriel Corona -- ASN.1 lexer * Christopher Creutzig -- MuPAD lexer * Daniël W. Crompton -- Pike lexer @@ -69,6 +72,7 @@ Other contributors, listed alphabetically, are: * Paweł Fertyk -- GDScript lexer, HTML formatter improvements * Michael Ficarra -- CPSA lexer * James H. Fisher -- PostScript lexer +* Amanda Fitch, Google LLC -- GoogleSQL lexer * William S. Fulton -- SWIG lexer * Carlos Galdino -- Elixir and Elixir Console lexers * Michael Galloy -- IDL lexer @@ -139,6 +143,7 @@ Other contributors, listed alphabetically, are: * Jon Larimer, Google Inc. -- Smali lexer * Olov Lassus -- Dart lexer * Matt Layman -- TAP lexer +* Dan Lazin, Google LLC -- GoogleSQL lexer * Kristian Lyngstøl -- Varnish lexers * Sylvestre Ledru -- Scilab lexer * Chee Sing Lee -- Flatline lexer @@ -252,6 +257,7 @@ Other contributors, listed alphabetically, are: * Matthias Vallentin -- Bro lexer * Benoît Vinot -- AMPL lexer * Linh Vu Hong -- RSL lexer +* Taavi Väänänen -- Debian control lexer * Immanuel Washington -- Smithy lexer * Nathan Weizenbaum -- Haml and Sass lexers * Nathan Whetsell -- Csound lexers @@ -263,6 +269,7 @@ Other contributors, listed alphabetically, are: * Enrique Zamudio -- Ceylon lexer * Alex Zimin -- Nemerle lexer * Rob Zimmerman -- Kal lexer +* Evgenii Zheltonozhskii -- Maple lexer * Vincent Zurczak -- Roboconf lexer * Hubert Gruniaux -- C and C++ lexer improvements * Thomas Symalla -- AMDGPU Lexer @@ -279,5 +286,6 @@ Other contributors, listed alphabetically, are: * Nikolay Antipov -- OpenSCAD lexer * Markus Meyer, Nextron Systems -- YARA lexer * Hannes Römer -- Mojo lexer +* Jan Frederik Schaefer -- PDDL lexer Many thanks for all contributions! diff --git a/contrib/python/Pygments/py3/pygments/__init__.py b/contrib/python/Pygments/py3/pygments/__init__.py index e5a669ccbf2..2a391c3e479 100644 --- a/contrib/python/Pygments/py3/pygments/__init__.py +++ b/contrib/python/Pygments/py3/pygments/__init__.py @@ -21,12 +21,12 @@ .. _Pygments master branch: https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from io import StringIO, BytesIO -__version__ = '2.18.0' +__version__ = '2.19.2' __docformat__ = 'restructuredtext' __all__ = ['lex', 'format', 'highlight'] diff --git a/contrib/python/Pygments/py3/pygments/__main__.py b/contrib/python/Pygments/py3/pygments/__main__.py index a243531748d..4890a6c7685 100644 --- a/contrib/python/Pygments/py3/pygments/__main__.py +++ b/contrib/python/Pygments/py3/pygments/__main__.py @@ -4,7 +4,7 @@ Main entry point for ``python -m pygments``. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/cmdline.py b/contrib/python/Pygments/py3/pygments/cmdline.py index df1c3b7a466..2878fd55a79 100644 --- a/contrib/python/Pygments/py3/pygments/cmdline.py +++ b/contrib/python/Pygments/py3/pygments/cmdline.py @@ -4,7 +4,7 @@ Command line interface. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/console.py b/contrib/python/Pygments/py3/pygments/console.py index 4c1a06219ca..ee1ac27a2ff 100644 --- a/contrib/python/Pygments/py3/pygments/console.py +++ b/contrib/python/Pygments/py3/pygments/console.py @@ -4,7 +4,7 @@ Format colored console output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/filter.py b/contrib/python/Pygments/py3/pygments/filter.py index aa6f76041b6..5efff438d2b 100644 --- a/contrib/python/Pygments/py3/pygments/filter.py +++ b/contrib/python/Pygments/py3/pygments/filter.py @@ -4,7 +4,7 @@ Module that implements the default filter. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/filters/__init__.py b/contrib/python/Pygments/py3/pygments/filters/__init__.py index 86e8dacf3dd..2fed761a01e 100644 --- a/contrib/python/Pygments/py3/pygments/filters/__init__.py +++ b/contrib/python/Pygments/py3/pygments/filters/__init__.py @@ -5,7 +5,7 @@ Module containing filter lookup functions and default filters. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatter.py b/contrib/python/Pygments/py3/pygments/formatter.py index cad3b388cac..a20d3039d3d 100644 --- a/contrib/python/Pygments/py3/pygments/formatter.py +++ b/contrib/python/Pygments/py3/pygments/formatter.py @@ -4,7 +4,7 @@ Base formatter class. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/__init__.py b/contrib/python/Pygments/py3/pygments/formatters/__init__.py index 014de975f5d..b24931cd191 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/__init__.py +++ b/contrib/python/Pygments/py3/pygments/formatters/__init__.py @@ -4,7 +4,7 @@ Pygments formatters. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/bbcode.py b/contrib/python/Pygments/py3/pygments/formatters/bbcode.py index 9554081062a..339edf9dc9a 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/bbcode.py +++ b/contrib/python/Pygments/py3/pygments/formatters/bbcode.py @@ -4,7 +4,7 @@ BBcode formatter. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/groff.py b/contrib/python/Pygments/py3/pygments/formatters/groff.py index a9e071128bd..028fec4ea49 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/groff.py +++ b/contrib/python/Pygments/py3/pygments/formatters/groff.py @@ -4,7 +4,7 @@ Formatter for groff output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/html.py b/contrib/python/Pygments/py3/pygments/formatters/html.py index 3330c1d5888..4ef183681fd 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/html.py +++ b/contrib/python/Pygments/py3/pygments/formatters/html.py @@ -4,7 +4,7 @@ Formatter for HTML output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -44,7 +44,15 @@ def webify(color): if color.startswith('calc') or color.startswith('var'): return color else: - return '#' + color + # Check if the color can be shortened from 6 to 3 characters + color = color.upper() + if (len(color) == 6 and + ( color[0] == color[1] + and color[2] == color[3] + and color[4] == color[5])): + return f'#{color[0]}{color[2]}{color[4]}' + else: + return f'#{color}' def _get_ttype_class(ttype): @@ -62,7 +70,7 @@ def _get_ttype_class(ttype): CSSFILE_TEMPLATE = '''\ /* generated by Pygments <https://pygments.org/> -Copyright 2006-2024 by the Pygments team. +Copyright 2006-2025 by the Pygments team. Licensed under the BSD license, see LICENSE for details. */ %(styledefs)s @@ -73,7 +81,7 @@ DOC_HEADER = '''\ "http://www.w3.org/TR/html4/strict.dtd"> <!-- generated by Pygments <https://pygments.org/> -Copyright 2006-2024 by the Pygments team. +Copyright 2006-2025 by the Pygments team. Licensed under the BSD license, see LICENSE for details. --> <html> diff --git a/contrib/python/Pygments/py3/pygments/formatters/img.py b/contrib/python/Pygments/py3/pygments/formatters/img.py index d5c97d47b53..de4e9ffab2a 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/img.py +++ b/contrib/python/Pygments/py3/pygments/formatters/img.py @@ -4,7 +4,7 @@ Formatter for Pixmap output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os @@ -132,7 +132,8 @@ class FontManager: '/Library/Fonts/', '/System/Library/Fonts/'): font_map.update( (os.path.splitext(f)[0].lower(), os.path.join(font_dir, f)) - for f in os.listdir(font_dir) + for _, _, files in os.walk(font_dir) + for f in files if f.lower().endswith(('ttf', 'ttc'))) for name in STYLES['NORMAL']: diff --git a/contrib/python/Pygments/py3/pygments/formatters/irc.py b/contrib/python/Pygments/py3/pygments/formatters/irc.py index a1e3979beb3..d6ca0699c8c 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/irc.py +++ b/contrib/python/Pygments/py3/pygments/formatters/irc.py @@ -4,7 +4,7 @@ Formatter for IRC output - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/latex.py b/contrib/python/Pygments/py3/pygments/formatters/latex.py index 2f7971e8d30..f14234a6441 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/latex.py +++ b/contrib/python/Pygments/py3/pygments/formatters/latex.py @@ -4,7 +4,7 @@ Formatter for LaTeX fancyvrb output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/other.py b/contrib/python/Pygments/py3/pygments/formatters/other.py index 56e8f033ceb..6b0eecacb9e 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/other.py +++ b/contrib/python/Pygments/py3/pygments/formatters/other.py @@ -4,7 +4,7 @@ Other formatters: NullFormatter, RawTokenFormatter. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py b/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py index 550dabb41b0..81252094497 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py +++ b/contrib/python/Pygments/py3/pygments/formatters/pangomarkup.py @@ -4,7 +4,7 @@ Formatter for Pango markup output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/rtf.py b/contrib/python/Pygments/py3/pygments/formatters/rtf.py index 7f8b7e4cd7d..fe0968db7e5 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/rtf.py +++ b/contrib/python/Pygments/py3/pygments/formatters/rtf.py @@ -4,7 +4,7 @@ A formatter that generates RTF files. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/svg.py b/contrib/python/Pygments/py3/pygments/formatters/svg.py index 74019b69614..7a8ec9ad21a 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/svg.py +++ b/contrib/python/Pygments/py3/pygments/formatters/svg.py @@ -4,7 +4,7 @@ Formatter for SVG output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/terminal.py b/contrib/python/Pygments/py3/pygments/formatters/terminal.py index 5c38805171b..511c2008775 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/terminal.py +++ b/contrib/python/Pygments/py3/pygments/formatters/terminal.py @@ -4,7 +4,7 @@ Formatter for terminal output with ANSI sequences. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/formatters/terminal256.py b/contrib/python/Pygments/py3/pygments/formatters/terminal256.py index 6402d8c4695..2504b4ae645 100644 --- a/contrib/python/Pygments/py3/pygments/formatters/terminal256.py +++ b/contrib/python/Pygments/py3/pygments/formatters/terminal256.py @@ -10,7 +10,7 @@ Formatter version 1. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexer.py b/contrib/python/Pygments/py3/pygments/lexer.py index 3061964a7a9..453d675a325 100644 --- a/contrib/python/Pygments/py3/pygments/lexer.py +++ b/contrib/python/Pygments/py3/pygments/lexer.py @@ -4,7 +4,7 @@ Base lexer classes. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/__init__.py b/contrib/python/Pygments/py3/pygments/lexers/__init__.py index a2eaf71f22b..da5100095cd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/__init__.py +++ b/contrib/python/Pygments/py3/pygments/lexers/__init__.py @@ -4,7 +4,7 @@ Pygments lexers. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_ada_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_ada_builtins.py index 6b6a7c556f6..a2491fb38ef 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_ada_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_ada_builtins.py @@ -4,7 +4,7 @@ Ada builtins. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py index be73baf2d07..976e1bc6244 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_asy_builtins.py @@ -9,7 +9,7 @@ TODO: perl/python script in Asymptote SVN similar to asy-list.pl but only for function and variable names. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py index 1e02451caac..6e4516d6895 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_cl_builtins.py @@ -4,7 +4,7 @@ ANSI Common Lisp builtins. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py index f45b85a287a..ef0a9682fdf 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_cocoa_builtins.py @@ -7,7 +7,7 @@ File may be also used as standalone generator for above. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py index e1ea1a015c9..3431819edce 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_csound_builtins.py @@ -2,7 +2,7 @@ pygments.lexers._csound_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_css_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_css_builtins.py index 60fa564b4a3..72953195a37 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_css_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_css_builtins.py @@ -4,7 +4,7 @@ This file is autogenerated by scripts/get_css_properties.py - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_googlesql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_googlesql_builtins.py new file mode 100644 index 00000000000..13ef3a2b0c9 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/_googlesql_builtins.py @@ -0,0 +1,918 @@ +""" + pygments.lexers._googlesql_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Autogenerated data files for the GoogleSQL lexer. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +constants = [ + 'FALSE', + 'NULL', + 'TRUE', + 'UNKNOWN', +] + +# Everything below this line is auto-generated from the GoogleSQL source code. +# ---------------------------------------------------------------------------- + +functionnames = [ + 'ABS', + 'ACOS', + 'ACOSH', + 'AEAD.DECRYPT_BYTES', + 'AEAD.DECRYPT_STRING', + 'AEAD.ENCRYPT', + 'AEAD.ENVELOPE_DECRYPT_BYTES', + 'AEAD.ENVELOPE_DECRYPT_STRING', + 'AEAD.ENVELOPE_ENCRYPT', + 'ALL_DIFFERENT', + 'ANON_AVG', + 'ANON_COUNT', + 'ANON_COUNT', + 'ANON_PERCENTILE_CONT', + 'ANON_QUANTILES', + 'ANON_STDDEV_POP', + 'ANON_SUM', + 'ANON_VAR_POP', + 'ANY_VALUE', + 'APPROX_COSINE_DISTANCE', + 'APPROX_COUNT_DISTINCT', + 'APPROX_DOT_PRODUCT', + 'APPROX_EUCLIDEAN_DISTANCE', + 'APPROX_QUANTILES', + 'APPROX_TOP_COUNT', + 'APPROX_TOP_SUM', + 'ARRAY[KEY()]', + 'ARRAY[SAFE_KEY()]', + 'ARRAY_AGG', + 'ARRAY_AVG', + 'ARRAY_CONCAT', + 'ARRAY_CONCAT_AGG', + 'ARRAY_FILTER', + 'ARRAY_FIND', + 'ARRAY_FIND_ALL', + 'ARRAY_FIRST', + 'ARRAY_FIRST_N', + 'ARRAY_INCLUDES', + 'ARRAY_INCLUDES_ALL', + 'ARRAY_INCLUDES_ANY', + 'ARRAY_IS_DISTINCT', + 'ARRAY_LAST', + 'ARRAY_LAST_N', + 'ARRAY_LENGTH', + 'ARRAY_MAX', + 'ARRAY_MIN', + 'ARRAY_OFFSET', + 'ARRAY_OFFSETS', + 'ARRAY_REMOVE_FIRST_N', + 'ARRAY_REMOVE_LAST_N', + 'ARRAY_REVERSE', + 'ARRAY_SLICE', + 'ARRAY_SUM', + 'ARRAY_TO_STRING', + 'ARRAY_TRANSFORM', + 'ARRAY_ZIP', + 'ASCII', + 'ASIN', + 'ASINH', + 'ATAN', + 'ATAN2', + 'ATANH', + 'AVG', + 'BIT_AND', + 'BIT_COUNT', + 'BIT_OR', + 'BIT_XOR', + 'BOOL', + 'BOOL_ARRAY', + 'BYTE_LENGTH', + 'CASE', + 'CAST', + 'CBRT', + 'CEIL', + 'CEILING', + 'CHARACTER_LENGTH', + 'CHAR_LENGTH', + 'CHR', + 'COALESCE', + 'CODE_POINTS_TO_BYTES', + 'CODE_POINTS_TO_STRING', + 'COLLATE', + 'CONCAT', + 'CORR', + 'COS', + 'COSH', + 'COSINE_DISTANCE', + 'COT', + 'COTH', + 'COUNT', + 'COUNT(*)', + 'COUNTIF', + 'COVAR_POP', + 'COVAR_SAMP', + 'CSC', + 'CSCH', + 'CUME_DIST', + 'CURRENT_DATE', + 'CURRENT_DATETIME', + 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', + 'D3A_COUNT.EXTRACT', + 'D3A_COUNT.INIT', + 'D3A_COUNT.MERGE', + 'D3A_COUNT.MERGE_PARTIAL', + 'D3A_COUNT.TO_HLL', + 'DATE', + 'DATETIME', + 'DATETIME_ADD', + 'DATETIME_BUCKET', + 'DATETIME_DIFF', + 'DATETIME_SUB', + 'DATETIME_TRUNC', + 'DATE_ADD', + 'DATE_BUCKET', + 'DATE_DIFF', + 'DATE_FROM_UNIX_DATE', + 'DATE_SUB', + 'DATE_TRUNC', + 'DENSE_RANK', + 'DESTINATION_NODE_ID', + 'DETERMINISTIC_DECRYPT_BYTES', + 'DETERMINISTIC_DECRYPT_STRING', + 'DETERMINISTIC_ENCRYPT', + 'DIV', + 'DOT_PRODUCT', + 'EDGES', + 'EDIT_DISTANCE', + 'ELEMENTWISE_AVG', + 'ELEMENTWISE_SUM', + 'ELEMENT_DEFINITION_NAME', + 'ELEMENT_ID', + 'ENDS_WITH', + 'ENUM_VALUE_DESCRIPTOR_PROTO', + 'ERROR', + 'EUCLIDEAN_DISTANCE', + 'EXP', + 'EXTRACT', + 'EXTRACT_FOR_DP_APPROX_COUNT_DISTINCT', + 'FARM_FINGERPRINT', + 'FILTER_FIELDS', + 'FIRST_VALUE', + 'FLATTEN', + 'FLOAT32', + 'FLOAT32_ARRAY', + 'FLOAT64', + 'FLOAT64_ARRAY', + 'FLOOR', + 'FORMAT', + 'FORMAT_DATE', + 'FORMAT_DATETIME', + 'FORMAT_TIME', + 'FORMAT_TIMESTAMP', + 'FROM_BASE32', + 'FROM_BASE64', + 'FROM_HEX', + 'GENERATE_ARRAY', + 'GENERATE_DATE_ARRAY', + 'GENERATE_RANGE_ARRAY', + 'GENERATE_TIMESTAMP_ARRAY', + 'GENERATE_UUID', + 'GREATEST', + 'GROUPING', + 'HLL_COUNT.EXTRACT', + 'HLL_COUNT.INIT', + 'HLL_COUNT.MERGE', + 'HLL_COUNT.MERGE_PARTIAL', + 'IEEE_DIVIDE', + 'IF', + 'IFERROR', + 'IFNULL', + 'IN UNNEST', + 'INITCAP', + 'INIT_FOR_DP_APPROX_COUNT_DISTINCT', + 'INSTR', + 'INT64', + 'INT64_ARRAY', + 'IS DESTINATION OF', + 'IS DISTINCT FROM', + 'IS NOT DISTINCT FROM', + 'IS SOURCE OF', + 'ISERROR', + 'IS_ACYCLIC', + 'IS_INF', + 'IS_NAN', + 'IS_SIMPLE', + 'IS_TRAIL', + 'JSON_ARRAY', + 'JSON_ARRAY_APPEND', + 'JSON_ARRAY_INSERT', + 'JSON_CONTAINS', + 'JSON_EXTRACT', + 'JSON_EXTRACT_ARRAY', + 'JSON_EXTRACT_SCALAR', + 'JSON_EXTRACT_STRING_ARRAY', + 'JSON_KEYS', + 'JSON_OBJECT', + 'JSON_QUERY', + 'JSON_QUERY_ARRAY', + 'JSON_REMOVE', + 'JSON_SET', + 'JSON_STRIP_NULLS', + 'JSON_TYPE', + 'JSON_VALUE', + 'JSON_VALUE_ARRAY', + 'JUSTIFY_DAYS', + 'JUSTIFY_HOURS', + 'JUSTIFY_INTERVAL', + 'KEYS.ADD_KEY_FROM_RAW_BYTES', + 'KEYS.KEYSET_CHAIN', + 'KEYS.KEYSET_FROM_JSON', + 'KEYS.KEYSET_LENGTH', + 'KEYS.KEYSET_TO_JSON', + 'KEYS.NEW_KEYSET', + 'KEYS.NEW_WRAPPED_KEYSET', + 'KEYS.REWRAP_KEYSET', + 'KEYS.ROTATE_KEYSET', + 'KEYS.ROTATE_WRAPPED_KEYSET', + 'KLL_QUANTILES.EXTRACT_FLOAT64', + 'KLL_QUANTILES.EXTRACT_INT64', + 'KLL_QUANTILES.EXTRACT_POINT_FLOAT64', + 'KLL_QUANTILES.EXTRACT_POINT_INT64', + 'KLL_QUANTILES.INIT_FLOAT64', + 'KLL_QUANTILES.INIT_INT64', + 'KLL_QUANTILES.MERGE_FLOAT64', + 'KLL_QUANTILES.MERGE_INT64', + 'KLL_QUANTILES.MERGE_PARTIAL', + 'KLL_QUANTILES.MERGE_POINT_FLOAT64', + 'KLL_QUANTILES.MERGE_POINT_INT64', + 'L1_NORM', + 'L2_NORM', + 'LABELS', + 'LAG', + 'LAST_DAY', + 'LAST_VALUE', + 'LAX_BOOL', + 'LAX_BOOL_ARRAY', + 'LAX_FLOAT32', + 'LAX_FLOAT32_ARRAY', + 'LAX_FLOAT64', + 'LAX_FLOAT64_ARRAY', + 'LAX_INT64', + 'LAX_INT64_ARRAY', + 'LAX_STRING', + 'LAX_STRING_ARRAY', + 'LEAD', + 'LEAST', + 'LEFT', + 'LENGTH', + 'LIKE ALL', + 'LIKE ALL UNNEST', + 'LIKE ANY', + 'LIKE ANY UNNEST', + 'LN', + 'LOG', + 'LOG10', + 'LOGICAL_AND', + 'LOGICAL_OR', + 'LOWER', + 'LPAD', + 'LTRIM', + 'MAKE_INTERVAL', + 'MANHATTAN_DISTANCE', + 'MAP_CARDINALITY', + 'MAP_CONTAINS_KEY', + 'MAP_DELETE', + 'MAP_EMPTY', + 'MAP_ENTRIES_SORTED', + 'MAP_ENTRIES_UNSORTED', + 'MAP_FILTER', + 'MAP_FROM_ARRAY', + 'MAP_GET', + 'MAP_INSERT', + 'MAP_INSERT_OR_REPLACE', + 'MAP_KEYS_SORTED', + 'MAP_KEYS_UNSORTED', + 'MAP_REPLACE', + 'MAP_VALUES_SORTED', + 'MAP_VALUES_SORTED_BY_KEY', + 'MAP_VALUES_UNSORTED', + 'MAX', + 'MD5', + 'MERGE_PARTIAL_FOR_DP_APPROX_COUNT_DISTINCT', + 'MIN', + 'MOD', + 'NET.HOST', + 'NET.IPV4_FROM_INT64', + 'NET.IPV4_TO_INT64', + 'NET.IP_FROM_STRING', + 'NET.IP_NET_MASK', + 'NET.IP_TO_STRING', + 'NET.IP_TRUNC', + 'NET.PUBLIC_SUFFIX', + 'NET.REG_DOMAIN', + 'NET.SAFE_IP_FROM_STRING', + 'NEW_UUID', + 'NODES', + 'NORMALIZE', + 'NORMALIZE_AND_CASEFOLD', + 'NOT LIKE ALL', + 'NOT LIKE ALL UNNEST', + 'NOT LIKE ANY', + 'NOT LIKE ANY UNNEST', + 'NTH_VALUE', + 'NTILE', + 'NULLIF', + 'NULLIFERROR', + 'NULLIFZERO', + 'OCTET_LENGTH', + 'OFFSET', + 'ORDINAL', + 'PARSE_BIGNUMERIC', + 'PARSE_DATE', + 'PARSE_DATETIME', + 'PARSE_JSON', + 'PARSE_NUMERIC', + 'PARSE_TIME', + 'PARSE_TIMESTAMP', + 'PATH', + 'PATH_FIRST', + 'PATH_LAST', + 'PATH_LENGTH', + 'PERCENTILE_CONT', + 'PERCENTILE_DISC', + 'PERCENT_RANK', + 'PI', + 'PIVOT', + 'PI_BIGNUMERIC', + 'PI_NUMERIC', + 'POW', + 'POWER', + 'PROPERTY_EXISTS', + 'PROPERTY_NAMES', + 'PROTO_MAP_CONTAINS_KEY', + 'PROTO_MODIFY_MAP', + 'RAND', + 'RANGE', + 'RANGE_BUCKET', + 'RANGE_CONTAINS', + 'RANGE_END', + 'RANGE_INTERSECT', + 'RANGE_IS_END_UNBOUNDED', + 'RANGE_IS_START_UNBOUNDED', + 'RANGE_OVERLAPS', + 'RANGE_START', + 'RANK', + 'REGEXP_CONTAINS', + 'REGEXP_EXTRACT', + 'REGEXP_EXTRACT_ALL', + 'REGEXP_INSTR', + 'REGEXP_REPLACE', + 'REGEXP_SUBSTR', + 'REPEAT', + 'REPLACE', + 'REVERSE', + 'RIGHT', + 'ROUND', + 'ROW_NUMBER', + 'RPAD', + 'RTRIM', + 'S2_CELLIDFROMPOINT', + 'S2_COVERINGCELLIDS', + 'SAFE_ADD', + 'SAFE_CONVERT_BYTES_TO_STRING', + 'SAFE_DIVIDE', + 'SAFE_MULTIPLY', + 'SAFE_NEGATE', + 'SAFE_OFFSET', + 'SAFE_ORDINAL', + 'SAFE_SUBTRACT', + 'SAFE_TO_JSON', + 'SAME', + 'SEC', + 'SECH', + 'SESSION_USER', + 'SHA1', + 'SHA256', + 'SHA512', + 'SIGN', + 'SIN', + 'SINH', + 'SOUNDEX', + 'SOURCE_NODE_ID', + 'SPLIT', + 'SPLIT_SUBSTR', + 'SQRT', + 'STARTS_WITH', + 'STDDEV', + 'STDDEV_POP', + 'STDDEV_SAMP', + 'STRING', + 'STRING_AGG', + 'STRING_ARRAY', + 'STRPOS', + 'ST_ANGLE', + 'ST_AREA', + 'ST_ASBINARY', + 'ST_ASGEOJSON', + 'ST_ASKML', + 'ST_ASTEXT', + 'ST_AZIMUTH', + 'ST_BOUNDARY', + 'ST_BOUNDINGBOX', + 'ST_BUFFER', + 'ST_BUFFERWITHTOLERANCE', + 'ST_CENTROID', + 'ST_CENTROID_AGG', + 'ST_CLOSESTPOINT', + 'ST_CLUSTERDBSCAN', + 'ST_CONTAINS', + 'ST_CONVEXHULL', + 'ST_COVEREDBY', + 'ST_COVERS', + 'ST_DIFFERENCE', + 'ST_DIMENSION', + 'ST_DISJOINT', + 'ST_DISTANCE', + 'ST_DUMP', + 'ST_DUMPPOINTS', + 'ST_DWITHIN', + 'ST_ENDPOINT', + 'ST_EQUALS', + 'ST_EXTENT', + 'ST_EXTERIORRING', + 'ST_GEOGFROM', + 'ST_GEOGFROMGEOJSON', + 'ST_GEOGFROMKML', + 'ST_GEOGFROMTEXT', + 'ST_GEOGFROMWKB', + 'ST_GEOGPOINT', + 'ST_GEOGPOINTFROMGEOHASH', + 'ST_GEOHASH', + 'ST_GEOMETRYTYPE', + 'ST_HAUSDORFFDISTANCE', + 'ST_HAUSDORFFDWITHIN', + 'ST_INTERIORRINGS', + 'ST_INTERSECTION', + 'ST_INTERSECTS', + 'ST_INTERSECTSBOX', + 'ST_ISCLOSED', + 'ST_ISCOLLECTION', + 'ST_ISEMPTY', + 'ST_ISRING', + 'ST_LENGTH', + 'ST_LINEINTERPOLATEPOINT', + 'ST_LINELOCATEPOINT', + 'ST_LINESUBSTRING', + 'ST_MAKELINE', + 'ST_MAKEPOLYGON', + 'ST_MAKEPOLYGONORIENTED', + 'ST_MAXDISTANCE', + 'ST_NEAREST_NEIGHBORS', + 'ST_NPOINTS', + 'ST_NUMGEOMETRIES', + 'ST_NUMPOINTS', + 'ST_PERIMETER', + 'ST_POINTN', + 'ST_SIMPLIFY', + 'ST_SNAPTOGRID', + 'ST_STARTPOINT', + 'ST_TOUCHES', + 'ST_UNARYUNION', + 'ST_UNION', + 'ST_UNION_AGG', + 'ST_WITHIN', + 'ST_X', + 'ST_Y', + 'SUBSTR', + 'SUBSTRING', + 'SUM', + 'TAN', + 'TANH', + 'TIME', + 'TIMESTAMP', + 'TIMESTAMP_ADD', + 'TIMESTAMP_BUCKET', + 'TIMESTAMP_DIFF', + 'TIMESTAMP_FROM_UNIX_MICROS', + 'TIMESTAMP_FROM_UNIX_MILLIS', + 'TIMESTAMP_FROM_UNIX_SECONDS', + 'TIMESTAMP_MICROS', + 'TIMESTAMP_MILLIS', + 'TIMESTAMP_SECONDS', + 'TIMESTAMP_SUB', + 'TIMESTAMP_TRUNC', + 'TIME_ADD', + 'TIME_DIFF', + 'TIME_SUB', + 'TIME_TRUNC', + 'TO_BASE32', + 'TO_BASE64', + 'TO_CODE_POINTS', + 'TO_HEX', + 'TO_JSON', + 'TO_JSON_STRING', + 'TRANSLATE', + 'TRIM', + 'TRUNC', + 'TYPEOF', + 'UNICODE', + 'UNIX_DATE', + 'UNIX_MICROS', + 'UNIX_MILLIS', + 'UNIX_SECONDS', + 'UNNEST', + 'UNPIVOT', + 'UPPER', + 'VARIANCE', + 'VAR_POP', + 'VAR_SAMP', + 'ZEROIFNULL', +] + +keywords = [ + 'ABORT', + 'ACCESS', + 'ACTION', + 'ACYCLIC', + 'ADD', + 'AFTER', + 'AGGREGATE', + 'ALL', + 'ALTER', + 'ALWAYS', + 'ANALYZE', + 'AND', + 'ANY', + 'APPROX', + 'ARE', + 'AS', + 'ASC', + 'ASCENDING', + 'ASSERT', + 'ASSERT_ROWS_MODIFIED', + 'AT', + 'BATCH', + 'BEGIN', + 'BETWEEN', + 'BIGDECIMAL', + 'BREAK', + 'BY', + 'CALL', + 'CASCADE', + 'CASE', + 'CAST', + 'CHECK', + 'CLAMPED', + 'CLONE', + 'CLUSTER', + 'COLLATE', + 'COLUMN', + 'COLUMNS', + 'COMMIT', + 'CONFLICT', + 'CONNECTION', + 'CONSTANT', + 'CONSTRAINT', + 'CONTAINS', + 'CONTINUE', + 'COPY', + 'CORRESPONDING', + 'CREATE', + 'CROSS', + 'CUBE', + 'CURRENT', + 'CYCLE', + 'DATA', + 'DATABASE', + 'DAY', + 'DAYOFWEEK', + 'DAYOFYEAR', + 'DECIMAL', + 'DECLARE', + 'DEFAULT', + 'DEFINE', + 'DEFINER', + 'DELETE', + 'DELETION', + 'DEPTH', + 'DESC', + 'DESCENDING', + 'DESCRIBE', + 'DESCRIPTOR', + 'DESTINATION', + 'DETERMINISTIC', + 'DISTINCT', + 'DO', + 'DROP', + 'EDGE', + 'ELSE', + 'ELSEIF', + 'END', + 'ENFORCED', + 'ERROR', + 'ESCAPE', + 'EXCEPT', + 'EXCEPTION', + 'EXCLUDE', + 'EXECUTE', + 'EXISTS', + 'EXPLAIN', + 'EXPORT', + 'EXTEND', + 'EXTERNAL', + 'EXTRACT', + 'FALSE', + 'FETCH', + 'FIELD', + 'FILES', + 'FILL', + 'FILTER', + 'FIRST', + 'FOLLOWING', + 'FOR', + 'FOREIGN', + 'FORK', + 'FORMAT', + 'FRIDAY', + 'FROM', + 'FULL', + 'FUNCTION', + 'GENERATED', + 'GRANT', + 'GRAPH', + 'GRAPH_TABLE', + 'GROUP', + 'GROUPING', + 'GROUPS', + 'GROUP_ROWS', + 'HAS', + 'HASH', + 'HAVING', + 'HIDDEN', + 'HOUR', + 'IDENTITY', + 'IF', + 'IGNORE', + 'IMMEDIATE', + 'IMMUTABLE', + 'IMPORT', + 'IN', + 'INCLUDE', + 'INCREMENT', + 'INDEX', + 'INNER', + 'INOUT', + 'INPUT', + 'INSERT', + 'INTERLEAVE', + 'INTERSECT', + 'INTO', + 'INVOKER', + 'IS', + 'ISOLATION', + 'ISOWEEK ', + 'ISOYEAR', + 'ITERATE', + 'JOIN', + 'KEY', + 'LABEL', + 'LABELED', + 'LANGUAGE', + 'LAST', + 'LATERAL', + 'LEAVE', + 'LEFT', + 'LET', + 'LEVEL', + 'LIKE', + 'LIMIT', + 'LOAD', + 'LOG', + 'LOOKUP', + 'LOOP', + 'MACRO', + 'MATCH', + 'MATCHED', + 'MATCH_RECOGNIZE', + 'MATERIALIZED', + 'MAX', + 'MAXVALUE', + 'MEASURES', + 'MERGE', + 'MESSAGE', + 'METADATA', + 'MICROSECOND', + 'MILLISECOND', + 'MIN', + 'MINUTE', + 'MINVALUE', + 'MODEL', + 'MODULE', + 'MONDAY', + 'MONTH', + 'NAME', + 'NANOSECOND', + 'NATURAL', + 'NEW', + 'NEXT', + 'NO', + 'NODE', + 'NOT', + 'NOTHING', + 'NULL', + 'NULLS', + 'NULL_FILTERED', + 'OF', + 'OFFSET', + 'ON', + 'ONEOF_CASE', + 'ONLY', + 'OPTIONAL', + 'OPTIONS', + 'OR', + 'ORDER', + 'OUT', + 'OUTER', + 'OUTPUT', + 'OVER', + 'OVERWRITE', + 'PARENT', + 'PARTITION', + 'PARTITIONS', + 'PAST', + 'PATH', + 'PATHS', + 'PATTERN', + 'PERCENT', + 'PIVOT', + 'POLICIES', + 'POLICY', + 'PRECEDING', + 'PRIMARY', + 'PRIVATE', + 'PRIVILEGE', + 'PRIVILEGES', + 'PROCEDURE', + 'PROJECT', + 'PROPERTIES', + 'PROPERTY', + 'PUBLIC', + 'QUALIFY', + 'QUARTER', + 'RAISE', + 'RAW', + 'READ', + 'RECURSIVE', + 'REFERENCES', + 'REMOTE', + 'REMOVE', + 'RENAME', + 'REPEAT', + 'REPEATABLE', + 'REPLACE', + 'REPLACE_FIELDS', + 'REPLICA', + 'REPORT', + 'RESPECT', + 'RESTRICT', + 'RESTRICTION', + 'RETURN', + 'RETURNS', + 'REVOKE', + 'RIGHT', + 'ROLLBACK', + 'ROLLUP', + 'ROW', + 'ROWS', + 'RUN', + 'SAFE_CAST', + 'SATURDAY', + 'SCHEMA', + 'SEARCH', + 'SECOND ', + 'SECURITY', + 'SELECT', + 'SEQUENCE', + 'SET', + 'SETS', + 'SHORTEST', + 'SHOW', + 'SIMPLE', + 'SKIP', + 'SNAPSHOT', + 'SOME', + 'SOURCE', + 'SQL', + 'STABLE', + 'START', + 'STATIC_DESCRIBE', + 'STORED', + 'STORING', + 'STRICT', + 'SUNDAY', + 'SYSTEM', + 'SYSTEM_TIME', + 'TABLE', + 'TABLES', + 'TABLESAMPLE', + 'TARGET', + 'TEMP', + 'TEMPORARY', + 'THEN', + 'THURSDAY', + 'TO', + 'TRAIL', + 'TRANSACTION', + 'TRANSFORM', + 'TREAT', + 'TRUE', + 'TRUNCATE', + 'TUESDAY', + 'TYPE', + 'UNBOUNDED', + 'UNDROP', + 'UNION', + 'UNIQUE', + 'UNKNOWN', + 'UNNEST', + 'UNPIVOT', + 'UNTIL', + 'UPDATE', + 'USING', + 'VALUE', + 'VALUES', + 'VECTOR', + 'VIEW', + 'VIEWS', + 'VOLATILE', + 'WALK', + 'WEDNESDAY', + 'WEEK', + 'WEIGHT', + 'WHEN', + 'WHERE', + 'WHILE', + 'WINDOW', + 'WITH', + 'WITHIN', + 'WRITE', + 'YEAR', + 'ZONE', +] + +operators = [ + '!=', + '&', + '*', + '+', + '-', + '/', + '<', + '<<', + '<=', + '=', + '>', + '>=', + '>>', + '^', + '|', + '||', + '~', +] + +types = [ + 'ARRAY', + 'BIGNUMERIC', + 'BOOL', + 'BYTES', + 'DATE', + 'DATETIME', + 'DOUBLE', + 'ENUM', + 'EXTENDED', + 'FLOAT', + 'GEOGRAPHY', + 'GRAPH_ELEMENT', + 'GRAPH_PATH', + 'INT32', + 'INT64', + 'INTERVAL', + 'JSON', + 'MAP', + 'MEASURE', + 'NUMERIC', + 'PROTO', + 'RANGE', + 'STRING', + 'STRUCT', + 'TIME', + 'TIMESTAMP', + 'TIMESTAMP_PICOS', + 'TOKENLIST', + 'UINT32', + 'UINT64', + 'UUID', +] diff --git a/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py index c73a2e0ec89..2849afe58b4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_julia_builtins.py @@ -4,7 +4,7 @@ Julia builtins. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py index f4d417e67b0..a559847e361 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py @@ -4,7 +4,7 @@ Built-in Lasso types, traits, methods, and members. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py index 948c7625ad0..b00dbbfd47d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lilypond_builtins.py @@ -4,7 +4,7 @@ LilyPond builtins. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py index b46fe4f021a..e0977a0a420 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py @@ -10,7 +10,7 @@ Run with `python -I` to regenerate. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_luau_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_luau_builtins.py index 3b7dd152019..9e06b07b932 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_luau_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_luau_builtins.py @@ -4,7 +4,7 @@ Includes the builtins for Luau and Roblox. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_mapping.py b/contrib/python/Pygments/py3/pygments/lexers/_mapping.py index 0a62565d503..cfc534d40fd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_mapping.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_mapping.py @@ -93,6 +93,7 @@ LEXERS = { 'ClojureScriptLexer': ('pygments.lexers.jvm', 'ClojureScript', ('clojurescript', 'cljs'), ('*.cljs',), ('text/x-clojurescript', 'application/x-clojurescript')), 'CobolFreeformatLexer': ('pygments.lexers.business', 'COBOLFree', ('cobolfree',), ('*.cbl', '*.CBL'), ()), 'CobolLexer': ('pygments.lexers.business', 'COBOL', ('cobol',), ('*.cob', '*.COB', '*.cpy', '*.CPY'), ('text/x-cobol',)), + 'CodeQLLexer': ('pygments.lexers.codeql', 'CodeQL', ('codeql', 'ql'), ('*.ql', '*.qll'), ()), 'CoffeeScriptLexer': ('pygments.lexers.javascript', 'CoffeeScript', ('coffeescript', 'coffee-script', 'coffee'), ('*.coffee',), ('text/coffeescript',)), 'ColdfusionCFCLexer': ('pygments.lexers.templates', 'Coldfusion CFC', ('cfc',), ('*.cfc',), ()), 'ColdfusionHtmlLexer': ('pygments.lexers.templates', 'Coldfusion HTML', ('cfm',), ('*.cfm', '*.cfml'), ('application/x-coldfusion',)), @@ -127,6 +128,7 @@ LEXERS = { 'Dasm16Lexer': ('pygments.lexers.asm', 'DASM16', ('dasm16',), ('*.dasm16', '*.dasm'), ('text/x-dasm16',)), 'DaxLexer': ('pygments.lexers.dax', 'Dax', ('dax',), ('*.dax',), ()), 'DebianControlLexer': ('pygments.lexers.installers', 'Debian Control file', ('debcontrol', 'control'), ('control',), ()), + 'DebianSourcesLexer': ('pygments.lexers.installers', 'Debian Sources file', ('debian.sources',), ('*.sources',), ()), 'DelphiLexer': ('pygments.lexers.pascal', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas', '*.dpr'), ('text/x-pascal',)), 'DesktopLexer': ('pygments.lexers.configs', 'Desktop file', ('desktop',), ('*.desktop',), ('application/x-desktop',)), 'DevicetreeLexer': ('pygments.lexers.devicetree', 'Devicetree', ('devicetree', 'dts'), ('*.dts', '*.dtsi'), ('text/x-c',)), @@ -155,9 +157,9 @@ LEXERS = { 'ErbLexer': ('pygments.lexers.templates', 'ERB', ('erb',), (), ('application/x-ruby-templating',)), 'ErlangLexer': ('pygments.lexers.erlang', 'Erlang', ('erlang',), ('*.erl', '*.hrl', '*.es', '*.escript'), ('text/x-erlang',)), 'ErlangShellLexer': ('pygments.lexers.erlang', 'Erlang erl session', ('erl',), ('*.erl-sh',), ('text/x-erl-shellsession',)), - 'EvoqueHtmlLexer': ('pygments.lexers.templates', 'HTML+Evoque', ('html+evoque',), ('*.html',), ('text/html+evoque',)), + 'EvoqueHtmlLexer': ('pygments.lexers.templates', 'HTML+Evoque', ('html+evoque',), (), ('text/html+evoque',)), 'EvoqueLexer': ('pygments.lexers.templates', 'Evoque', ('evoque',), ('*.evoque',), ('application/x-evoque',)), - 'EvoqueXmlLexer': ('pygments.lexers.templates', 'XML+Evoque', ('xml+evoque',), ('*.xml',), ('application/xml+evoque',)), + 'EvoqueXmlLexer': ('pygments.lexers.templates', 'XML+Evoque', ('xml+evoque',), (), ('application/xml+evoque',)), 'ExeclineLexer': ('pygments.lexers.shell', 'execline', ('execline',), ('*.exec',), ()), 'EzhilLexer': ('pygments.lexers.ezhil', 'Ezhil', ('ezhil',), ('*.n',), ('text/x-ezhil',)), 'FSharpLexer': ('pygments.lexers.dotnet', 'F#', ('fsharp', 'f#'), ('*.fs', '*.fsi', '*.fsx'), ('text/x-fsharp',)), @@ -189,10 +191,12 @@ LEXERS = { 'GenshiTextLexer': ('pygments.lexers.templates', 'Genshi Text', ('genshitext',), (), ('application/x-genshi-text', 'text/x-genshi')), 'GettextLexer': ('pygments.lexers.textfmts', 'Gettext Catalog', ('pot', 'po'), ('*.pot', '*.po'), ('application/x-gettext', 'text/x-gettext', 'text/gettext')), 'GherkinLexer': ('pygments.lexers.testing', 'Gherkin', ('gherkin', 'cucumber'), ('*.feature',), ('text/x-gherkin',)), + 'GleamLexer': ('pygments.lexers.gleam', 'Gleam', ('gleam',), ('*.gleam',), ('text/x-gleam',)), 'GnuplotLexer': ('pygments.lexers.graphics', 'Gnuplot', ('gnuplot',), ('*.plot', '*.plt'), ('text/x-gnuplot',)), 'GoLexer': ('pygments.lexers.go', 'Go', ('go', 'golang'), ('*.go',), ('text/x-gosrc',)), 'GoloLexer': ('pygments.lexers.jvm', 'Golo', ('golo',), ('*.golo',), ()), 'GoodDataCLLexer': ('pygments.lexers.business', 'GoodData-CL', ('gooddata-cl',), ('*.gdc',), ('text/x-gooddata-cl',)), + 'GoogleSqlLexer': ('pygments.lexers.sql', 'GoogleSQL', ('googlesql', 'zetasql'), ('*.googlesql', '*.googlesql.sql'), ('text/x-google-sql', 'text/x-google-sql-aux')), 'GosuLexer': ('pygments.lexers.jvm', 'Gosu', ('gosu',), ('*.gs', '*.gsx', '*.gsp', '*.vark'), ('text/x-gosu',)), 'GosuTemplateLexer': ('pygments.lexers.jvm', 'Gosu Template', ('gst',), ('*.gst',), ('text/x-gosu-template',)), 'GraphQLLexer': ('pygments.lexers.graphql', 'GraphQL', ('graphql',), ('*.graphql',), ()), @@ -204,6 +208,7 @@ LEXERS = { 'HamlLexer': ('pygments.lexers.html', 'Haml', ('haml',), ('*.haml',), ('text/x-haml',)), 'HandlebarsHtmlLexer': ('pygments.lexers.templates', 'HTML+Handlebars', ('html+handlebars',), ('*.handlebars', '*.hbs'), ('text/html+handlebars', 'text/x-handlebars-template')), 'HandlebarsLexer': ('pygments.lexers.templates', 'Handlebars', ('handlebars',), (), ()), + 'HareLexer': ('pygments.lexers.hare', 'Hare', ('hare',), ('*.ha',), ('text/x-hare',)), 'HaskellLexer': ('pygments.lexers.haskell', 'Haskell', ('haskell', 'hs'), ('*.hs',), ('text/x-haskell',)), 'HaxeLexer': ('pygments.lexers.haxe', 'Haxe', ('haxe', 'hxsl', 'hx'), ('*.hx', '*.hxsl'), ('text/haxe', 'text/x-haxe', 'text/x-hx')), 'HexdumpLexer': ('pygments.lexers.hexdump', 'Hexdump', ('hexdump',), (), ()), @@ -246,6 +251,7 @@ LEXERS = { 'JavascriptUL4Lexer': ('pygments.lexers.ul4', 'Javascript+UL4', ('js+ul4',), ('*.jsul4',), ()), 'JclLexer': ('pygments.lexers.scripting', 'JCL', ('jcl',), ('*.jcl',), ('text/x-jcl',)), 'JsgfLexer': ('pygments.lexers.grammar_notation', 'JSGF', ('jsgf',), ('*.jsgf',), ('application/jsgf', 'application/x-jsgf', 'text/jsgf')), + 'Json5Lexer': ('pygments.lexers.json5', 'JSON5', ('json5',), ('*.json5',), ()), 'JsonBareObjectLexer': ('pygments.lexers.data', 'JSONBareObject', (), (), ()), 'JsonLdLexer': ('pygments.lexers.data', 'JSON-LD', ('jsonld', 'json-ld'), ('*.jsonld',), ('application/ld+json',)), 'JsonLexer': ('pygments.lexers.data', 'JSON', ('json', 'json-object'), ('*.json', '*.jsonl', '*.ndjson', 'Pipfile.lock'), ('application/json', 'application/json-object', 'application/x-ndjson', 'application/jsonl', 'application/json-seq')), @@ -303,6 +309,7 @@ LEXERS = { 'MakoJavascriptLexer': ('pygments.lexers.templates', 'JavaScript+Mako', ('javascript+mako', 'js+mako'), (), ('application/x-javascript+mako', 'text/x-javascript+mako', 'text/javascript+mako')), 'MakoLexer': ('pygments.lexers.templates', 'Mako', ('mako',), ('*.mao',), ('application/x-mako',)), 'MakoXmlLexer': ('pygments.lexers.templates', 'XML+Mako', ('xml+mako',), (), ('application/xml+mako',)), + 'MapleLexer': ('pygments.lexers.maple', 'Maple', ('maple',), ('*.mpl', '*.mi', '*.mm'), ('text/x-maple',)), 'MaqlLexer': ('pygments.lexers.business', 'MAQL', ('maql',), ('*.maql',), ('text/x-gooddata-maql', 'application/x-gooddata-maql')), 'MarkdownLexer': ('pygments.lexers.markup', 'Markdown', ('markdown', 'md'), ('*.md', '*.markdown'), ('text/x-markdown',)), 'MaskLexer': ('pygments.lexers.javascript', 'Mask', ('mask',), ('*.mask',), ('text/x-mask',)), @@ -354,6 +361,7 @@ LEXERS = { 'NotmuchLexer': ('pygments.lexers.textfmts', 'Notmuch', ('notmuch',), (), ()), 'NuSMVLexer': ('pygments.lexers.smv', 'NuSMV', ('nusmv',), ('*.smv',), ()), 'NumPyLexer': ('pygments.lexers.python', 'NumPy', ('numpy',), (), ()), + 'NumbaIRLexer': ('pygments.lexers.numbair', 'Numba_IR', ('numba_ir', 'numbair'), ('*.numba_ir',), ('text/x-numba_ir', 'text/x-numbair')), 'ObjdumpLexer': ('pygments.lexers.asm', 'objdump', ('objdump',), ('*.objdump',), ('text/x-objdump',)), 'ObjectiveCLexer': ('pygments.lexers.objective', 'Objective-C', ('objective-c', 'objectivec', 'obj-c', 'objc'), ('*.m', '*.h'), ('text/x-objective-c',)), 'ObjectiveCppLexer': ('pygments.lexers.objective', 'Objective-C++', ('objective-c++', 'objectivec++', 'obj-c++', 'objc++'), ('*.mm', '*.hh'), ('text/x-objective-c++',)), @@ -372,6 +380,7 @@ LEXERS = { 'PanLexer': ('pygments.lexers.dsls', 'Pan', ('pan',), ('*.pan',), ()), 'ParaSailLexer': ('pygments.lexers.parasail', 'ParaSail', ('parasail',), ('*.psi', '*.psl'), ('text/x-parasail',)), 'PawnLexer': ('pygments.lexers.pawn', 'Pawn', ('pawn',), ('*.p', '*.pwn', '*.inc'), ('text/x-pawn',)), + 'PddlLexer': ('pygments.lexers.pddl', 'PDDL', ('pddl',), ('*.pddl',), ()), 'PegLexer': ('pygments.lexers.grammar_notation', 'PEG', ('peg',), ('*.peg',), ('text/x-peg',)), 'Perl6Lexer': ('pygments.lexers.perl', 'Perl6', ('perl6', 'pl6', 'raku'), ('*.pl', '*.pm', '*.nqp', '*.p6', '*.6pl', '*.p6l', '*.pl6', '*.6pm', '*.p6m', '*.pm6', '*.t', '*.raku', '*.rakumod', '*.rakutest', '*.rakudoc'), ('text/x-perl6', 'application/x-perl6')), 'PerlLexer': ('pygments.lexers.perl', 'Perl', ('perl', 'pl'), ('*.pl', '*.pm', '*.t', '*.perl'), ('text/x-perl', 'application/x-perl')), @@ -407,7 +416,7 @@ LEXERS = { 'Python2Lexer': ('pygments.lexers.python', 'Python 2.x', ('python2', 'py2'), (), ('text/x-python2', 'application/x-python2')), 'Python2TracebackLexer': ('pygments.lexers.python', 'Python 2.x Traceback', ('py2tb',), ('*.py2tb',), ('text/x-python2-traceback',)), 'PythonConsoleLexer': ('pygments.lexers.python', 'Python console session', ('pycon', 'python-console'), (), ('text/x-python-doctest',)), - 'PythonLexer': ('pygments.lexers.python', 'Python', ('python', 'py', 'sage', 'python3', 'py3', 'bazel', 'starlark'), ('*.py', '*.pyw', '*.pyi', '*.jy', '*.sage', '*.sc', 'SConstruct', 'SConscript', '*.bzl', 'BUCK', 'BUILD', 'BUILD.bazel', 'WORKSPACE', '*.tac'), ('text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3')), + 'PythonLexer': ('pygments.lexers.python', 'Python', ('python', 'py', 'sage', 'python3', 'py3', 'bazel', 'starlark', 'pyi'), ('*.py', '*.pyw', '*.pyi', '*.jy', '*.sage', '*.sc', 'SConstruct', 'SConscript', '*.bzl', 'BUCK', 'BUILD', 'BUILD.bazel', 'WORKSPACE', '*.tac'), ('text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3')), 'PythonTracebackLexer': ('pygments.lexers.python', 'Python Traceback', ('pytb', 'py3tb'), ('*.pytb', '*.py3tb'), ('text/x-python-traceback', 'text/x-python3-traceback')), 'PythonUL4Lexer': ('pygments.lexers.ul4', 'Python+UL4', ('py+ul4',), ('*.pyul4',), ()), 'QBasicLexer': ('pygments.lexers.basic', 'QBasic', ('qbasic', 'basic'), ('*.BAS', '*.bas'), ('text/basic',)), @@ -434,6 +443,7 @@ LEXERS = { 'RedLexer': ('pygments.lexers.rebol', 'Red', ('red', 'red/system'), ('*.red', '*.reds'), ('text/x-red', 'text/x-red-system')), 'RedcodeLexer': ('pygments.lexers.esoteric', 'Redcode', ('redcode',), ('*.cw',), ()), 'RegeditLexer': ('pygments.lexers.configs', 'reg', ('registry',), ('*.reg',), ('text/x-windows-registry',)), + 'RegoLexer': ('pygments.lexers.rego', 'Rego', ('rego',), ('*.rego',), ('text/x-rego',)), 'ResourceLexer': ('pygments.lexers.resource', 'ResourceBundle', ('resourcebundle', 'resource'), (), ()), 'RexxLexer': ('pygments.lexers.scripting', 'Rexx', ('rexx', 'arexx'), ('*.rexx', '*.rex', '*.rx', '*.arexx'), ('text/x-rexx',)), 'RhtmlLexer': ('pygments.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)), @@ -501,6 +511,7 @@ LEXERS = { 'TAPLexer': ('pygments.lexers.testing', 'TAP', ('tap',), ('*.tap',), ()), 'TNTLexer': ('pygments.lexers.tnt', 'Typographic Number Theory', ('tnt',), ('*.tnt',), ()), 'TOMLLexer': ('pygments.lexers.configs', 'TOML', ('toml',), ('*.toml', 'Pipfile', 'poetry.lock'), ('application/toml',)), + 'TableGenLexer': ('pygments.lexers.tablegen', 'TableGen', ('tablegen', 'td'), ('*.td',), ()), 'TactLexer': ('pygments.lexers.tact', 'Tact', ('tact',), ('*.tact',), ()), 'Tads3Lexer': ('pygments.lexers.int_fiction', 'TADS 3', ('tads3',), ('*.t',), ()), 'TalLexer': ('pygments.lexers.tal', 'Tal', ('tal', 'uxntal'), ('*.tal',), ('text/x-uxntal',)), @@ -524,6 +535,7 @@ LEXERS = { 'TodotxtLexer': ('pygments.lexers.textfmts', 'Todotxt', ('todotxt',), ('todo.txt', '*.todotxt'), ('text/x-todo',)), 'TransactSqlLexer': ('pygments.lexers.sql', 'Transact-SQL', ('tsql', 't-sql'), ('*.sql',), ('text/x-tsql',)), 'TreetopLexer': ('pygments.lexers.parsers', 'Treetop', ('treetop',), ('*.treetop', '*.tt'), ()), + 'TsxLexer': ('pygments.lexers.jsx', 'TSX', ('tsx',), ('*.tsx',), ('text/typescript-tsx',)), 'TurtleLexer': ('pygments.lexers.rdf', 'Turtle', ('turtle',), ('*.ttl',), ('text/turtle', 'application/x-turtle')), 'TwigHtmlLexer': ('pygments.lexers.templates', 'HTML+Twig', ('html+twig',), ('*.twig',), ('text/html+twig',)), 'TwigLexer': ('pygments.lexers.templates', 'Twig', ('twig',), (), ('application/x-twig',)), @@ -556,6 +568,7 @@ LEXERS = { 'VimLexer': ('pygments.lexers.textedit', 'VimL', ('vim',), ('*.vim', '.vimrc', '.exrc', '.gvimrc', '_vimrc', '_exrc', '_gvimrc', 'vimrc', 'gvimrc'), ('text/x-vim',)), 'VisualPrologGrammarLexer': ('pygments.lexers.vip', 'Visual Prolog Grammar', ('visualprologgrammar',), ('*.vipgrm',), ()), 'VisualPrologLexer': ('pygments.lexers.vip', 'Visual Prolog', ('visualprolog',), ('*.pro', '*.cl', '*.i', '*.pack', '*.ph'), ()), + 'VueLexer': ('pygments.lexers.html', 'Vue', ('vue',), ('*.vue',), ()), 'VyperLexer': ('pygments.lexers.vyper', 'Vyper', ('vyper',), ('*.vy',), ()), 'WDiffLexer': ('pygments.lexers.diff', 'WDiff', ('wdiff',), ('*.wdiff',), ()), 'WatLexer': ('pygments.lexers.webassembly', 'WebAssembly', ('wast', 'wat'), ('*.wat', '*.wast'), ()), diff --git a/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py index ca5bfe45a0a..181c25d55b4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_mql_builtins.py @@ -4,7 +4,7 @@ Builtins for the MqlLexer. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ types = ( diff --git a/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py index 95bbe173925..d4a9099ed22 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_mysql_builtins.py @@ -6,7 +6,7 @@ Run with `python -I` to update. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py index c5e9c347413..33a1333e4d5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_openedge_builtins.py @@ -4,7 +4,7 @@ Builtin list for the OpenEdgeLexer. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py index a1f0232a1a8..19825fa2d9f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py @@ -7,7 +7,7 @@ Run with `python -I` to regenerate. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py index f29235598a9..80bc728e96f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py @@ -6,7 +6,7 @@ Run with `python -I` to update itself. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_qlik_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_qlik_builtins.py index f3af5230f23..c2fe0cf4bf6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_qlik_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_qlik_builtins.py @@ -4,7 +4,7 @@ Qlik builtins. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py index d93b9fd3bb2..c35a533d1b5 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_scheme_builtins.py @@ -4,7 +4,7 @@ Scheme builtins. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py index c4992938dbd..af49b46a8e3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_scilab_builtins.py @@ -4,7 +4,7 @@ Builtin list for the ScilabLexer. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py index 613ce708447..c98478c6f9e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_sourcemod_builtins.py @@ -8,7 +8,7 @@ Run with `python -I` to regenerate. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_sql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_sql_builtins.py new file mode 100644 index 00000000000..8b90e53e985 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/_sql_builtins.py @@ -0,0 +1,106 @@ +""" + pygments.lexers._sql_builtins + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Data files for the SQL lexer. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +KEYWORDS = ( + 'ABORT', 'ABS', 'ABSOLUTE', 'ACCESS', 'ADA', 'ADD', 'ADMIN', 'AFTER', + 'AGGREGATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALTER', 'ANALYSE', 'ANALYZE', + 'AND', 'ANY', 'ARE', 'AS', 'ASC', 'ASENSITIVE', 'ASSERTION', 'ASSIGNMENT', + 'ASYMMETRIC', 'AT', 'ATOMIC', 'AUTHORIZATION', 'AVG', 'BACKWARD', + 'BEFORE', 'BEGIN', 'BETWEEN', 'BITVAR', 'BIT_LENGTH', 'BOTH', 'BREADTH', + 'BY', 'C', 'CACHE', 'CALL', 'CALLED', 'CARDINALITY', 'CASCADE', + 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CATALOG_NAME', 'CHAIN', + 'CHARACTERISTICS', 'CHARACTER_LENGTH', 'CHARACTER_SET_CATALOG', + 'CHARACTER_SET_NAME', 'CHARACTER_SET_SCHEMA', 'CHAR_LENGTH', 'CHECK', + 'CHECKED', 'CHECKPOINT', 'CLASS', 'CLASS_ORIGIN', 'CLOB', 'CLOSE', + 'CLUSTER', 'COALESCE', 'COBOL', 'COLLATE', 'COLLATION', + 'COLLATION_CATALOG', 'COLLATION_NAME', 'COLLATION_SCHEMA', 'COLUMN', + 'COLUMN_NAME', 'COMMAND_FUNCTION', 'COMMAND_FUNCTION_CODE', 'COMMENT', + 'COMMIT', 'COMMITTED', 'COMPLETION', 'CONDITION_NUMBER', 'CONNECT', + 'CONNECTION', 'CONNECTION_NAME', 'CONSTRAINT', 'CONSTRAINTS', + 'CONSTRAINT_CATALOG', 'CONSTRAINT_NAME', 'CONSTRAINT_SCHEMA', + 'CONSTRUCTOR', 'CONTAINS', 'CONTINUE', 'CONVERSION', 'CONVERT', + 'COPY', 'CORRESPONDING', 'COUNT', 'CREATE', 'CREATEDB', 'CREATEUSER', + 'CROSS', 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', + 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', + 'CURSOR', 'CURSOR_NAME', 'CYCLE', 'DATA', 'DATABASE', + 'DATETIME_INTERVAL_CODE', 'DATETIME_INTERVAL_PRECISION', 'DAY', + 'DEALLOCATE', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFERRABLE', + 'DEFERRED', 'DEFINED', 'DEFINER', 'DELETE', 'DELIMITER', 'DELIMITERS', + 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', + 'DETERMINISTIC', 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISPATCH', + 'DISTINCT', 'DO', 'DOMAIN', 'DROP', 'DYNAMIC', 'DYNAMIC_FUNCTION', + 'DYNAMIC_FUNCTION_CODE', 'EACH', 'ELSE', 'ELSIF', 'ENCODING', + 'ENCRYPTED', 'END', 'END-EXEC', 'EQUALS', 'ESCAPE', 'EVERY', 'EXCEPTION', + 'EXCEPT', 'EXCLUDING', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTING', + 'EXISTS', 'EXPLAIN', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FINAL', + 'FIRST', 'FOR', 'FORCE', 'FOREIGN', 'FORTRAN', 'FORWARD', 'FOUND', 'FREE', + 'FREEZE', 'FROM', 'FULL', 'FUNCTION', 'G', 'GENERAL', 'GENERATED', 'GET', + 'GLOBAL', 'GO', 'GOTO', 'GRANT', 'GRANTED', 'GROUP', 'GROUPING', + 'HANDLER', 'HAVING', 'HIERARCHY', 'HOLD', 'HOST', 'IDENTITY', 'IF', + 'IGNORE', 'ILIKE', 'IMMEDIATE', 'IMMEDIATELY', 'IMMUTABLE', 'IMPLEMENTATION', 'IMPLICIT', + 'IN', 'INCLUDING', 'INCREMENT', 'INDEX', 'INDITCATOR', 'INFIX', + 'INHERITS', 'INITIALIZE', 'INITIALLY', 'INNER', 'INOUT', 'INPUT', + 'INSENSITIVE', 'INSERT', 'INSTANTIABLE', 'INSTEAD', 'INTERSECT', 'INTO', + 'INVOKER', 'IS', 'ISNULL', 'ISOLATION', 'ITERATE', 'JOIN', 'KEY', + 'KEY_MEMBER', 'KEY_TYPE', 'LANCOMPILER', 'LANGUAGE', 'LARGE', 'LAST', + 'LATERAL', 'LEADING', 'LEFT', 'LENGTH', 'LESS', 'LEVEL', 'LIKE', 'LIMIT', + 'LISTEN', 'LOAD', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATION', + 'LOCATOR', 'LOCK', 'LOWER', 'MAP', 'MATCH', 'MAX', 'MAXVALUE', + 'MESSAGE_LENGTH', 'MESSAGE_OCTET_LENGTH', 'MESSAGE_TEXT', 'METHOD', 'MIN', + 'MINUTE', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODIFY', 'MONTH', + 'MORE', 'MOVE', 'MUMPS', 'NAMES', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', + 'NEW', 'NEXT', 'NO', 'NOCREATEDB', 'NOCREATEUSER', 'NONE', 'NOT', + 'NOTHING', 'NOTIFY', 'NOTNULL', 'NULL', 'NULLABLE', 'NULLIF', 'OBJECT', + 'OCTET_LENGTH', 'OF', 'OFF', 'OFFSET', 'OIDS', 'OLD', 'ON', 'ONLY', + 'OPEN', 'OPERATION', 'OPERATOR', 'OPTION', 'OPTIONS', 'OR', 'ORDER', + 'ORDINALITY', 'OUT', 'OUTER', 'OUTPUT', 'OVERLAPS', 'OVERLAY', + 'OVERRIDING', 'OWNER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARAMETER_MODE', + 'PARAMETER_NAME', 'PARAMETER_ORDINAL_POSITION', + 'PARAMETER_SPECIFIC_CATALOG', 'PARAMETER_SPECIFIC_NAME', + 'PARAMETER_SPECIFIC_SCHEMA', 'PARTIAL', 'PASCAL', 'PENDANT', 'PERIOD', 'PLACING', + 'PLI', 'POSITION', 'POSTFIX', 'PRECEEDS', 'PRECISION', 'PREFIX', 'PREORDER', + 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURAL', + 'PROCEDURE', 'PUBLIC', 'READ', 'READS', 'RECHECK', 'RECURSIVE', 'REF', + 'REFERENCES', 'REFERENCING', 'REINDEX', 'RELATIVE', 'RENAME', + 'REPEATABLE', 'REPLACE', 'RESET', 'RESTART', 'RESTRICT', 'RESULT', + 'RETURN', 'RETURNED_LENGTH', 'RETURNED_OCTET_LENGTH', 'RETURNED_SQLSTATE', + 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', + 'ROUTINE_CATALOG', 'ROUTINE_NAME', 'ROUTINE_SCHEMA', 'ROW', 'ROWS', + 'ROW_COUNT', 'RULE', 'SAVE_POINT', 'SCALE', 'SCHEMA', 'SCHEMA_NAME', + 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECURITY', 'SELECT', 'SELF', + 'SENSITIVE', 'SERIALIZABLE', 'SERVER_NAME', 'SESSION', 'SESSION_USER', + 'SET', 'SETOF', 'SETS', 'SHARE', 'SHOW', 'SIMILAR', 'SIMPLE', 'SIZE', + 'SOME', 'SOURCE', 'SPACE', 'SPECIFIC', 'SPECIFICTYPE', 'SPECIFIC_NAME', + 'SQL', 'SQLCODE', 'SQLERROR', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNINIG', + 'STABLE', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STDIN', + 'STDOUT', 'STORAGE', 'STRICT', 'STRUCTURE', 'STYPE', 'SUBCLASS_ORIGIN', + 'SUBLIST', 'SUBSTRING', 'SUCCEEDS', 'SUM', 'SYMMETRIC', 'SYSID', 'SYSTEM', + 'SYSTEM_USER', 'TABLE', 'TABLE_NAME', ' TEMP', 'TEMPLATE', 'TEMPORARY', + 'TERMINATE', 'THAN', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', + 'TIMEZONE_MINUTE', 'TO', 'TOAST', 'TRAILING', 'TRANSACTION', + 'TRANSACTIONS_COMMITTED', 'TRANSACTIONS_ROLLED_BACK', 'TRANSACTION_ACTIVE', + 'TRANSFORM', 'TRANSFORMS', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER', + 'TRIGGER_CATALOG', 'TRIGGER_NAME', 'TRIGGER_SCHEMA', 'TRIM', 'TRUE', + 'TRUNCATE', 'TRUSTED', 'TYPE', 'UNCOMMITTED', 'UNDER', 'UNENCRYPTED', + 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLISTEN', 'UNNAMED', 'UNNEST', 'UNTIL', + 'UPDATE', 'UPPER', 'USAGE', 'USER', 'USER_DEFINED_TYPE_CATALOG', + 'USER_DEFINED_TYPE_NAME', 'USER_DEFINED_TYPE_SCHEMA', 'USING', 'VACUUM', + 'VALID', 'VALIDATOR', 'VALUES', 'VARIABLE', 'VERBOSE', + 'VERSION', 'VERSIONS', 'VERSIONING', 'VIEW', + 'VOLATILE', 'WHEN', 'WHENEVER', 'WHERE', 'WITH', 'WITHOUT', 'WORK', + 'WRITE', 'YEAR', 'ZONE' +) + +DATATYPES = ( + 'ARRAY', 'BIGINT', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'CHAR', + 'CHARACTER', 'DATE', 'DEC', 'DECIMAL', 'FLOAT', 'INT', 'INTEGER', + 'INTERVAL', 'NUMBER', 'NUMERIC', 'REAL', 'SERIAL', 'SMALLINT', + 'VARCHAR', 'VARYING', 'INT8', 'SERIAL8', 'TEXT' +) diff --git a/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py index afe31437062..8db10c32a66 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_stan_builtins.py @@ -5,7 +5,7 @@ This file contains the names of functions for Stan used by ``pygments.lexers.math.StanLexer. This is for Stan language version 2.29.0. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py index c806f50be1f..6a36f0429c7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_stata_builtins.py @@ -4,7 +4,7 @@ Builtins for Stata - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py index 1fc792bb8fb..6fa1a1f1953 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_tsql_builtins.py @@ -4,7 +4,7 @@ These are manually translated lists from https://msdn.microsoft.com. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py index ff83574afcf..b0530a209c7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_usd_builtins.py @@ -4,7 +4,7 @@ A collection of known USD-related keywords, attributes, and types. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py index fba2218e28a..b1ae0ef0265 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_vbscript_builtins.py @@ -5,7 +5,7 @@ These are manually translated lists from http://www.indusoft.com/pdf/VBScript%20Reference.pdf. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py index e1171ebbcff..abbbf993a35 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_vim_builtins.py @@ -4,7 +4,7 @@ This file is autogenerated by scripts/get_vimkw.py - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/actionscript.py b/contrib/python/Pygments/py3/pygments/lexers/actionscript.py index a23a2087e16..3a6ba42911f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/actionscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/actionscript.py @@ -4,7 +4,7 @@ Lexers for ActionScript and MXML. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ada.py b/contrib/python/Pygments/py3/pygments/lexers/ada.py index ec99c8f3a01..cb286ca7c74 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ada.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ada.py @@ -4,7 +4,7 @@ Lexers for Ada family languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/agile.py b/contrib/python/Pygments/py3/pygments/lexers/agile.py index 097beebb6bc..cb22a13bf79 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/agile.py +++ b/contrib/python/Pygments/py3/pygments/lexers/agile.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/algebra.py b/contrib/python/Pygments/py3/pygments/lexers/algebra.py index 98e1e66d6c7..a899cfea839 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/algebra.py +++ b/contrib/python/Pygments/py3/pygments/lexers/algebra.py @@ -4,7 +4,7 @@ Lexers for computer algebra systems. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -97,6 +97,7 @@ class GAPConsoleLexer(Lexer): filenames = ['*.tst'] url = 'https://www.gap-system.org' version_added = '2.14' + _example = "gap-repl/euclidean.tst" def get_tokens_unprocessed(self, text): gaplexer = GAPLexer(**self.options) diff --git a/contrib/python/Pygments/py3/pygments/lexers/ambient.py b/contrib/python/Pygments/py3/pygments/lexers/ambient.py index 4441fd574b4..3862eb0d94e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ambient.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ambient.py @@ -4,7 +4,7 @@ Lexers for AmbientTalk language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py b/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py index 6e4324533f7..c97ad617ef3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py +++ b/contrib/python/Pygments/py3/pygments/lexers/amdgpu.py @@ -4,7 +4,7 @@ Lexers for the AMDGPU ISA assembly. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ampl.py b/contrib/python/Pygments/py3/pygments/lexers/ampl.py index ce3a774672a..bc4082b1b18 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ampl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ampl.py @@ -4,7 +4,7 @@ Lexers for the AMPL language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py b/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py index 352288d642c..98beedfbe70 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py +++ b/contrib/python/Pygments/py3/pygments/lexers/apdlexer.py @@ -4,7 +4,7 @@ Lexers for ANSYS Parametric Design Language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/apl.py b/contrib/python/Pygments/py3/pygments/lexers/apl.py index d95aff36d27..a2ee3f47541 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/apl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/apl.py @@ -4,7 +4,7 @@ Lexers for APL. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/archetype.py b/contrib/python/Pygments/py3/pygments/lexers/archetype.py index b019c4f6376..47f34af9efd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/archetype.py +++ b/contrib/python/Pygments/py3/pygments/lexers/archetype.py @@ -9,7 +9,7 @@ Contributed by Thomas Beale <https://github.com/wolandscat>, <https://bitbucket.org/thomas_beale>. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/arrow.py b/contrib/python/Pygments/py3/pygments/lexers/arrow.py index 85324763054..e686cf1b66a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/arrow.py +++ b/contrib/python/Pygments/py3/pygments/lexers/arrow.py @@ -4,7 +4,7 @@ Lexer for Arrow. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/arturo.py b/contrib/python/Pygments/py3/pygments/lexers/arturo.py index 87c97378e76..82fc089836b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/arturo.py +++ b/contrib/python/Pygments/py3/pygments/lexers/arturo.py @@ -4,7 +4,7 @@ Lexer for the Arturo language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/asc.py b/contrib/python/Pygments/py3/pygments/lexers/asc.py index 971f2093e21..243c996af98 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/asc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/asc.py @@ -4,7 +4,7 @@ Lexer for various ASCII armored files. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re diff --git a/contrib/python/Pygments/py3/pygments/lexers/asm.py b/contrib/python/Pygments/py3/pygments/lexers/asm.py index a049370bd7d..74f4a5a8e44 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/asm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/asm.py @@ -4,7 +4,7 @@ Lexers for assembly languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -390,7 +390,7 @@ class LlvmLexer(RegexLexer): (r'!\d+', Name.Variable.Anonymous), (r'c?' + string, String), - (r'0[xX][a-fA-F0-9]+', Number), + (r'0[xX][KLMHR]?[a-fA-F0-9]+', Number), (r'-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?', Number), (r'[=<>{}\[\]()*.,!]|x\b', Punctuation) @@ -465,24 +465,25 @@ class LlvmLexer(RegexLexer): 'singleImpl', 'singleImplName', 'sitofp', 'sizeM1', 'sizeM1BitWidth', 'sle', 'slt', 'source_filename', 'speculatable', 'speculative_load_hardening', 'spir_func', - 'spir_kernel', 'srem', 'sret', 'ssp', 'sspreq', 'sspstrong', - 'store', 'strictfp', 'sub', 'summaries', 'summary', 'swiftcc', - 'swifterror', 'swiftself', 'switch', 'syncscope', 'tail', - 'tailcc', 'target', 'thread_local', 'to', 'token', 'triple', - 'true', 'trunc', 'type', 'typeCheckedLoadConstVCalls', - 'typeCheckedLoadVCalls', 'typeid', 'typeidCompatibleVTable', - 'typeIdInfo', 'typeTestAssumeConstVCalls', - 'typeTestAssumeVCalls', 'typeTestRes', 'typeTests', 'udiv', - 'ueq', 'uge', 'ugt', 'uitofp', 'ule', 'ult', 'umax', 'umin', - 'undef', 'une', 'uniformRetVal', 'uniqueRetVal', 'unknown', - 'unnamed_addr', 'uno', 'unordered', 'unreachable', 'unsat', - 'unwind', 'urem', 'uselistorder', 'uselistorder_bb', 'uwtable', - 'va_arg', 'varFlags', 'variable', 'vcall_visibility', - 'vFuncId', 'virtFunc', 'virtualConstProp', 'void', 'volatile', - 'vscale', 'vTableFuncs', 'weak', 'weak_odr', 'webkit_jscc', - 'win64cc', 'within', 'wpdRes', 'wpdResolutions', 'writeonly', - 'x', 'x86_64_sysvcc', 'x86_fastcallcc', 'x86_intrcc', - 'x86_mmx', 'x86_regcallcc', 'x86_stdcallcc', 'x86_thiscallcc', + 'spir_kernel', 'splat', 'srem', 'sret', 'ssp', 'sspreq', + 'sspstrong', 'store', 'strictfp', 'sub', 'summaries', + 'summary', 'swiftcc', 'swifterror', 'swiftself', 'switch', + 'syncscope', 'tail', 'tailcc', 'target', 'thread_local', 'to', + 'token', 'triple', 'true', 'trunc', 'type', + 'typeCheckedLoadConstVCalls', 'typeCheckedLoadVCalls', + 'typeid', 'typeidCompatibleVTable', 'typeIdInfo', + 'typeTestAssumeConstVCalls', 'typeTestAssumeVCalls', + 'typeTestRes', 'typeTests', 'udiv', 'ueq', 'uge', 'ugt', + 'uitofp', 'ule', 'ult', 'umax', 'umin', 'undef', 'une', + 'uniformRetVal', 'uniqueRetVal', 'unknown', 'unnamed_addr', + 'uno', 'unordered', 'unreachable', 'unsat', 'unwind', 'urem', + 'uselistorder', 'uselistorder_bb', 'uwtable', 'va_arg', + 'varFlags', 'variable', 'vcall_visibility', 'vFuncId', + 'virtFunc', 'virtualConstProp', 'void', 'volatile', 'vscale', + 'vTableFuncs', 'weak', 'weak_odr', 'webkit_jscc', 'win64cc', + 'within', 'wpdRes', 'wpdResolutions', 'writeonly', 'x', + 'x86_64_sysvcc', 'x86_fastcallcc', 'x86_intrcc', 'x86_mmx', + 'x86_regcallcc', 'x86_stdcallcc', 'x86_thiscallcc', 'x86_vectorcallcc', 'xchg', 'xor', 'zeroext', 'zeroinitializer', 'zext', 'immarg', 'willreturn'), suffix=r'\b'), Keyword), diff --git a/contrib/python/Pygments/py3/pygments/lexers/asn1.py b/contrib/python/Pygments/py3/pygments/lexers/asn1.py index 8aa23646d9d..6c7861bdb68 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/asn1.py +++ b/contrib/python/Pygments/py3/pygments/lexers/asn1.py @@ -4,7 +4,7 @@ Pygments lexers for ASN.1. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/automation.py b/contrib/python/Pygments/py3/pygments/lexers/automation.py index e64aa9ae88a..4e9c678114f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/automation.py +++ b/contrib/python/Pygments/py3/pygments/lexers/automation.py @@ -4,7 +4,7 @@ Lexers for automation scripting languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/bare.py b/contrib/python/Pygments/py3/pygments/lexers/bare.py index 9049ea84678..d7167dc419f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bare.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bare.py @@ -4,7 +4,7 @@ Lexer for the BARE schema. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/basic.py b/contrib/python/Pygments/py3/pygments/lexers/basic.py index 9cfdf462282..7c9123de7b1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/basic.py +++ b/contrib/python/Pygments/py3/pygments/lexers/basic.py @@ -4,7 +4,7 @@ Lexers for BASIC like languages (other than VB.net). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/bdd.py b/contrib/python/Pygments/py3/pygments/lexers/bdd.py index 01688d572c1..6ddb6056d4b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bdd.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bdd.py @@ -4,7 +4,7 @@ Lexer for BDD(Behavior-driven development). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/berry.py b/contrib/python/Pygments/py3/pygments/lexers/berry.py index 873b7234786..5f772b1add6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/berry.py +++ b/contrib/python/Pygments/py3/pygments/lexers/berry.py @@ -4,7 +4,7 @@ Lexer for Berry. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/bibtex.py b/contrib/python/Pygments/py3/pygments/lexers/bibtex.py index 15e4e04fcb5..32cc40ae7d6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bibtex.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bibtex.py @@ -4,7 +4,7 @@ Lexers for BibTeX bibliography data and styles - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/blueprint.py b/contrib/python/Pygments/py3/pygments/lexers/blueprint.py index b199c42fd3c..59f9c42a468 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/blueprint.py +++ b/contrib/python/Pygments/py3/pygments/lexers/blueprint.py @@ -4,7 +4,7 @@ Lexer for the Blueprint UI markup language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/boa.py b/contrib/python/Pygments/py3/pygments/lexers/boa.py index 211f9fd0a1a..6f4e8cdaf78 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/boa.py +++ b/contrib/python/Pygments/py3/pygments/lexers/boa.py @@ -4,7 +4,7 @@ Lexers for the Boa language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/bqn.py b/contrib/python/Pygments/py3/pygments/lexers/bqn.py index b0794ee03d2..083f69b61de 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/bqn.py +++ b/contrib/python/Pygments/py3/pygments/lexers/bqn.py @@ -4,7 +4,7 @@ Lexer for BQN. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -26,6 +26,10 @@ class BQNLexer(RegexLexer): mimetypes = [] version_added = '2.16' + # An inter_word_char. Necessary because \w matches all alphanumeric + # Unicode characters, including ones (e.g., 𝕊) that BQN treats special. + _iwc = r'((?=[^𝕎𝕏𝔽𝔾𝕊𝕨𝕩𝕗𝕘𝕤𝕣])\w)' + tokens = { 'root': [ # Whitespace @@ -57,34 +61,35 @@ class BQNLexer(RegexLexer): # =================== # Since this token type is important in BQN, it is not included in # the punctuation token type but rather in the following one - (r'[\(\)]', String.Regex), + (r'[\(\)]', String.Regex), # # Numbers # ======= # Includes the numeric literals and the Nothing character - (r'¯?([0-9]+\.?[0-9]+|[0-9]+)([Ee][¯]?[0-9]+)?|¯|∞|π|·', Number), + (r'¯?[0-9](([0-9]|_)*\.?([0-9]|_)+|([0-9]|_)*)([Ee][¯]?([0-9]|_)+)?|¯|∞|π|·', Number), # # Variables # ========= - (r'\b[a-z]\w*\b', Name.Variable), - # - # 1-Modifiers - # =========== - (r'[˙˜˘¨⌜⁼´˝`𝕣]', Name.Attribute), - (r'\b_[a-zA-Z0-9]+\b', Name.Attribute), + (r'[a-z]' + _iwc + r'*', Name.Variable), # # 2-Modifiers # =========== + # Needs to come before the 1-modifiers due to _𝕣 and _𝕣_ (r'[∘○⊸⟜⌾⊘◶⎉⚇⍟⎊]', Name.Property), - (r'\b_[a-zA-Z0-9]+_\b', Name.Property), + (r'_(𝕣|[a-zA-Z0-9]+)_', Name.Property), + # + # 1-Modifiers + # =========== + (r'[˙˜˘¨⌜⁼´˝`𝕣]', Name.Attribute), + (r'_(𝕣|[a-zA-Z0-9]+)', Name.Attribute), # # Functions # ========= # The monadic or dyadic function primitives and function # operands and arguments, along with function self-reference - (r'[+\-×÷\*√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!𝕎𝕏𝔽𝔾𝕊]', + (r'[+\-×÷\⋆√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!𝕎𝕏𝔽𝔾𝕊]', Operator), - (r'[A-Z]\w*|•\w+\b', Operator), + (r'[A-Z]' + _iwc + r'*|•' + _iwc + r'+', Operator), # # Constant # ======== @@ -102,8 +107,6 @@ class BQNLexer(RegexLexer): # ================ (r'[;:?𝕨𝕩𝕗𝕘𝕤]', Name.Entity), # - + ], } - - diff --git a/contrib/python/Pygments/py3/pygments/lexers/business.py b/contrib/python/Pygments/py3/pygments/lexers/business.py index 3d81df54d1d..73adb87096b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/business.py +++ b/contrib/python/Pygments/py3/pygments/lexers/business.py @@ -4,7 +4,7 @@ Lexers for "business-oriented" languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py b/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py index 0f83b719357..399f2bc4f22 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py +++ b/contrib/python/Pygments/py3/pygments/lexers/c_cpp.py @@ -4,7 +4,7 @@ Lexers for C/C++ languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/c_like.py b/contrib/python/Pygments/py3/pygments/lexers/c_like.py index f5073c74ae3..1ba269e829b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/c_like.py +++ b/contrib/python/Pygments/py3/pygments/lexers/c_like.py @@ -4,7 +4,7 @@ Lexers for other C-like languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/capnproto.py b/contrib/python/Pygments/py3/pygments/lexers/capnproto.py index 48e3c51b462..333760e15d7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/capnproto.py +++ b/contrib/python/Pygments/py3/pygments/lexers/capnproto.py @@ -4,7 +4,7 @@ Lexers for the Cap'n Proto schema language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/carbon.py b/contrib/python/Pygments/py3/pygments/lexers/carbon.py index c4e71d9c748..702b37bc8d1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/carbon.py +++ b/contrib/python/Pygments/py3/pygments/lexers/carbon.py @@ -4,7 +4,7 @@ Lexers for the Carbon programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re diff --git a/contrib/python/Pygments/py3/pygments/lexers/cddl.py b/contrib/python/Pygments/py3/pygments/lexers/cddl.py index 18e3b03e713..fa0c85f10b0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/cddl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/cddl.py @@ -8,7 +8,7 @@ More information: https://datatracker.ietf.org/doc/rfc8610/ - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/chapel.py b/contrib/python/Pygments/py3/pygments/lexers/chapel.py index 8caea3506b2..955a1579a96 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/chapel.py +++ b/contrib/python/Pygments/py3/pygments/lexers/chapel.py @@ -4,7 +4,7 @@ Lexer for the Chapel language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/clean.py b/contrib/python/Pygments/py3/pygments/lexers/clean.py index 119110be986..f96e7437376 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/clean.py +++ b/contrib/python/Pygments/py3/pygments/lexers/clean.py @@ -4,7 +4,7 @@ Lexer for the Clean language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/codeql.py b/contrib/python/Pygments/py3/pygments/lexers/codeql.py new file mode 100644 index 00000000000..3d06bec6c80 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/codeql.py @@ -0,0 +1,80 @@ +""" + pygments.lexers.codeql + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for CodeQL query language. + + The grammar is originating from: + https://github.com/github/vscode-codeql/blob/main/syntaxes/README.md + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +__all__ = ['CodeQLLexer'] + +import re + +from pygments.lexer import RegexLexer, words +from pygments.token import Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +class CodeQLLexer(RegexLexer): + name = 'CodeQL' + aliases = ['codeql', 'ql'] + filenames = ['*.ql', '*.qll'] + mimetypes = [] + url = 'https://github.com/github/codeql' + version_added = '2.19' + + flags = re.MULTILINE | re.UNICODE + + tokens = { + 'root': [ + # Whitespace and comments + (r'\s+', Whitespace), + (r'//.*?\n', Comment.Single), + (r'/\*', Comment.Multiline, 'multiline-comments'), + + # Keywords + (words(( + 'module', 'import', 'class', 'extends', 'implements', + 'predicate', 'select', 'where', 'from', 'as', 'and', 'or', 'not', + 'in', 'if', 'then', 'else', 'exists', 'forall', 'instanceof', + 'private', 'predicate', 'abstract', 'cached', 'external', + 'final', 'library', 'override', 'query' + ), suffix=r'\b'), Keyword.Builtin), + + # Special Keywords + (words(('this'), # class related keywords + prefix=r'\b', suffix=r'\b\??:?'), Name.Builtin.Pseudo), + + # Types + (words(( + 'boolean', 'date', 'float', 'int', 'string' + ), suffix=r'\b'), Keyword.Type), + + # Literals + (r'"(\\\\|\\[^\\]|[^"\\])*"', String), + (r'[0-9]+\.[0-9]+', Number.Float), + (r'[0-9]+', Number.Integer), + + # Operators + (r'<=|>=|<|>|=|!=|\+|-|\*|/', Operator), + + # Punctuation + (r'[.,;:\[\]{}()]+', Punctuation), + + # Identifiers + (r'@[a-zA-Z_]\w*', Name.Variable), # Variables with @ prefix + (r'[A-Z][a-zA-Z0-9_]*', Name.Class), # Types and classes + (r'[a-z][a-zA-Z0-9_]*', Name.Variable), # Variables and predicates + ], + 'multiline-comments': [ + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline), + ], + + }
\ No newline at end of file diff --git a/contrib/python/Pygments/py3/pygments/lexers/comal.py b/contrib/python/Pygments/py3/pygments/lexers/comal.py index 4344ba32eca..3c89a59eaa9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/comal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/comal.py @@ -4,7 +4,7 @@ Lexer for COMAL-80. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/compiled.py b/contrib/python/Pygments/py3/pygments/lexers/compiled.py index 57e52df0ca6..5e0cc188c7f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/compiled.py +++ b/contrib/python/Pygments/py3/pygments/lexers/compiled.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/configs.py b/contrib/python/Pygments/py3/pygments/lexers/configs.py index 4b52873c66f..5e7f47b6dda 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/configs.py +++ b/contrib/python/Pygments/py3/pygments/lexers/configs.py @@ -4,7 +4,7 @@ Lexers for configuration file formats. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -44,15 +44,24 @@ class IniLexer(RegexLexer): (r'\s+', Whitespace), (r'[;#].*', Comment.Single), (r'(\[.*?\])([ \t]*)$', bygroups(Keyword, Whitespace)), - (r'(.*?)([ \t]*)([=:])([ \t]*)([^;#\n]*)(\\)(\s+)', + (r'''(.*?)([ \t]*)([=:])([ \t]*)(["'])''', + bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String), + "quoted_value"), + (r'(.*?)([ \t]*)([=:])([ \t]*)([^;#\n]*)(\\)(\s+)', bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String, Text, Whitespace), "value"), - (r'(.*?)([ \t]*)([=:])([ \t]*)([^ ;#\n]*(?: +[^ ;#\n]+)*)', + (r'(.*?)([ \t]*)([=:])([ \t]*)([^ ;#\n]*(?: +[^ ;#\n]+)*)', bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String)), # standalone option, supported by some INI parsers (r'(.+?)$', Name.Attribute), ], + 'quoted_value': [ + (r'''([^"'\n]*)(["'])(\s*)''', + bygroups(String, String, Whitespace), "#pop"), + (r'[;#].*', Comment.Single), + (r'$', String, "#pop"), + ], 'value': [ # line continuation (r'\s+', Whitespace), (r'(\s*)(.*)(\\)([ \t]*)', diff --git a/contrib/python/Pygments/py3/pygments/lexers/console.py b/contrib/python/Pygments/py3/pygments/lexers/console.py index b9f24745ec0..d66cbaa957d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/console.py +++ b/contrib/python/Pygments/py3/pygments/lexers/console.py @@ -4,7 +4,7 @@ Lexers for misc console output. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/cplint.py b/contrib/python/Pygments/py3/pygments/lexers/cplint.py index 39b0a96e321..f8424252e64 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/cplint.py +++ b/contrib/python/Pygments/py3/pygments/lexers/cplint.py @@ -4,7 +4,7 @@ Lexer for the cplint language - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/crystal.py b/contrib/python/Pygments/py3/pygments/lexers/crystal.py index 6656815ab8a..f5da4f84c49 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/crystal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/crystal.py @@ -4,7 +4,7 @@ Lexer for Crystal. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/csound.py b/contrib/python/Pygments/py3/pygments/lexers/csound.py index 415fac3ef78..403b66f9611 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/csound.py +++ b/contrib/python/Pygments/py3/pygments/lexers/csound.py @@ -4,7 +4,7 @@ Lexers for Csound languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/css.py b/contrib/python/Pygments/py3/pygments/lexers/css.py index fb7936b82ef..97897db65c3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/css.py +++ b/contrib/python/Pygments/py3/pygments/lexers/css.py @@ -4,7 +4,7 @@ Lexers for CSS and related stylesheet formats. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -96,7 +96,7 @@ _keyword_values = ( 'padding-box', 'page', 'pan-down', 'pan-left', 'pan-right', 'pan-up', 'pan-x', 'pan-y', 'paused', 'petite-caps', 'pixelated', 'pointer', 'preserve-3d', 'progress', 'proximity', 'relative', 'repeat', - 'repeat no-repeat', 'repeat-x', 'repeat-y', 'reverse', 'ridge', 'right', + 'repeat no-repeat', 'repeat-x', 'repeat-y', 'reverse', 'revert', 'ridge', 'right', 'round', 'row', 'row-resize', 'row-reverse', 'rtl', 'ruby', 'ruby-base', 'ruby-base-container', 'ruby-text', 'ruby-text-container', 'run-in', 'running', 's-resize', 'sans-serif', 'saturation', 'scale-down', 'screen', diff --git a/contrib/python/Pygments/py3/pygments/lexers/d.py b/contrib/python/Pygments/py3/pygments/lexers/d.py index 58c53b71377..a0b56e9ca73 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/d.py +++ b/contrib/python/Pygments/py3/pygments/lexers/d.py @@ -4,7 +4,7 @@ Lexers for D languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/dalvik.py b/contrib/python/Pygments/py3/pygments/lexers/dalvik.py index df854f1faaa..1ac332bfa21 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dalvik.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dalvik.py @@ -4,7 +4,7 @@ Pygments lexers for Dalvik VM-related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/data.py b/contrib/python/Pygments/py3/pygments/lexers/data.py index 8f384bc356b..f4320325274 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/data.py +++ b/contrib/python/Pygments/py3/pygments/lexers/data.py @@ -4,7 +4,7 @@ Lexers for data file format. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/dax.py b/contrib/python/Pygments/py3/pygments/lexers/dax.py index aec4c4f6663..9c333947ea3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dax.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dax.py @@ -4,7 +4,7 @@ Lexer for LilyPond. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/devicetree.py b/contrib/python/Pygments/py3/pygments/lexers/devicetree.py index 903eda93dcc..a9b0b7aa409 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/devicetree.py +++ b/contrib/python/Pygments/py3/pygments/lexers/devicetree.py @@ -4,7 +4,7 @@ Lexers for Devicetree language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/diff.py b/contrib/python/Pygments/py3/pygments/lexers/diff.py index 4b260da876e..ed7007f5b17 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/diff.py +++ b/contrib/python/Pygments/py3/pygments/lexers/diff.py @@ -4,7 +4,7 @@ Lexers for diff/patch formats. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/dns.py b/contrib/python/Pygments/py3/pygments/lexers/dns.py index d0f98d032e8..3fb91f571fb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dns.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dns.py @@ -4,7 +4,7 @@ Pygments lexers for DNS - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py index 17097c75da5..2254a8b2ee9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py @@ -4,7 +4,7 @@ Lexers for .net languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re @@ -74,6 +74,7 @@ class CSharpLexer(RegexLexer): for levelname, cs_ident in levels.items(): tokens[levelname] = { 'root': [ + include('numbers'), # method names (r'^([ \t]*)((?:' + cs_ident + r'(?:\[\])?\s+)+?)' # return type r'(' + cs_ident + ')' # method name @@ -106,18 +107,29 @@ class CSharpLexer(RegexLexer): Comment.Preproc, Whitespace)), (r'\b(extern)(\s+)(alias)\b', bygroups(Keyword, Whitespace, Keyword)), - (r'(abstract|as|async|await|base|break|by|case|catch|' - r'checked|const|continue|default|delegate|' - r'do|else|enum|event|explicit|extern|false|finally|' - r'fixed|for|foreach|goto|if|implicit|in|interface|' - r'internal|is|let|lock|new|null|on|operator|' - r'out|override|params|private|protected|public|readonly|' - r'ref|return|sealed|sizeof|stackalloc|static|' - r'switch|this|throw|true|try|typeof|' - r'unchecked|unsafe|virtual|void|while|' - r'get|set|new|partial|yield|add|remove|value|alias|ascending|' - r'descending|from|group|into|orderby|select|thenby|where|' - r'join|equals)\b', Keyword), + (words(( + 'abstract', 'as', 'async', 'await', 'base', 'break', 'by', + 'case', 'catch', 'checked', 'const', 'continue', 'default', + 'delegate', 'do', 'else', 'enum', 'event', 'explicit', + 'extern', 'false', 'finally', 'fixed', 'for', 'foreach', + 'goto', 'if', 'implicit', 'in', 'interface', 'internal', + 'is', 'let', 'lock', 'new', 'null', 'on', 'operator', + 'out', 'override', 'params', 'private', 'protected', + 'public', 'readonly', 'ref', 'return', 'sealed', 'sizeof', + 'stackalloc', 'static', 'switch', 'this', 'throw', 'true', + 'try', 'typeof', 'unchecked', 'unsafe', 'virtual', 'void', + 'while', 'get', 'set', 'new', 'partial', 'yield', 'add', + 'remove', 'value', 'alias', 'ascending', 'descending', + 'from', 'group', 'into', 'orderby', 'select', 'thenby', + 'where', 'join', 'equals', 'record', 'allows', + 'and', 'init', 'managed', 'nameof', 'nint', 'not', + 'notnull', 'nuint', 'or', 'scoped', 'unmanaged', 'when', + 'with' + ), suffix=r'\b'), Keyword), + # version 1: assumes that 'file' is the only contextual keyword + # that is a class modifier + (r'(file)(\s+)(record|class|abstract|enum|new|sealed|static)\b', + bygroups(Keyword, Whitespace, Keyword)), (r'(global)(::)', bygroups(Keyword, Punctuation)), (r'(bool|byte|char|decimal|double|dynamic|float|int|long|object|' r'sbyte|short|string|uint|ulong|ushort|var)\b\??', Keyword.Type), @@ -125,6 +137,21 @@ class CSharpLexer(RegexLexer): (r'(namespace|using)(\s+)', bygroups(Keyword, Whitespace), 'namespace'), (cs_ident, Name), ], + 'numbers_int': [ + (r"0[xX][0-9a-fA-F]+(([uU][lL]?)|[lL][uU]?)?", Number.Hex), + (r"0[bB][01]+(([uU][lL]?)|[lL][uU]?)?", Number.Bin), + (r"[0-9]+(([uU][lL]?)|[lL][uU]?)?", Number.Integer), + ], + 'numbers_float': [ + (r"([0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fFdDmM]?)|" + r"(\.[0-9]+([eE][+-]?[0-9]+)?[fFdDmM]?)|" + r"([0-9]+([eE][+-]?[0-9]+)[fFdDmM]?)|" + r"([0-9]+[fFdDmM])", Number.Float), + ], + 'numbers': [ + include('numbers_float'), + include('numbers_int'), + ], 'class': [ (cs_ident, Name.Class, '#pop'), default('#pop'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/dsls.py b/contrib/python/Pygments/py3/pygments/lexers/dsls.py index 35dfda9a382..d30c11249ef 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dsls.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dsls.py @@ -4,7 +4,7 @@ Lexers for various domain-specific languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/dylan.py b/contrib/python/Pygments/py3/pygments/lexers/dylan.py index 8cd0d624df9..2109bd52c8f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/dylan.py +++ b/contrib/python/Pygments/py3/pygments/lexers/dylan.py @@ -4,7 +4,7 @@ Lexers for the Dylan language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -242,7 +242,7 @@ class DylanConsoleLexer(Lexer): """ For Dylan interactive console output. - This is based on a copy of the RubyConsoleLexer. + This is based on a copy of the ``RubyConsoleLexer``. """ name = 'Dylan session' aliases = ['dylan-console', 'dylan-repl'] @@ -250,7 +250,7 @@ class DylanConsoleLexer(Lexer): mimetypes = ['text/x-dylan-console'] url = 'http://www.opendylan.org/' version_added = '1.6' - _example = 'dylan-console/console' + _example = 'dylan-console/console.dylan-console' _prompt_re = re.compile(r'\?| ') diff --git a/contrib/python/Pygments/py3/pygments/lexers/ecl.py b/contrib/python/Pygments/py3/pygments/lexers/ecl.py index e7b4aaa7d0a..f1ee3bf176d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ecl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ecl.py @@ -4,7 +4,7 @@ Lexers for the ECL language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/eiffel.py b/contrib/python/Pygments/py3/pygments/lexers/eiffel.py index a3adb3e62f9..691c718736d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/eiffel.py +++ b/contrib/python/Pygments/py3/pygments/lexers/eiffel.py @@ -4,7 +4,7 @@ Lexer for the Eiffel language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/elm.py b/contrib/python/Pygments/py3/pygments/lexers/elm.py index 0a8939ba2e1..cebbbf00295 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/elm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/elm.py @@ -4,7 +4,7 @@ Lexer for the Elm programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/elpi.py b/contrib/python/Pygments/py3/pygments/lexers/elpi.py index 5efaffa874a..5e4b1e5a0ed 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/elpi.py +++ b/contrib/python/Pygments/py3/pygments/lexers/elpi.py @@ -4,16 +4,17 @@ Lexer for the `Elpi <http://github.com/LPCIC/elpi>`_ programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ -from pygments.lexer import RegexLexer, bygroups, include +from pygments.lexer import RegexLexer, bygroups, include, using from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation __all__ = ['ElpiLexer'] +from pygments.lexers.theorem import CoqLexer class ElpiLexer(RegexLexer): """ @@ -51,7 +52,7 @@ class ElpiLexer(RegexLexer): (r"(:before|:after|:if|:name)(\s*)(\")", bygroups(Keyword.Mode, Text.Whitespace, String.Double), 'elpi-string'), - (r"(:index)(\s*\()", bygroups(Keyword.Mode, Text.Whitespace), + (r"(:index)(\s*)(\()", bygroups(Keyword.Mode, Text.Whitespace, Punctuation), 'elpi-indexing-expr'), (rf"\b(external pred|pred)(\s+)({const_sym_re})", bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), @@ -65,6 +66,9 @@ class ElpiLexer(RegexLexer): (rf"\b(typeabbrev)(\s+)({const_sym_re})", bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), 'elpi-type'), + (r"\b(typeabbrev)(\s+)(\([^)]+\))", + bygroups(Keyword.Declaration, Text.Whitespace, Name.Function), + 'elpi-type'), (r"\b(accumulate)(\s+)(\")", bygroups(Keyword.Declaration, Text.Whitespace, String.Double), 'elpi-string'), @@ -79,7 +83,7 @@ class ElpiLexer(RegexLexer): 'elpi-chr-rule-start'), (rf"(?=[A-Z_]){constant_re}", Name.Variable), - (rf"(?=[a-z_]){constant_re}\\", Name.Variable), + (rf"(?=[a-z_])({constant_re}|_)\\", Name.Variable), (r"_", Name.Variable), (rf"({symbol_re}|!|=>|;)", Keyword.Declaration), (constant_re, Text), @@ -89,23 +93,19 @@ class ElpiLexer(RegexLexer): (r'\'', String.Double, 'elpi-tick'), (r'\{\{', Punctuation, 'elpi-quote'), (r'\{[^\{]', Text, 'elpi-spill'), - (r"\(", Text, 'elpi-in-parens'), + (r"\(", Punctuation, 'elpi-in-parens'), (r'\d[\d_]*', Number.Integer), (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), (r"[\+\*\-/\^\.]", Operator), ], '_elpi-comment': [ (r'%[^\n]*\n', Comment), - (r'/\*', Comment, 'elpi-multiline-comment'), + (r'/(?:\\\n)?[*](?:[^*]|[*](?!(?:\\\n)?/))*[*](?:\\\n)?/', Comment), (r"\s+", Text.Whitespace), ], - 'elpi-multiline-comment': [ - (r'\*/', Comment, '#pop'), - (r'.', Comment) - ], 'elpi-indexing-expr':[ (r'[0-9 _]+', Number.Integer), - (r'\)', Text, '#pop'), + (r'\)', Punctuation, '#pop'), ], 'elpi-type': [ (r"(ctype\s+)(\")", bygroups(Keyword.Type, String.Double), 'elpi-string'), @@ -116,13 +116,13 @@ class ElpiLexer(RegexLexer): include('_elpi-comment'), ], 'elpi-chr-rule-start': [ - (r"\{", Text, 'elpi-chr-rule'), + (r"\{", Punctuation, 'elpi-chr-rule'), include('_elpi-comment'), ], 'elpi-chr-rule': [ (r"\brule\b", Keyword.Declaration), (r"\\", Keyword.Declaration), - (r"\}", Text, '#pop:2'), + (r"\}", Punctuation, '#pop:2'), include('elpi'), ], 'elpi-pred-item': [ @@ -152,11 +152,15 @@ class ElpiLexer(RegexLexer): (r'"', String.Double, '#pop'), ], 'elpi-quote': [ - (r'\{\{', Punctuation, '#push'), (r'\}\}', Punctuation, '#pop'), - (rf"(lp:)((?=[A-Z_]){constant_re})", bygroups(Keyword, Name.Variable)), - (r"[^l\}]+", Text), - (r"l|\}", Text), + (r"\s+", Text.Whitespace), + (r"(lp:)(\{\{)", bygroups(Number, Punctuation), 'elpi-quote-exit'), + (rf"(lp:)((?=[A-Z_]){constant_re})", bygroups(Number, Name.Variable)), + (r"((?!lp:|\}\}).)+", using(CoqLexer)), + ], + 'elpi-quote-exit': [ + include('elpi'), + (r'\}\}', Punctuation, '#pop'), ], 'elpi-spill': [ (r'\{[^\{]', Text, '#push'), @@ -164,9 +168,8 @@ class ElpiLexer(RegexLexer): include('elpi'), ], 'elpi-in-parens': [ - (r"\(", Operator, '#push'), - (r"\)", Operator, '#pop'), + (r"\(", Punctuation, '#push'), include('elpi'), + (r"\)", Punctuation, '#pop'), ], - } diff --git a/contrib/python/Pygments/py3/pygments/lexers/email.py b/contrib/python/Pygments/py3/pygments/lexers/email.py index c0726e8b813..ea071c80026 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/email.py +++ b/contrib/python/Pygments/py3/pygments/lexers/email.py @@ -4,7 +4,7 @@ Lexer for the raw E-mail. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/erlang.py b/contrib/python/Pygments/py3/pygments/lexers/erlang.py index 1190182324d..120f5049fdc 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/erlang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/erlang.py @@ -4,7 +4,7 @@ Lexers for Erlang. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/esoteric.py b/contrib/python/Pygments/py3/pygments/lexers/esoteric.py index e9fab0e46f3..fe3825c356e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/esoteric.py +++ b/contrib/python/Pygments/py3/pygments/lexers/esoteric.py @@ -4,7 +4,7 @@ Lexers for esoteric languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py index 697d90c697e..aeb71ab0ce7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ezhil.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ezhil.py @@ -4,7 +4,7 @@ Pygments lexers for Ezhil language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/factor.py b/contrib/python/Pygments/py3/pygments/lexers/factor.py index 297433ce460..2ec3f9be251 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/factor.py +++ b/contrib/python/Pygments/py3/pygments/lexers/factor.py @@ -4,7 +4,7 @@ Lexers for the Factor language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/fantom.py b/contrib/python/Pygments/py3/pygments/lexers/fantom.py index a5ca59c3d40..7228554ba9b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/fantom.py +++ b/contrib/python/Pygments/py3/pygments/lexers/fantom.py @@ -4,7 +4,7 @@ Lexer for the Fantom language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/felix.py b/contrib/python/Pygments/py3/pygments/lexers/felix.py index 681070e87fd..a42ac080576 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/felix.py +++ b/contrib/python/Pygments/py3/pygments/lexers/felix.py @@ -4,7 +4,7 @@ Lexer for the Felix language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/fift.py b/contrib/python/Pygments/py3/pygments/lexers/fift.py index 02fdf4812b7..1263236c9c8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/fift.py +++ b/contrib/python/Pygments/py3/pygments/lexers/fift.py @@ -4,7 +4,7 @@ Lexers for fift. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/floscript.py b/contrib/python/Pygments/py3/pygments/lexers/floscript.py index 864560914c0..9c7eaab5a6e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/floscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/floscript.py @@ -4,7 +4,7 @@ Lexer for FloScript - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/forth.py b/contrib/python/Pygments/py3/pygments/lexers/forth.py index 1cf70721848..51f75affb4d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/forth.py +++ b/contrib/python/Pygments/py3/pygments/lexers/forth.py @@ -4,7 +4,7 @@ Lexer for the Forth language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/fortran.py b/contrib/python/Pygments/py3/pygments/lexers/fortran.py index 1a2b7f95062..a6230f0249c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/fortran.py +++ b/contrib/python/Pygments/py3/pygments/lexers/fortran.py @@ -4,7 +4,7 @@ Lexers for Fortran languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/foxpro.py b/contrib/python/Pygments/py3/pygments/lexers/foxpro.py index dd6fd182187..3e7c056975e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/foxpro.py +++ b/contrib/python/Pygments/py3/pygments/lexers/foxpro.py @@ -4,7 +4,7 @@ Simple lexer for Microsoft Visual FoxPro source code. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/freefem.py b/contrib/python/Pygments/py3/pygments/lexers/freefem.py index ce8e2545359..87b066b1a0d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/freefem.py +++ b/contrib/python/Pygments/py3/pygments/lexers/freefem.py @@ -4,7 +4,7 @@ Lexer for FreeFem++ language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/func.py b/contrib/python/Pygments/py3/pygments/lexers/func.py index 37305695760..d8c912a3e08 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/func.py +++ b/contrib/python/Pygments/py3/pygments/lexers/func.py @@ -4,7 +4,7 @@ Lexers for FunC. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/functional.py b/contrib/python/Pygments/py3/pygments/lexers/functional.py index 1f51ac9e082..6a051d8fd3a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/functional.py +++ b/contrib/python/Pygments/py3/pygments/lexers/functional.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/futhark.py b/contrib/python/Pygments/py3/pygments/lexers/futhark.py index 2b5bb59015d..dd2efe83e70 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/futhark.py +++ b/contrib/python/Pygments/py3/pygments/lexers/futhark.py @@ -4,7 +4,7 @@ Lexer for the Futhark language - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py b/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py index 1747d416d21..9e968bd6b67 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py +++ b/contrib/python/Pygments/py3/pygments/lexers/gcodelexer.py @@ -4,7 +4,7 @@ Lexers for the G Code Language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/gdscript.py b/contrib/python/Pygments/py3/pygments/lexers/gdscript.py index a6b8ad4e1c5..6dfe5897672 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/gdscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/gdscript.py @@ -7,7 +7,7 @@ Modified by Daniel J. Ramirez <[email protected]> based on the original python.py. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/gleam.py b/contrib/python/Pygments/py3/pygments/lexers/gleam.py new file mode 100644 index 00000000000..19047e13e28 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/gleam.py @@ -0,0 +1,74 @@ +""" + pygments.lexers.gleam + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Gleam programming language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words, bygroups +from pygments.token import Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['GleamLexer'] + + +class GleamLexer(RegexLexer): + """ + Lexer for the Gleam programming language (version 1.0.0). + """ + + name = 'Gleam' + url = 'https://gleam.run/' + filenames = ['*.gleam'] + aliases = ['gleam'] + mimetypes = ['text/x-gleam'] + version_added = '2.19' + + keywords = words(( + 'as', 'assert', 'auto', 'case', 'const', 'delegate', 'derive', 'echo', + 'else', 'fn', 'if', 'implement', 'import', 'let', 'macro', 'opaque', + 'panic', 'pub', 'test', 'todo', 'type', 'use', + ), suffix=r'\b') + + tokens = { + 'root': [ + # Comments + (r'(///.*?)(\n)', bygroups(String.Doc, Whitespace)), + (r'(//.*?)(\n)', bygroups(Comment.Single, Whitespace)), + + # Keywords + (keywords, Keyword), + (r'([a-zA-Z_]+)(\.)', bygroups(Keyword, Punctuation)), + + # Punctuation + (r'[()\[\]{}:;,@]+', Punctuation), + (r'(#|!=|!|==|\|>|\|\||\||\->|<\-|&&|<<|>>|\.\.|\.|=)', Punctuation), + + # Operators + (r'(<>|\+\.?|\-\.?|\*\.?|/\.?|%\.?|<=\.?|>=\.?|<\.?|>\.?|=)', Operator), + + # Strings + (r'"(\\"|[^"])*"', String), + + # Identifiers + (r'\b(let)(\s+)(\w+)', bygroups(Keyword, Whitespace, Name.Variable)), + (r'\b(fn)(\s+)(\w+)', bygroups(Keyword, Whitespace, Name.Function)), + (r'[a-zA-Z_/]\w*', Name), + + # numbers + (r'(\d+(_\d+)*\.(?!\.)(\d+(_\d+)*)?|\.\d+(_\d+)*)([eEf][+-]?[0-9]+)?', Number.Float), + (r'\d+(_\d+)*[eEf][+-]?[0-9]+', Number.Float), + (r'0[xX][a-fA-F0-9]+(_[a-fA-F0-9]+)*(\.([a-fA-F0-9]+(_[a-fA-F0-9]+)*)?)?p[+-]?\d+', Number.Float), + (r'0[bB][01]+(_[01]+)*', Number.Bin), + (r'0[oO][0-7]+(_[0-7]+)*', Number.Oct), + (r'0[xX][a-fA-F0-9]+(_[a-fA-F0-9]+)*', Number.Hex), + (r'\d+(_\d+)*', Number.Integer), + + # Whitespace + (r'\s+', Whitespace), + + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/go.py b/contrib/python/Pygments/py3/pygments/lexers/go.py index 4d8326ad159..77a0fbce97c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/go.py +++ b/contrib/python/Pygments/py3/pygments/lexers/go.py @@ -4,7 +4,7 @@ Lexers for the Google Go language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py b/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py index cb2814376c6..45274fd1404 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py +++ b/contrib/python/Pygments/py3/pygments/lexers/grammar_notation.py @@ -4,7 +4,7 @@ Lexers for grammar notations like BNF. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/graph.py b/contrib/python/Pygments/py3/pygments/lexers/graph.py index 840d5e9e6a8..01d75743abe 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graph.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graph.py @@ -4,7 +4,7 @@ Lexers for graph query languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/graphics.py b/contrib/python/Pygments/py3/pygments/lexers/graphics.py index c5a144d0c2f..400be4fd895 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graphics.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graphics.py @@ -4,7 +4,7 @@ Lexers for computer graphics and plotting related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/graphql.py b/contrib/python/Pygments/py3/pygments/lexers/graphql.py index 2bcb383e909..7de5b6e7cf4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graphql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graphql.py @@ -8,7 +8,7 @@ More information: https://graphql.org/ - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/graphviz.py b/contrib/python/Pygments/py3/pygments/lexers/graphviz.py index f58e1ffaa98..6b4841554f4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/graphviz.py +++ b/contrib/python/Pygments/py3/pygments/lexers/graphviz.py @@ -4,7 +4,7 @@ Lexer for the DOT language (graphviz). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/gsql.py b/contrib/python/Pygments/py3/pygments/lexers/gsql.py index 5f55af3a250..9ff187889f7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/gsql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/gsql.py @@ -4,7 +4,7 @@ Lexers for TigerGraph GSQL graph query language - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/hare.py b/contrib/python/Pygments/py3/pygments/lexers/hare.py new file mode 100644 index 00000000000..56548d5e59f --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/hare.py @@ -0,0 +1,73 @@ +""" + pygments.lexers.hare + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Hare language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, words +from pygments.token import Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['HareLexer'] + +class HareLexer(RegexLexer): + """ + Lexer for the Hare programming language. + """ + name = 'Hare' + url = 'https://harelang.org/' + aliases = ['hare'] + filenames = ['*.ha'] + mimetypes = ['text/x-hare'] + version_added = '2.19' + + _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' + _ws1 = r'\s*(?:/[*].*?[*]/\s*)?' + + tokens = { + 'whitespace': [ + (r'^use.*;', Comment.Preproc), + (r'@[a-z]+', Comment.Preproc), + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'//.*?$', Comment.Single), + ], + 'statements': [ + (r'"', String, 'string'), + (r'`[^`]*`', String), + (r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char), + (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float), + (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), + (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex), + (r'0o[0-7]+[LlUu]*', Number.Oct), + (r'\d+[zui]?(\d+)?', Number.Integer), + (r'[~!%^&*+=|?:<>/-]', Operator), + (words(('as', 'is', '=>', '..', '...')), Operator), + (r'[()\[\],.{};]+', Punctuation), + (words(('abort', 'align', 'alloc', 'append', 'assert', 'case', + 'const', 'def', 'defer', 'delete', 'else', 'enum', 'export', + 'fn', 'for', 'free', 'if', 'let', 'len', 'match', 'offset', + 'return', 'static', 'struct', 'switch', 'type', 'union', + 'yield', 'vastart', 'vaarg', 'vaend'), + suffix=r'\b'), Keyword), + (r'(bool|int|uint|uintptr|u8|u16|u32|u64|i8|i16|i32|i64|f32|f64|null|done|never|void|nullable|rune|size|valist)\b', + Keyword.Type), + (r'(true|false|null)\b', Name.Builtin), + (r'[a-zA-Z_]\w*', Name), + ], + 'string': [ + (r'"', String, '#pop'), + (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|' + r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape), + (r'[^\\"\n]+', String), # all other characters + (r'\\', String), # stray backslash + ], + 'root': [ + include('whitespace'), + include('statements'), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/haskell.py b/contrib/python/Pygments/py3/pygments/lexers/haskell.py index 4983abc8c70..0a9f2c15a74 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/haskell.py +++ b/contrib/python/Pygments/py3/pygments/lexers/haskell.py @@ -4,7 +4,7 @@ Lexers for Haskell and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -302,9 +302,9 @@ class AgdaLexer(RegexLexer): 'abstract', 'codata', 'coinductive', 'constructor', 'data', 'do', 'eta-equality', 'field', 'forall', 'hiding', 'in', 'inductive', 'infix', 'infixl', 'infixr', 'instance', 'interleaved', 'let', 'macro', 'mutual', - 'no-eta-equality', 'open', 'overlap', 'pattern', 'postulate', 'primitive', + 'no-eta-equality', 'opaque', 'open', 'overlap', 'pattern', 'postulate', 'primitive', 'private', 'quote', 'quoteTerm', 'record', 'renaming', 'rewrite', - 'syntax', 'tactic', 'unquote', 'unquoteDecl', 'unquoteDef', 'using', + 'syntax', 'tactic', 'unfolding', 'unquote', 'unquoteDecl', 'unquoteDef', 'using', 'variable', 'where', 'with', ) diff --git a/contrib/python/Pygments/py3/pygments/lexers/haxe.py b/contrib/python/Pygments/py3/pygments/lexers/haxe.py index d9bf654ccfb..66bd2a350f3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/haxe.py +++ b/contrib/python/Pygments/py3/pygments/lexers/haxe.py @@ -4,7 +4,7 @@ Lexers for Haxe and related stuff. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/hdl.py b/contrib/python/Pygments/py3/pygments/lexers/hdl.py index 57e560f9de0..d22b66ff6a0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/hdl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/hdl.py @@ -4,7 +4,7 @@ Lexers for hardware descriptor languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/hexdump.py b/contrib/python/Pygments/py3/pygments/lexers/hexdump.py index 28d3429caf8..4da4edb6af7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/hexdump.py +++ b/contrib/python/Pygments/py3/pygments/lexers/hexdump.py @@ -4,7 +4,7 @@ Lexers for hexadecimal dumps. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/html.py b/contrib/python/Pygments/py3/pygments/lexers/html.py index c4217a2195d..66ba6609f7d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/html.py +++ b/contrib/python/Pygments/py3/pygments/lexers/html.py @@ -4,14 +4,14 @@ Lexers for HTML, XML and related markup. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, \ - default, using + default, using, inherit, this from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Punctuation, Whitespace from pygments.util import looks_like_xml, html_doctype_matches @@ -22,7 +22,7 @@ from pygments.lexers.css import CssLexer, _indentation, _starts_block from pygments.lexers.ruby import RubyLexer __all__ = ['HtmlLexer', 'DtdLexer', 'XmlLexer', 'XsltLexer', 'HamlLexer', - 'ScamlLexer', 'PugLexer', 'UrlEncodedLexer'] + 'ScamlLexer', 'PugLexer', 'VueLexer', 'UrlEncodedLexer'] class HtmlLexer(RegexLexer): @@ -624,3 +624,47 @@ class UrlEncodedLexer(RegexLexer): ('([^&=]*)(=)([^=&]*)(&?)', bygroups(Name.Tag, Operator, String, Punctuation)), ], } + + +class VueLexer(HtmlLexer): + """ + For Vue Single-File Component. + """ + + name = 'Vue' + url = 'https://vuejs.org/api/sfc-spec.html' + aliases = ['vue'] + filenames = ['*.vue'] + mimetypes = [] + version_added = '2.19' + + flags = re.IGNORECASE | re.DOTALL + tokens = { + 'root': [ + (r'(\{\{)(.*?)(\}\})', bygroups(Comment.Preproc, + using(JavascriptLexer), Comment.Preproc)), + ('[^<&{]+', Text), + inherit, + ], + 'tag': [ + (r'\s+', Text), + (r'((?:[@:]|v-)(?:[.\w:-]|\[[^\]]*?\])+\s*)(=)(\s*)', + bygroups(using(this, state=['name']), Operator, Text), + 'attr-directive'), + (r'([\w:-]+\s*)(=)(\s*)', bygroups(Name.Attribute, Operator, Text), + 'attr'), + (r'[\w:-]+', Name.Attribute), + (r'(/?)(\s*)(>)', bygroups(Punctuation, Text, Punctuation), '#pop'), + ], + 'name': [ + (r'[\w-]+', Name.Attribute), + (r'[:@.]', Punctuation), + (r'(\[)([^\]]*?)(\])', bygroups(Comment.Preproc, + using(JavascriptLexer), Comment.Preproc)), + ], + 'attr-directive': [ + (r'(["\'])(.*?)(\1)', bygroups(String, + using(JavascriptLexer), String), '#pop'), + (r'[^\s>]+', using(JavascriptLexer), '#pop'), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/idl.py b/contrib/python/Pygments/py3/pygments/lexers/idl.py index fab3c1721fa..21b8d3130c7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/idl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/idl.py @@ -4,7 +4,7 @@ Lexers for IDL. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/igor.py b/contrib/python/Pygments/py3/pygments/lexers/igor.py index 84ec32fd28d..136c5b89224 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/igor.py +++ b/contrib/python/Pygments/py3/pygments/lexers/igor.py @@ -4,7 +4,7 @@ Lexers for Igor Pro. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -38,7 +38,7 @@ class IgorLexer(RegexLexer): types = ( 'variable', 'string', 'constant', 'strconstant', 'NVAR', 'SVAR', 'WAVE', 'STRUCT', 'dfref', 'funcref', 'char', 'uchar', 'int16', 'uint16', 'int32', - 'uint32', 'int64', 'uint64', 'float', 'double' + 'uint32', 'int64', 'uint64', 'float', 'double', 'int' ) keywords = ( 'override', 'ThreadSafe', 'MultiThread', 'static', 'Proc', diff --git a/contrib/python/Pygments/py3/pygments/lexers/inferno.py b/contrib/python/Pygments/py3/pygments/lexers/inferno.py index 3513df2afcc..b5caf55a002 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/inferno.py +++ b/contrib/python/Pygments/py3/pygments/lexers/inferno.py @@ -4,7 +4,7 @@ Lexers for Inferno os and all the related stuff. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/installers.py b/contrib/python/Pygments/py3/pygments/lexers/installers.py index 2a9c5daa1b0..3f12a25b2ce 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/installers.py +++ b/contrib/python/Pygments/py3/pygments/lexers/installers.py @@ -4,7 +4,7 @@ Lexers for installer/packager DSLs and formats. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -14,7 +14,8 @@ from pygments.lexer import RegexLexer, include, bygroups, using, this, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Punctuation, Generic, Number, Whitespace -__all__ = ['NSISLexer', 'RPMSpecLexer', 'SourcesListLexer', +__all__ = ['NSISLexer', 'RPMSpecLexer', + 'DebianSourcesLexer', 'SourcesListLexer', 'DebianControlLexer'] @@ -217,6 +218,30 @@ class RPMSpecLexer(RegexLexer): } +class DebianSourcesLexer(RegexLexer): + """ + Lexer that highlights debian.sources files. + """ + + name = 'Debian Sources file' + aliases = ['debian.sources'] + filenames = ['*.sources'] + version_added = '2.19' + url = 'https://manpages.debian.org/bookworm/apt/sources.list.5.en.html#THE_DEB_AND_DEB-SRC_TYPES:_GENERAL_FORMAT' + + tokens = { + 'root': [ + (r'^(Signed-By)(:)(\s*)', bygroups(Keyword, Punctuation, Whitespace), 'signed-by'), + (r'^([a-zA-Z\-0-9\.]*?)(:)(\s*)(.*?)$', + bygroups(Keyword, Punctuation, Whitespace, String)), + ], + 'signed-by': [ + (r' -----END PGP PUBLIC KEY BLOCK-----\n', Text, '#pop'), + (r'.+\n', Text), + ], + } + + class SourcesListLexer(RegexLexer): """ Lexer that highlights debian sources.list files. @@ -278,25 +303,26 @@ class DebianControlLexer(RegexLexer): tokens = { 'root': [ (r'^(Description)', Keyword, 'description'), - (r'^(Maintainer|Uploaders)(:\s*)', bygroups(Keyword, Text), + (r'^(Maintainer|Uploaders|Changed-By)(:)(\s*)', + bygroups(Keyword, Punctuation, Whitespace), 'maintainer'), - (r'^((?:Build-|Pre-)?Depends(?:-Indep|-Arch)?)(:\s*)', - bygroups(Keyword, Text), 'depends'), - (r'^(Recommends|Suggests|Enhances)(:\s*)', bygroups(Keyword, Text), - 'depends'), - (r'^((?:Python-)?Version)(:\s*)(\S+)$', - bygroups(Keyword, Text, Number)), - (r'^((?:Installed-)?Size)(:\s*)(\S+)$', - bygroups(Keyword, Text, Number)), - (r'^(MD5Sum|SHA1|SHA256)(:\s*)(\S+)$', - bygroups(Keyword, Text, Number)), - (r'^([a-zA-Z\-0-9\.]*?)(:\s*)(.*?)$', - bygroups(Keyword, Whitespace, String)), + (r'^((?:Build-|Pre-)?Depends(?:-Indep|-Arch)?)(:)(\s*)', + bygroups(Keyword, Punctuation, Whitespace), 'package_list'), + (r'^(Recommends|Suggests|Enhances|Breaks|Replaces|Provides|Conflicts)(:)(\s*)', + bygroups(Keyword, Punctuation, Whitespace), 'package_list'), + (r'^((?:Python-)?Version)(:)(\s*)(\S+)$', + bygroups(Keyword, Punctuation, Whitespace, Number)), + (r'^((?:Installed-)?Size)(:)(\s*)(\S+)$', + bygroups(Keyword, Punctuation, Whitespace, Number)), + (r'^(MD5Sum|SHA1|SHA256)(:)(\s*)(\S+)$', + bygroups(Keyword, Punctuation, Whitespace, Number)), + (r'^([a-zA-Z\-0-9\.]*?)(:)(\s*)(.*?)$', + bygroups(Keyword, Punctuation, Whitespace, String)), ], 'maintainer': [ (r'<[^>]+>$', Generic.Strong, '#pop'), (r'<[^>]+>', Generic.Strong), - (r',\n?', Text), + (r',\n?', Whitespace), (r'[^,<]+$', Text, '#pop'), (r'[^,<]+', Text), ], @@ -307,19 +333,20 @@ class DebianControlLexer(RegexLexer): (r' .*\n', Text), default('#pop'), ], - 'depends': [ - (r'(\$)(\{)(\w+\s*:\s*\w+)(\})', - bygroups(Operator, Text, Name.Entity, Text)), - (r'\(', Text, 'depend_vers'), + 'package_list': [ + (r'(\$)(\{)(\w+)(\s*)(:)(\s*)(\w+)(\})', + bygroups(Operator, Punctuation, Name.Entity, Whitespace, + Punctuation, Whitespace, Text, Punctuation)), + (r'\(', Punctuation, 'package_list_vers'), (r'\|', Operator), - (r',\n', Text), - (r'\n', Text, '#pop'), + (r'\n\s', Whitespace), + (r'\n', Whitespace, '#pop'), (r'[,\s]', Text), (r'[+.a-zA-Z0-9-]+', Name.Function), (r'\[.*?\]', Name.Entity), ], - 'depend_vers': [ - (r'\)', Text, '#pop'), - (r'([><=]+)(\s*)([^)]+)', bygroups(Operator, Text, Number)), + 'package_list_vers': [ + (r'\)', Punctuation, '#pop'), + (r'([><=]+)(\s*)([^)]+)', bygroups(Operator, Whitespace, Number)), ] } diff --git a/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py b/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py index a7bc6675656..b142c544990 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py +++ b/contrib/python/Pygments/py3/pygments/lexers/int_fiction.py @@ -4,7 +4,7 @@ Lexers for interactive fiction languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/iolang.py b/contrib/python/Pygments/py3/pygments/lexers/iolang.py index 119ce6b2113..0269384fac1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/iolang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/iolang.py @@ -4,7 +4,7 @@ Lexers for the Io language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/j.py b/contrib/python/Pygments/py3/pygments/lexers/j.py index 959e8ca5095..1eb418e1c38 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/j.py +++ b/contrib/python/Pygments/py3/pygments/lexers/j.py @@ -4,7 +4,7 @@ Lexer for the J programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/javascript.py b/contrib/python/Pygments/py3/pygments/lexers/javascript.py index ea7bd10ca04..d361b6e716e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/javascript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/javascript.py @@ -4,7 +4,7 @@ Lexers for JavaScript and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -119,6 +119,8 @@ class JavascriptLexer(RegexLexer): (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), (r'`', String.Backtick, 'interp'), + # private identifier + (r'#[a-zA-Z_]\w*', Name), ], 'interp': [ (r'`', String.Backtick, '#pop'), @@ -168,6 +170,8 @@ class TypeScriptLexer(JavascriptLexer): # Match stuff like: Decorators (r'@' + JS_IDENT, Keyword.Declaration), inherit, + # private identifier + (r'#[a-zA-Z_]\w*', Name), ], } diff --git a/contrib/python/Pygments/py3/pygments/lexers/jmespath.py b/contrib/python/Pygments/py3/pygments/lexers/jmespath.py index e7bfc3e45c6..67374c28c1e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jmespath.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jmespath.py @@ -4,7 +4,7 @@ Lexers for the JMESPath language - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/jslt.py b/contrib/python/Pygments/py3/pygments/lexers/jslt.py index 297c3c6b5f2..f2cc5df5fa6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jslt.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jslt.py @@ -4,7 +4,7 @@ Lexers for the JSLT language - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/json5.py b/contrib/python/Pygments/py3/pygments/lexers/json5.py new file mode 100644 index 00000000000..35d769c312f --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/json5.py @@ -0,0 +1,83 @@ +""" + pygments.lexers.json5 + ~~~~~~~~~~~~~~~~~~~~~ + + Lexer for Json5 file format. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import include, RegexLexer, words +from pygments.token import Comment, Keyword, Name, Number, Punctuation, \ + String, Whitespace + +__all__ = ['Json5Lexer'] + + +def string_rules(quote_mark): + return [ + (rf"[^{quote_mark}\\]+", String), + (r"\\.", String.Escape), + (r"\\", Punctuation), + (quote_mark, String, '#pop'), + ] + + +def quoted_field_name(quote_mark): + return [ + (rf'([^{quote_mark}\\]|\\.)*{quote_mark}', + Name.Variable, ('#pop', 'object_value')) + ] + + +class Json5Lexer(RegexLexer): + """Lexer for JSON5 data structures.""" + + name = 'JSON5' + aliases = ['json5'] + filenames = ['*.json5'] + url = "https://json5.org" + version_added = '2.19' + tokens = { + '_comments': [ + (r'(//|#).*\n', Comment.Single), + (r'/\*\*([^/]|/(?!\*))*\*/', String.Doc), + (r'/\*([^/]|/(?!\*))*\*/', Comment), + ], + 'root': [ + include('_comments'), + (r"'", String, 'singlestring'), + (r'"', String, 'doublestring'), + (r'[+-]?0[xX][0-9a-fA-F]+', Number.Hex), + (r'[+-.]?[0-9]+[.]?[0-9]?([eE][-]?[0-9]+)?', Number.Float), + (r'\{', Punctuation, 'object'), + (r'\[', Punctuation, 'array'), + (words(['false', 'Infinity', '+Infinity', '-Infinity', 'NaN', + 'null', 'true',], suffix=r'\b'), Keyword), + (r'\s+', Whitespace), + (r':', Punctuation), + ], + 'singlestring': string_rules("'"), + 'doublestring': string_rules('"'), + 'array': [ + (r',', Punctuation), + (r'\]', Punctuation, '#pop'), + include('root'), + ], + 'object': [ + (r'\s+', Whitespace), + (r'\}', Punctuation, '#pop'), + (r'\b([^:]+)', Name.Variable, 'object_value'), + (r'"', Name.Variable, 'double_field_name'), + (r"'", Name.Variable, 'single_field_name'), + include('_comments'), + ], + 'double_field_name': quoted_field_name('"'), + 'single_field_name': quoted_field_name("'"), + 'object_value': [ + (r',', Punctuation, '#pop'), + (r'\}', Punctuation, '#pop:2'), + include('root'), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py b/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py index aeaf53dc864..f9aa5953f0e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py @@ -4,7 +4,7 @@ Lexer for Jsonnet data templating language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/jsx.py b/contrib/python/Pygments/py3/pygments/lexers/jsx.py index b2eece6f60f..6124d8c00ec 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jsx.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jsx.py @@ -2,20 +2,58 @@ pygments.lexers.jsx ~~~~~~~~~~~~~~~~~~~ - Lexers for JSX (React). + Lexers for JSX (React) and TSX (TypeScript flavor). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import bygroups, default, include, inherit -from pygments.lexers.javascript import JavascriptLexer +from pygments.lexers.javascript import JavascriptLexer, TypeScriptLexer from pygments.token import Name, Operator, Punctuation, String, Text, \ Whitespace -__all__ = ['JsxLexer'] +__all__ = ['JsxLexer', 'TsxLexer'] + +_JSX_RULES = { + "jsx": [ + (r"</?>", Punctuation), # JSXFragment <>|</> + (r"(<)(\w+)(\.?)", bygroups(Punctuation, Name.Tag, Punctuation), "tag"), + ( + r"(</)(\w+)(>)", + bygroups(Punctuation, Name.Tag, Punctuation), + ), + ( + r"(</)(\w+)", + bygroups(Punctuation, Name.Tag), + "fragment", + ), # Same for React.Context + ], + "tag": [ + (r"\s+", Whitespace), + (r"([\w-]+)(\s*)(=)(\s*)", bygroups(Name.Attribute, Whitespace, Operator, Whitespace), "attr"), + (r"[{}]+", Punctuation), + (r"[\w\.]+", Name.Attribute), + (r"(/?)(\s*)(>)", bygroups(Punctuation, Text, Punctuation), "#pop"), + ], + "fragment": [ + (r"(.)(\w+)", bygroups(Punctuation, Name.Attribute)), + (r"(>)", bygroups(Punctuation), "#pop"), + ], + "attr": [ + (r"\{", Punctuation, "expression"), + (r'".*?"', String, "#pop"), + (r"'.*?'", String, "#pop"), + default("#pop"), + ], + "expression": [ + (r"\{", Punctuation, "#push"), + (r"\}", Punctuation, "#pop"), + include("root"), + ], +} class JsxLexer(JavascriptLexer): @@ -37,39 +75,26 @@ class JsxLexer(JavascriptLexer): include("jsx"), inherit, ], - "jsx": [ - (r"</?>", Punctuation), # JSXFragment <>|</> - (r"(<)(\w+)(\.?)", bygroups(Punctuation, Name.Tag, Punctuation), "tag"), - ( - r"(</)(\w+)(>)", - bygroups(Punctuation, Name.Tag, Punctuation), - ), - ( - r"(</)(\w+)", - bygroups(Punctuation, Name.Tag), - "fragment", - ), # Same for React.Context - ], - "tag": [ - (r"\s+", Whitespace), - (r"([\w-]+)(\s*)(=)(\s*)", bygroups(Name.Attribute, Whitespace, Operator, Whitespace), "attr"), - (r"[{}]+", Punctuation), - (r"[\w\.]+", Name.Attribute), - (r"(/?)(\s*)(>)", bygroups(Punctuation, Text, Punctuation), "#pop"), - ], - "fragment": [ - (r"(.)(\w+)", bygroups(Punctuation, Name.Attribute)), - (r"(>)", bygroups(Punctuation), "#pop"), - ], - "attr": [ - (r"\{", Punctuation, "expression"), - (r'".*?"', String, "#pop"), - (r"'.*?'", String, "#pop"), - default("#pop"), - ], - "expression": [ - (r"\{", Punctuation, "#push"), - (r"\}", Punctuation, "#pop"), - include("root"), + **_JSX_RULES} + + +class TsxLexer(TypeScriptLexer): + """For TypeScript with embedded JSX + """ + + name = "TSX" + aliases = ["tsx"] + filenames = ["*.tsx"] + mimetypes = ["text/typescript-tsx"] + url = "https://www.typescriptlang.org/docs/handbook/jsx.html" + version_added = '2.19' + + flags = re.MULTILINE | re.DOTALL + + # Use same tokens as `TypescriptLexer`, but with tags and attributes support + tokens = { + "root": [ + include("jsx"), + inherit, ], - } + **_JSX_RULES} diff --git a/contrib/python/Pygments/py3/pygments/lexers/julia.py b/contrib/python/Pygments/py3/pygments/lexers/julia.py index faacaa55c7a..77d8bafcdb2 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/julia.py +++ b/contrib/python/Pygments/py3/pygments/lexers/julia.py @@ -4,7 +4,7 @@ Lexers for the Julia language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -251,6 +251,7 @@ class JuliaConsoleLexer(Lexer): aliases = ['jlcon', 'julia-repl'] url = 'https://julialang.org/' version_added = '1.6' + _example = "jlcon/console" def get_tokens_unprocessed(self, text): jllexer = JuliaLexer(**self.options) diff --git a/contrib/python/Pygments/py3/pygments/lexers/jvm.py b/contrib/python/Pygments/py3/pygments/lexers/jvm.py index d631c5c3682..3ca257a95ba 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jvm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jvm.py @@ -4,7 +4,7 @@ Pygments lexers for JVM languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -50,7 +50,7 @@ class JavaLexer(RegexLexer): r'if|goto|instanceof|new|return|switch|this|throw|try|while)\b', Keyword), # method names - (r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)' # return arguments + (r'((?:(?:[^\W\d]|\$)[\w.\[\]$<>?]*\s+)+?)' # return arguments r'((?:[^\W\d]|\$)[\w$]*)' # method name r'(\s*)(\()', # signature start bygroups(using(this), Name.Function, Whitespace, Punctuation)), diff --git a/contrib/python/Pygments/py3/pygments/lexers/kuin.py b/contrib/python/Pygments/py3/pygments/lexers/kuin.py index 228a4b3c96c..686a1c7ecd4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/kuin.py +++ b/contrib/python/Pygments/py3/pygments/lexers/kuin.py @@ -4,7 +4,7 @@ Lexers for the Kuin language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/kusto.py b/contrib/python/Pygments/py3/pygments/lexers/kusto.py index 7b146861cf5..ce32d5eeec6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/kusto.py +++ b/contrib/python/Pygments/py3/pygments/lexers/kusto.py @@ -4,7 +4,7 @@ Lexers for Kusto Query Language (KQL). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ldap.py b/contrib/python/Pygments/py3/pygments/lexers/ldap.py index 17d14b017aa..65473da67b4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ldap.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ldap.py @@ -4,7 +4,7 @@ Pygments lexers for LDAP. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/lean.py b/contrib/python/Pygments/py3/pygments/lexers/lean.py index b44d2a04236..76af11fe909 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/lean.py +++ b/contrib/python/Pygments/py3/pygments/lexers/lean.py @@ -4,7 +4,7 @@ Lexers for the Lean theorem prover. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/lilypond.py b/contrib/python/Pygments/py3/pygments/lexers/lilypond.py index d42906ccc55..03c34ae5919 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/lilypond.py +++ b/contrib/python/Pygments/py3/pygments/lexers/lilypond.py @@ -4,7 +4,7 @@ Lexer for LilyPond. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/lisp.py b/contrib/python/Pygments/py3/pygments/lexers/lisp.py index e6cc5875fa9..2c970d9395b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/lisp.py +++ b/contrib/python/Pygments/py3/pygments/lexers/lisp.py @@ -4,7 +4,7 @@ Lexers for Lispy languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/macaulay2.py b/contrib/python/Pygments/py3/pygments/lexers/macaulay2.py index 6ea03ae23db..77b841d831b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/macaulay2.py +++ b/contrib/python/Pygments/py3/pygments/lexers/macaulay2.py @@ -4,7 +4,7 @@ Lexer for Macaulay2. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -13,9 +13,11 @@ from pygments.token import Comment, Keyword, Name, String, Text __all__ = ['Macaulay2Lexer'] -# Auto-generated for Macaulay2-1.23. Do not modify this file manually. +# Auto-generated for Macaulay2-1.24.11. Do not modify this file manually. M2KEYWORDS = ( + "SPACE", + "TEST", "and", "break", "catch", @@ -37,10 +39,10 @@ M2KEYWORDS = ( "or", "return", "shield", - "SPACE", "step", "symbol", "then", + "threadLocal", "threadVariable", "throw", "time", @@ -53,52 +55,52 @@ M2KEYWORDS = ( ) M2DATATYPES = ( + "ANCHOR", "Adjacent", "AffineVariety", "Analyzer", - "ANCHOR", "AngleBarList", "Array", "AssociativeExpression", "AtomicInt", - "Bag", - "BasicList", - "BettiTally", - "BinaryOperation", "BLOCKQUOTE", "BODY", "BOLD", - "Boolean", "BR", "BUTTON", - "CacheFunction", - "CacheTable", + "Bag", + "BasicList", + "BettiTally", + "BinaryOperation", + "Boolean", "CC", "CDATA", + "CODE", + "COMMENT", + "CacheFunction", + "CacheTable", "ChainComplex", "ChainComplexMap", - "CODE", "CoherentSheaf", "Command", - "COMMENT", "CompiledFunction", "CompiledFunctionBody", "CompiledFunctionClosure", "ComplexField", "Constant", - "Database", "DD", + "DIV", + "DL", + "DT", + "Database", "Descent", "Describe", "Dictionary", "DirectSum", - "DIV", "Divide", - "DL", "DocumentTag", - "DT", - "Eliminate", "EM", + "Eliminate", "EngineRing", "Equation", "ExampleItem", @@ -117,7 +119,6 @@ M2DATATYPES = ( "GradedModuleMap", "GroebnerBasis", "GroebnerBasisOptions", - "HashTable", "HEAD", "HEADER1", "HEADER2", @@ -125,20 +126,23 @@ M2DATATYPES = ( "HEADER4", "HEADER5", "HEADER6", - "HeaderType", - "Holder", "HR", "HREF", "HTML", + "HashTable", + "HeaderType", + "Holder", "Hybrid", "Hypertext", "HypertextContainer", "HypertextParagraph", "HypertextVoid", - "Ideal", "IMG", - "ImmutableType", "INDENT", + "INPUT", + "ITALIC", + "Ideal", + "ImmutableType", "IndeterminateNumber", "IndexedVariable", "IndexedVariableTable", @@ -146,9 +150,7 @@ M2DATATYPES = ( "InexactFieldFamily", "InexactNumber", "InfiniteNumber", - "INPUT", "IntermediateMarkUpType", - "ITALIC", "Iterator", "KBD", "Keyword", @@ -156,17 +158,17 @@ M2DATATYPES = ( "LATER", "LI", "LINK", - "List", "LITERAL", + "List", "LocalDictionary", "LowerBound", + "MENU", + "META", "Manipulator", "MapExpression", "MarkUpType", "Matrix", "MatrixExpression", - "MENU", - "META", "MethodFunction", "MethodFunctionBinary", "MethodFunctionSingle", @@ -190,14 +192,14 @@ M2DATATYPES = ( "Option", "OptionTable", "OrderedMonoid", - "Package", "PARA", + "PRE", + "Package", "Parenthesize", "Parser", "Partition", "PolynomialRing", "Power", - "PRE", "Product", "ProductOrder", "Program", @@ -205,8 +207,11 @@ M2DATATYPES = ( "ProjectiveHilbertPolynomial", "ProjectiveVariety", "Pseudocode", + "PseudocodeClosure", "QQ", "QuotientRing", + "RR", + "RRi", "RealField", "Resolution", "Ring", @@ -214,10 +219,15 @@ M2DATATYPES = ( "RingFamily", "RingMap", "RowExpression", - "RR", - "RRi", "SAMP", "SCRIPT", + "SMALL", + "SPAN", + "STRONG", + "STYLE", + "SUB", + "SUBSECTION", + "SUP", "ScriptedFunctor", "SelfInitializingType", "Sequence", @@ -225,39 +235,32 @@ M2DATATYPES = ( "SheafExpression", "SheafMap", "SheafOfRings", - "SMALL", - "SPAN", "SparseMonomialVectorExpression", "SparseVectorExpression", "String", - "STRONG", - "STYLE", - "SUB", "Subscript", - "SUBSECTION", "Sum", "SumOfTwists", - "SUP", "Superscript", "Symbol", "SymbolBody", "TABLE", - "Table", - "Tally", - "Task", "TD", - "TensorProduct", - "TestInput", "TEX", "TH", - "Thing", - "Time", "TITLE", "TO", "TO2", "TOH", "TR", "TT", + "Table", + "Tally", + "Task", + "TensorProduct", + "TestInput", + "Thing", + "Time", "Type", "UL", "URL", @@ -269,11 +272,35 @@ M2DATATYPES = ( "VirtualTally", "VisibleList", "WrapperType", - "ZeroExpression", - "ZZ" + "ZZ", + "ZeroExpression" ) M2FUNCTIONS = ( + "BesselJ", + "BesselY", + "Beta", + "Digamma", + "EXAMPLE", + "End", + "Fano", + "GCstats", + "GF", + "Gamma", + "Grassmannian", + "Hom", + "LLL", + "LUdecomposition", + "M2CODE", + "NNParser", + "Proj", + "QQParser", + "QRDecomposition", + "SVD", + "SYNOPSIS", + "Schubert", + "Spec", + "ZZParser", "about", "abs", "accumulate", @@ -285,7 +312,6 @@ M2FUNCTIONS = ( "addDependencyTask", "addEndFunction", "addHook", - "addStartFunction", "addStartTask", "adjoint", "agm", @@ -316,10 +342,10 @@ M2FUNCTIONS = ( "assert", "associatedGradedRing", "associatedPrimes", + "atEndOfFile", "atan", "atan2", "atanh", - "atEndOfFile", "autoload", "baseFilename", "baseName", @@ -327,9 +353,6 @@ M2FUNCTIONS = ( "basis", "beginDocumentation", "benchmark", - "BesselJ", - "BesselY", - "Beta", "betti", "between", "binomial", @@ -342,9 +365,10 @@ M2FUNCTIONS = ( "centerString", "chainComplex", "changeBase", + "changeDirectory", "char", - "characters", "charAnalyzer", + "characters", "check", "checkDegrees", "chi", @@ -362,15 +386,15 @@ M2FUNCTIONS = ( "cokernel", "collectGarbage", "columnAdd", - "columnate", "columnMult", "columnPermute", "columnRankProfile", "columnSwap", + "columnate", "combine", "commandInterpreter", - "commonest", "commonRing", + "commonest", "comodule", "compareExchange", "complement", @@ -431,7 +455,6 @@ M2FUNCTIONS = ( "dictionary", "diff", "difference", - "Digamma", "dim", "directSum", "disassemble", @@ -451,7 +474,6 @@ M2FUNCTIONS = ( "eint", "elements", "eliminate", - "End", "endPackage", "entries", "erase", @@ -461,7 +483,6 @@ M2FUNCTIONS = ( "euler", "eulers", "even", - "EXAMPLE", "examples", "exchange", "exec", @@ -476,7 +497,6 @@ M2FUNCTIONS = ( "extend", "exteriorPower", "factor", - "Fano", "fileExecutable", "fileExists", "fileLength", @@ -509,14 +529,12 @@ M2FUNCTIONS = ( "fromDual", "functionBody", "futureParser", - "Gamma", "gb", "gbRemove", "gbSnapshot", "gcd", "gcdCoefficients", "gcdLLL", - "GCstats", "genera", "generateAssertions", "generator", @@ -527,16 +545,16 @@ M2FUNCTIONS = ( "gens", "genus", "get", - "getc", "getChangeMatrix", - "getenv", "getGlobalSymbol", + "getIOThreadMode", "getNetFile", "getNonUnit", "getPrimeWithRootOfUnity", "getSymbol", "getWWW", - "GF", + "getc", + "getenv", "globalAssign", "globalAssignFunction", "globalAssignment", @@ -546,11 +564,11 @@ M2FUNCTIONS = ( "gramm", "graphIdeal", "graphRing", - "Grassmannian", "groebnerBasis", "groupID", "hash", "hashTable", + "headlines", "heft", "height", "hermite", @@ -558,7 +576,6 @@ M2FUNCTIONS = ( "hilbertPolynomial", "hilbertSeries", "hold", - "Hom", "homogenize", "homology", "homomorphism", @@ -586,11 +603,11 @@ M2FUNCTIONS = ( "input", "insert", "installAssignmentMethod", - "installedPackages", "installHilbertFunction", "installMethod", "installMinprimes", "installPackage", + "installedPackages", "instance", "instances", "integralClosure", @@ -607,15 +624,14 @@ M2FUNCTIONS = ( "inverseSystem", "irreducibleCharacteristicSeries", "irreducibleDecomposition", - "isAffineRing", "isANumber", + "isAffineRing", "isBorel", - "isc", "isCanceled", "isCommutative", "isConstant", - "isDirectory", "isDirectSum", + "isDirectory", "isEmpty", "isField", "isFinite", @@ -629,10 +645,10 @@ M2FUNCTIONS = ( "isInputFile", "isIsomorphic", "isIsomorphism", + "isLLL", "isLiftable", "isLinearType", "isListener", - "isLLL", "isMember", "isModule", "isMonomialIdeal", @@ -655,6 +671,7 @@ M2FUNCTIONS = ( "isRegularFile", "isRing", "isSkewCommutative", + "isSmooth", "isSorted", "isSquareFree", "isStandardGradedPolynomialRing", @@ -665,8 +682,10 @@ M2FUNCTIONS = ( "isSurjective", "isTable", "isUnit", + "isVeryAmple", "isWellDefined", "isWeylAlgebra", + "isc", "iterator", "jacobian", "jacobianDual", @@ -695,7 +714,6 @@ M2FUNCTIONS = ( "linkFile", "listForm", "listSymbols", - "LLL", "lngamma", "load", "loadPackage", @@ -706,8 +724,6 @@ M2FUNCTIONS = ( "log1p", "lookup", "lookupCount", - "LUdecomposition", - "M2CODE", "makeDirectory", "makeDocumentTag", "makePackageIndex", @@ -730,6 +746,8 @@ M2FUNCTIONS = ( "methods", "midpoint", "min", + "minPosition", + "minPres", "mingens", "mingle", "minimalBetti", @@ -739,8 +757,6 @@ M2FUNCTIONS = ( "minimize", "minimizeFilename", "minors", - "minPosition", - "minPres", "minprimes", "minus", "mkdir", @@ -750,8 +766,8 @@ M2FUNCTIONS = ( "monoid", "monomialCurveIdeal", "monomialIdeal", - "monomials", "monomialSubideal", + "monomials", "moveFile", "multidegree", "multidoc", @@ -771,24 +787,23 @@ M2FUNCTIONS = ( "newPackage", "newRing", "next", - "nextkey", "nextPrime", - "NNParser", + "nextkey", "nonspaceAnalyzer", "norm", "normalCone", "notImplemented", - "nullhomotopy", "nullParser", "nullSpace", + "nullhomotopy", + "numColumns", + "numRows", "number", "numcols", - "numColumns", "numerator", "numeric", "numericInterval", "numgens", - "numRows", "numrows", "odd", "oeis", @@ -802,9 +817,9 @@ M2FUNCTIONS = ( "openListener", "openOut", "openOutAppend", + "optP", "optionalSignParser", "options", - "optP", "orP", "override", "pack", @@ -813,6 +828,7 @@ M2FUNCTIONS = ( "pad", "pager", "pairs", + "parallelApply", "parent", "part", "partition", @@ -841,23 +857,20 @@ M2FUNCTIONS = ( "primaryComponent", "primaryDecomposition", "print", - "printerr", "printString", + "printerr", "processID", "product", "profile", - "Proj", "projectiveHilbertPolynomial", "promote", "protect", "prune", - "pseudocode", "pseudoRemainder", + "pseudocode", "pullback", "pushForward", "pushout", - "QQParser", - "QRDecomposition", "quotient", "quotientRemainder", "radical", @@ -869,21 +882,21 @@ M2FUNCTIONS = ( "rays", "read", "readDirectory", - "readlink", "readPackage", + "readlink", "realPart", "realpath", "recursionDepth", - "reducedRowEchelonForm", "reduceHilbert", + "reducedRowEchelonForm", "reductionNumber", "reesAlgebra", "reesAlgebraIdeal", "reesIdeal", + "regSeqInIdeal", "regex", "regexQuote", "registerFinalizer", - "regSeqInIdeal", "regularity", "regularizedBeta", "regularizedGamma", @@ -926,13 +939,15 @@ M2FUNCTIONS = ( "scanValues", "schedule", "schreyerOrder", - "Schubert", "searchPath", "sec", "sech", "seeParsing", "select", "selectInSubring", + "selectKeys", + "selectPairs", + "selectValues", "selectVariables", "separate", "separateRegexp", @@ -947,6 +962,8 @@ M2FUNCTIONS = ( "setRandomSeed", "setup", "setupEmacs", + "setupLift", + "setupPromote", "sheaf", "sheafHom", "sheafMap", @@ -967,7 +984,6 @@ M2FUNCTIONS = ( "sortColumns", "source", "span", - "Spec", "specialFiber", "specialFiberIdeal", "splice", @@ -993,7 +1009,6 @@ M2FUNCTIONS = ( "sum", "super", "support", - "SVD", "switch", "sylvesterMatrix", "symbolBody", @@ -1004,7 +1019,6 @@ M2FUNCTIONS = ( "symmetricKernel", "symmetricPower", "synonym", - "SYNOPSIS", "syz", "syzygyScheme", "table", @@ -1021,7 +1035,6 @@ M2FUNCTIONS = ( "tensorAssociativity", "terminalParser", "terms", - "TEST", "testHunekeQuestion", "tests", "tex", @@ -1035,14 +1048,14 @@ M2FUNCTIONS = ( "toField", "toList", "toLower", - "top", - "topCoefficients", - "topComponents", "toRR", "toRRi", "toSequence", "toString", "toUpper", + "top", + "topCoefficients", + "topComponents", "trace", "transpose", "trim", @@ -1056,6 +1069,7 @@ M2FUNCTIONS = ( "uniform", "uninstallAllPackages", "uninstallPackage", + "union", "unique", "uniquePermutations", "unsequence", @@ -1082,12 +1096,12 @@ M2FUNCTIONS = ( "wrap", "youngest", "zero", - "zeta", - "ZZParser" + "zeta" ) M2CONSTANTS = ( "A1BrouwerDegrees", + "AbstractSimplicialComplexes", "AbstractToricVarieties", "Acknowledgement", "AdditionalPaths", @@ -1153,6 +1167,7 @@ M2CONSTANTS = ( "CharacteristicClasses", "CheckDocumentation", "Chordal", + "cite", "Classic", "clearAll", "clearOutput", @@ -1397,6 +1412,7 @@ M2CONSTANTS = ( "LongPolynomial", "M0nbar", "Macaulay2Doc", + "Maintainer", "MakeDocumentation", "MakeHTML", "MakeInfo", @@ -1432,6 +1448,9 @@ M2CONSTANTS = ( "MonomialOrder", "Monomials", "MonomialSize", + "Msolve", + "MultigradedBGG", + "MultigradedImplicitization", "MultiGradedRationalMap", "MultiplicitySequence", "MultiplierIdeals", @@ -1465,6 +1484,7 @@ M2CONSTANTS = ( "NumericalImplicitization", "NumericalLinearAlgebra", "NumericalSchubertCalculus", + "NumericalSemigroups", "NumericSolutions", "numTBBThreads", "OIGroebnerBases", @@ -1497,6 +1517,7 @@ M2CONSTANTS = ( "path", "PencilsOfQuadrics", "Permanents", + "Permutations", "PHCpack", "PhylogeneticTrees", "pi", @@ -1606,6 +1627,8 @@ M2CONSTANTS = ( "SchurComplexes", "SchurFunctors", "SchurRings", + "SchurVeronese", + "SCMAlgebras", "scriptCommandLine", "SCSCP", "SectionRing", @@ -1682,6 +1705,7 @@ M2CONSTANTS = ( "Text", "ThinSincereQuivers", "ThreadedGB", + "Threads", "Threshold", "Topcom", "topLevelMode", @@ -1701,6 +1725,7 @@ M2CONSTANTS = ( "Trim", "Triplets", "Tropical", + "TropicalToric", "true", "Truncate", "Truncations", @@ -1737,6 +1762,7 @@ M2CONSTANTS = ( "viewHelp", "VirtualResolutions", "Visualize", + "VNumber", "WebApp", "Weights", "WeylAlgebra", diff --git a/contrib/python/Pygments/py3/pygments/lexers/make.py b/contrib/python/Pygments/py3/pygments/lexers/make.py index 463e46e75bc..3940a00908f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/make.py +++ b/contrib/python/Pygments/py3/pygments/lexers/make.py @@ -4,7 +4,7 @@ Lexers for Makefiles and similar. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/maple.py b/contrib/python/Pygments/py3/pygments/lexers/maple.py new file mode 100644 index 00000000000..c744e7e1ad5 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/maple.py @@ -0,0 +1,291 @@ +""" + pygments.lexers.maple + ~~~~~~~~~~~~~~~~~~~~~ + + Lexers for Maple. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import words, bygroups, ExtendedRegexLexer +from pygments.token import Comment, Name, String, Whitespace, Operator, Punctuation, Number, Keyword + +__all__ = ['MapleLexer'] + + +class MapleLexer(ExtendedRegexLexer): + """ + Lexer for Maple. + """ + + name = 'Maple' + aliases = ['maple'] + filenames = ['*.mpl', '*.mi', '*.mm'] + mimetypes = ['text/x-maple'] + url = 'https://www.maplesoft.com/products/Maple/' + version_added = '2.19' + + keywords = ('and', + 'assuming', + 'break', + 'by', + 'catch', + 'description', + 'do', + 'done', + 'elif', + 'else', + 'end', + 'error', + 'export', + 'fi', + 'finally', + 'for', + 'from', + 'global', + 'if', + 'implies', + 'in', + 'intersect', + 'local', + 'minus', + 'mod', + 'module', + 'next', + 'not', + 'od', + 'option', + 'options', + 'or', + 'proc', + 'quit', + 'read', + 'return', + 'save', + 'stop', + 'subset', + 'then', + 'to', + 'try', + 'union', + 'use', + 'uses', + 'while', + 'xor') + + builtins = ('abs', + 'add', + 'addressof', + 'anames', + 'and', + 'andmap', + 'andseq', + 'appendto', + 'Array', + 'array', + 'ArrayOptions', + 'assemble', + 'ASSERT', + 'assign', + 'assigned', + 'attributes', + 'cat', + 'ceil', + 'coeff', + 'coeffs', + 'conjugate', + 'convert', + 'CopySign', + 'DEBUG', + 'debugopts', + 'Default0', + 'DefaultOverflow', + 'DefaultUnderflow', + 'degree', + 'denom', + 'diff', + 'disassemble', + 'divide', + 'done', + 'entries', + 'EqualEntries', + 'eval', + 'evalb', + 'evalf', + 'evalhf', + 'evalindets', + 'evaln', + 'expand', + 'exports', + 'factorial', + 'floor', + 'frac', + 'frem', + 'FromInert', + 'frontend', + 'gc', + 'genpoly', + 'has', + 'hastype', + 'hfarray', + 'icontent', + 'igcd', + 'ilcm', + 'ilog10', + 'Im', + 'implies', + 'indets', + 'indices', + 'intersect', + 'iolib', + 'iquo', + 'irem', + 'iroot', + 'iroot', + 'isqrt', + 'kernelopts', + 'lcoeff', + 'ldegree', + 'length', + 'lexorder', + 'lhs', + 'lowerbound', + 'lprint', + 'macro', + 'map', + 'max', + 'maxnorm', + 'member', + 'membertype', + 'min', + 'minus', + 'mod', + 'modp', + 'modp1', + 'modp2', + 'mods', + 'mul', + 'NextAfter', + 'nops', + 'normal', + 'not', + 'numboccur', + 'numelems', + 'numer', + 'NumericClass', + 'NumericEvent', + 'NumericEventHandler', + 'NumericStatus', + 'op', + 'or', + 'order', + 'OrderedNE', + 'ormap', + 'orseq', + 'parse', + 'piecewise', + 'pointto', + 'print', + 'quit', + 'Re', + 'readlib', + 'Record', + 'remove', + 'rhs', + 'round', + 'rtable', + 'rtable_elems', + 'rtable_eval', + 'rtable_indfns', + 'rtable_num_elems', + 'rtable_options', + 'rtable_redim', + 'rtable_scanblock', + 'rtable_set_indfn', + 'rtable_split_unit', + 'savelib', + 'Scale10', + 'Scale2', + 'SDMPolynom', + 'searchtext', + 'SearchText', + 'select', + 'selectremove', + 'seq', + 'series', + 'setattribute', + 'SFloatExponent', + 'SFloatMantissa', + 'sign', + 'sort', + 'ssystem', + 'stop', + 'String', + 'subs', + 'subset', + 'subsindets', + 'subsop', + 'substring', + 'system', + 'table', + 'taylor', + 'tcoeff', + 'time', + 'timelimit', + 'ToInert', + 'traperror', + 'trunc', + 'type', + 'typematch', + 'unames', + 'unassign', + 'union', + 'Unordered', + 'upperbound', + 'userinfo', + 'writeto', + 'xor', + 'xormap', + 'xorseq') + + def delayed_callback(self, match, ctx): + yield match.start(1), Punctuation, match.group(1) # quote + + ctx.pos = match.start(2) + orig_end = ctx.end + ctx.end = match.end(2) + + yield from self.get_tokens_unprocessed(context=ctx) + yield match.end(2), Punctuation, match.group(1) # quote + + ctx.pos = match.end() + ctx.end = orig_end + + tokens = { + 'root': [ + (r'#.*\n', Comment.Single), + (r'\(\*', Comment.Multiline, 'comment'), + (r'"(\\.|.|\s)*?"', String), + (r"('+)((.|\n)*?)\1", delayed_callback), + (r'`(\\`|.)*?`', Name), + (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword), + (words(builtins, prefix=r'\b', suffix=r'\b'), Name.Builtin), + (r'[a-zA-Z_][a-zA-Z0-9_]*', Name), + (r'(:=|\*\*|@@|<=|>=|<>|->|::|\.\.|&\+|[\+\-\*\.\^\$/@&,:=<>%~])', Operator), + (r'[;^!@$\(\)\[\]{}|_\\#?]+', Punctuation), + (r'(\d+)(\.\.)', bygroups(Number.Integer, Punctuation)), + (r'(\d*\.\d+|\d+\.\d*)([eE][+-]?\d+)?', Number.Float), + (r'\d+', Number.Integer), + (r'\s+', Whitespace), + ], + 'comment': [ + (r'.*\(\*', Comment.Multiline, '#push'), + (r'.*\*\)', Comment.Multiline, '#pop'), + (r'.*\n', Comment.Multiline), + ] + } + + def analyse_text(text): + if ':=' in text: + return 0.1
\ No newline at end of file diff --git a/contrib/python/Pygments/py3/pygments/lexers/markup.py b/contrib/python/Pygments/py3/pygments/lexers/markup.py index 5d5ff2c9fdf..acc270b153d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/markup.py +++ b/contrib/python/Pygments/py3/pygments/lexers/markup.py @@ -4,7 +4,7 @@ Lexers for non-HTML markup languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/math.py b/contrib/python/Pygments/py3/pygments/lexers/math.py index 66fd898ba1c..b225ffcf935 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/math.py +++ b/contrib/python/Pygments/py3/pygments/lexers/math.py @@ -4,7 +4,7 @@ Just export lexers that were contained in this module. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/matlab.py b/contrib/python/Pygments/py3/pygments/lexers/matlab.py index 7005a3f28ce..8eeffc9d23a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/matlab.py +++ b/contrib/python/Pygments/py3/pygments/lexers/matlab.py @@ -4,7 +4,7 @@ Lexers for Matlab and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -31,7 +31,7 @@ class MatlabLexer(RegexLexer): url = 'https://www.mathworks.com/products/matlab.html' version_added = '0.10' - _operators = r'-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\.\\|\./|/|\\' + _operators = r'-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\^|\.\\|\./|/|\\' tokens = { 'expressions': [ @@ -2747,6 +2747,7 @@ class MatlabSessionLexer(Lexer): aliases = ['matlabsession'] url = 'https://www.mathworks.com/products/matlab.html' version_added = '0.10' + _example = "matlabsession/matlabsession_sample.txt" def get_tokens_unprocessed(self, text): mlexer = MatlabLexer(**self.options) @@ -3174,7 +3175,7 @@ class OctaveLexer(RegexLexer): # operators in Octave but not Matlab requiring escape for re: (r'\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*', Operator), # operators requiring escape for re: - (r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator), + (r'\.\*|\*|\+|\.\^|\^|\.\\|\.\/|\/|\\', Operator), # punctuation: @@ -3259,7 +3260,7 @@ class ScilabLexer(RegexLexer): # operators: (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator), # operators requiring escape for re: - (r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator), + (r'\.\*|\*|\+|\.\^|\^|\.\\|\.\/|\/|\\', Operator), # punctuation: (r'[\[\](){}@.,=:;]+', Punctuation), diff --git a/contrib/python/Pygments/py3/pygments/lexers/maxima.py b/contrib/python/Pygments/py3/pygments/lexers/maxima.py index 305b7552f40..a9830883732 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/maxima.py +++ b/contrib/python/Pygments/py3/pygments/lexers/maxima.py @@ -6,7 +6,7 @@ Derived from pygments/lexers/algebra.py. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/meson.py b/contrib/python/Pygments/py3/pygments/lexers/meson.py index 8127b1691e6..6f2c6da374b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/meson.py +++ b/contrib/python/Pygments/py3/pygments/lexers/meson.py @@ -4,7 +4,7 @@ Pygments lexer for the Meson build system - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/mime.py b/contrib/python/Pygments/py3/pygments/lexers/mime.py index 4b309dd004d..45f27f42895 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/mime.py +++ b/contrib/python/Pygments/py3/pygments/lexers/mime.py @@ -4,7 +4,7 @@ Lexer for Multipurpose Internet Mail Extensions (MIME) data. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/minecraft.py b/contrib/python/Pygments/py3/pygments/lexers/minecraft.py index 99de0d5be06..fe5e9f87c53 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/minecraft.py +++ b/contrib/python/Pygments/py3/pygments/lexers/minecraft.py @@ -15,7 +15,7 @@ official: https://learn.microsoft.com/en-us/minecraft/creator/reference/content/schemasreference/ community example: https://www.mcbe-dev.net/addons/data-driven/manifest.html - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/mips.py b/contrib/python/Pygments/py3/pygments/lexers/mips.py index 8f249e18a5a..531f1b87699 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/mips.py +++ b/contrib/python/Pygments/py3/pygments/lexers/mips.py @@ -4,7 +4,7 @@ Lexers for MIPS assembly. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ml.py b/contrib/python/Pygments/py3/pygments/lexers/ml.py index ff50c6f0cb9..48a08da1cdc 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ml.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ml.py @@ -4,7 +4,7 @@ Lexers for ML family languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/modeling.py b/contrib/python/Pygments/py3/pygments/lexers/modeling.py index b5393e7483e..d681e7f3bb1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/modeling.py +++ b/contrib/python/Pygments/py3/pygments/lexers/modeling.py @@ -4,7 +4,7 @@ Lexers for modeling languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/modula2.py b/contrib/python/Pygments/py3/pygments/lexers/modula2.py index 8f5a72a3548..713f4722f7d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/modula2.py +++ b/contrib/python/Pygments/py3/pygments/lexers/modula2.py @@ -4,7 +4,7 @@ Multi-Dialect Lexer for Modula-2. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/mojo.py b/contrib/python/Pygments/py3/pygments/lexers/mojo.py index 0191dce0aac..4df18c4f9c9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/mojo.py +++ b/contrib/python/Pygments/py3/pygments/lexers/mojo.py @@ -4,7 +4,7 @@ Lexers for Mojo and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -699,6 +699,9 @@ class MojoLexer(RegexLexer): } def analyse_text(text): - return ( - shebang_matches(text, r"mojo?") or "import " in text[:1000] - ) # TODO supported? + # TODO supported? + if shebang_matches(text, r"mojo?"): + return 1.0 + if "import " in text[:1000]: + return 0.9 + return 0 diff --git a/contrib/python/Pygments/py3/pygments/lexers/monte.py b/contrib/python/Pygments/py3/pygments/lexers/monte.py index 74a2d036cc7..c01d2dc6cd6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/monte.py +++ b/contrib/python/Pygments/py3/pygments/lexers/monte.py @@ -4,7 +4,7 @@ Lexer for the Monte programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/mosel.py b/contrib/python/Pygments/py3/pygments/lexers/mosel.py index 0032c8f5913..426c9a14526 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/mosel.py +++ b/contrib/python/Pygments/py3/pygments/lexers/mosel.py @@ -5,7 +5,7 @@ Lexers for the mosel language. http://www.fico.com/en/products/fico-xpress-optimization - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ncl.py b/contrib/python/Pygments/py3/pygments/lexers/ncl.py index 499ef9411bf..d2f476087bf 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ncl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ncl.py @@ -4,7 +4,7 @@ Lexers for NCAR Command Language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/nimrod.py b/contrib/python/Pygments/py3/pygments/lexers/nimrod.py index b8be9797b12..365a8dcca96 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/nimrod.py +++ b/contrib/python/Pygments/py3/pygments/lexers/nimrod.py @@ -4,7 +4,7 @@ Lexer for the Nim language (formerly known as Nimrod). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/nit.py b/contrib/python/Pygments/py3/pygments/lexers/nit.py index 51b0a214721..2d2122c1f1b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/nit.py +++ b/contrib/python/Pygments/py3/pygments/lexers/nit.py @@ -4,7 +4,7 @@ Lexer for the Nit language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/nix.py b/contrib/python/Pygments/py3/pygments/lexers/nix.py index f763835b530..3fa88c65aaf 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/nix.py +++ b/contrib/python/Pygments/py3/pygments/lexers/nix.py @@ -4,7 +4,7 @@ Lexers for the NixOS Nix language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/numbair.py b/contrib/python/Pygments/py3/pygments/lexers/numbair.py new file mode 100644 index 00000000000..435863e132a --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/numbair.py @@ -0,0 +1,63 @@ +""" + pygments.lexers.numbair + ~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for other Numba Intermediate Representation. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, bygroups, words +from pygments.token import Whitespace, Name, String, Punctuation, Keyword, \ + Operator, Number + +__all__ = ["NumbaIRLexer"] + +class NumbaIRLexer(RegexLexer): + """ + Lexer for Numba IR + """ + name = 'Numba_IR' + url = "https://numba.readthedocs.io/en/stable/developer/architecture.html#stage-2-generate-the-numba-ir" + aliases = ['numba_ir', 'numbair'] + filenames = ['*.numba_ir'] + mimetypes = ['text/x-numba_ir', 'text/x-numbair'] + version_added = '2.19' + + identifier = r'\$[a-zA-Z0-9._]+' + fun_or_var = r'([a-zA-Z_]+[a-zA-Z0-9]*)' + + tokens = { + 'root' : [ + (r'(label)(\ [0-9]+)(:)$', + bygroups(Keyword, Name.Label, Punctuation)), + + (r'=', Operator), + include('whitespace'), + include('keyword'), + + (identifier, Name.Variable), + (fun_or_var + r'(\()', + bygroups(Name.Function, Punctuation)), + (fun_or_var + r'(\=)', + bygroups(Name.Attribute, Punctuation)), + (fun_or_var, Name.Constant), + (r'[0-9]+', Number), + + # <built-in function some> + (r'<[^>\n]*>', String), + + (r'[=<>{}\[\]()*.,!\':]|x\b', Punctuation) + ], + + 'keyword':[ + (words(( + 'del', 'jump', 'call', 'branch', + ), suffix=' '), Keyword), + ], + + 'whitespace': [ + (r'(\n|\s)+', Whitespace), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/oberon.py b/contrib/python/Pygments/py3/pygments/lexers/oberon.py index 8edf34b8e35..61f3c2d2879 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/oberon.py +++ b/contrib/python/Pygments/py3/pygments/lexers/oberon.py @@ -4,7 +4,7 @@ Lexers for Oberon family languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/objective.py b/contrib/python/Pygments/py3/pygments/lexers/objective.py index a5ee98d2c0a..899c2c44c96 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/objective.py +++ b/contrib/python/Pygments/py3/pygments/lexers/objective.py @@ -4,7 +4,7 @@ Lexers for Objective-C family languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -13,7 +13,7 @@ import re from pygments.lexer import RegexLexer, include, bygroups, using, this, words, \ inherit, default from pygments.token import Text, Keyword, Name, String, Operator, \ - Number, Punctuation, Literal, Comment + Number, Punctuation, Literal, Comment, Whitespace from pygments.lexers.c_cpp import CLexer, CppLexer @@ -296,7 +296,7 @@ class SwiftLexer(RegexLexer): 'root': [ # Whitespace and Comments (r'\n', Text), - (r'\s+', Text), + (r'\s+', Whitespace), (r'//', Comment.Single, 'comment-single'), (r'/\*', Comment.Multiline, 'comment-multi'), (r'#(if|elseif|else|endif|available)\b', Comment.Preproc, 'preproc'), @@ -437,11 +437,11 @@ class SwiftLexer(RegexLexer): r'|#(?:file|line|column|function))\b', Keyword.Constant), (r'import\b', Keyword.Declaration, 'module'), (r'(class|enum|extension|struct|protocol)(\s+)([a-zA-Z_]\w*)', - bygroups(Keyword.Declaration, Text, Name.Class)), + bygroups(Keyword.Declaration, Whitespace, Name.Class)), (r'(func)(\s+)([a-zA-Z_]\w*)', - bygroups(Keyword.Declaration, Text, Name.Function)), + bygroups(Keyword.Declaration, Whitespace, Name.Function)), (r'(var|let)(\s+)([a-zA-Z_]\w*)', bygroups(Keyword.Declaration, - Text, Name.Variable)), + Whitespace, Name.Variable)), (words(( 'actor', 'associatedtype', 'class', 'deinit', 'enum', 'extension', 'func', 'import', 'init', 'internal', 'let', 'operator', 'private', 'protocol', 'public', @@ -455,24 +455,24 @@ class SwiftLexer(RegexLexer): # Nested 'comment-single': [ - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), include('comment'), - (r'[^\n]', Comment.Single) + (r'[^\n]+', Comment.Single) ], 'comment-multi': [ include('comment'), - (r'[^*/]', Comment.Multiline), + (r'[^*/]+', Comment.Multiline), (r'/\*', Comment.Multiline, '#push'), (r'\*/', Comment.Multiline, '#pop'), - (r'[*/]', Comment.Multiline) + (r'[*/]+', Comment.Multiline) ], 'module': [ - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), (r'[a-zA-Z_]\w*', Name.Class), include('root') ], 'preproc': [ - (r'\n', Text, '#pop'), + (r'\n', Whitespace, '#pop'), include('keywords'), (r'[A-Za-z]\w*', Comment.Preproc), include('root') diff --git a/contrib/python/Pygments/py3/pygments/lexers/ooc.py b/contrib/python/Pygments/py3/pygments/lexers/ooc.py index 881a57aff62..8a990801a3c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ooc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ooc.py @@ -4,7 +4,7 @@ Lexers for the Ooc language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,7 +20,7 @@ class OocLexer(RegexLexer): For Ooc source code """ name = 'Ooc' - url = 'http://ooc-lang.org/' + url = 'https://ooc-lang.github.io/' aliases = ['ooc'] filenames = ['*.ooc'] mimetypes = ['text/x-ooc'] @@ -42,7 +42,7 @@ class OocLexer(RegexLexer): (r'(func)((?:[ \t]|\\\n)+)(~[a-z_]\w*)', bygroups(Keyword, Text, Name.Function)), (r'\bfunc\b', Keyword), - # Note: %= and ^= not listed on http://ooc-lang.org/syntax + # Note: %= not listed on https://ooc-lang.github.io/docs/lang/operators/ (r'//.*', Comment), (r'(?s)/\*.*?\*/', Comment.Multiline), (r'(==?|\+=?|-[=>]?|\*=?|/=?|:=|!=?|%=?|\?|>{1,3}=?|<{1,3}=?|\.\.|' diff --git a/contrib/python/Pygments/py3/pygments/lexers/openscad.py b/contrib/python/Pygments/py3/pygments/lexers/openscad.py index 97fb92a0320..b06de227c7c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/openscad.py +++ b/contrib/python/Pygments/py3/pygments/lexers/openscad.py @@ -4,7 +4,7 @@ Lexers for the OpenSCAD languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/other.py b/contrib/python/Pygments/py3/pygments/lexers/other.py index 838104c507e..2b7dfb4ab53 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/other.py +++ b/contrib/python/Pygments/py3/pygments/lexers/other.py @@ -4,7 +4,7 @@ Just export lexer classes previously contained in this module. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/parasail.py b/contrib/python/Pygments/py3/pygments/lexers/parasail.py index c525ff0b7ad..150d6a9c482 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/parasail.py +++ b/contrib/python/Pygments/py3/pygments/lexers/parasail.py @@ -4,7 +4,7 @@ Lexer for ParaSail. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/parsers.py b/contrib/python/Pygments/py3/pygments/lexers/parsers.py index 2e0ae0ccad8..7a4ed9d1df7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/parsers.py +++ b/contrib/python/Pygments/py3/pygments/lexers/parsers.py @@ -4,7 +4,7 @@ Lexers for parser generators. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/pascal.py b/contrib/python/Pygments/py3/pygments/lexers/pascal.py index bb5e1e75ed8..5f40dcc86a1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pascal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pascal.py @@ -4,7 +4,7 @@ Lexers for Pascal family languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/pawn.py b/contrib/python/Pygments/py3/pygments/lexers/pawn.py index 484e8dcb9bd..99d9c963d14 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pawn.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pawn.py @@ -4,7 +4,7 @@ Lexers for the Pawn languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/pddl.py b/contrib/python/Pygments/py3/pygments/lexers/pddl.py new file mode 100644 index 00000000000..77aa75362ff --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/pddl.py @@ -0,0 +1,82 @@ +""" + pygments.lexers.pddl + ~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Planning Domain Definition Language. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + + +from pygments.lexer import RegexLexer, words, include +from pygments.token import Punctuation, Keyword, Whitespace, Name, Comment, \ + Operator, Number + + +__all__ = ['PddlLexer'] + + +class PddlLexer(RegexLexer): + """ + A PDDL lexer. + + It should support up to PDDL 3.1. + """ + + name = 'PDDL' + aliases = ['pddl'] + filenames = ['*.pddl'] + # there doesn't really seem to be a PDDL homepage. + url = 'https://en.wikipedia.org/wiki/Planning_Domain_Definition_Language' + version_added = '2.19' + + tokens = { + 'root': [ + (r'\s+', Whitespace), + (r';.*$', Comment.Singleline), + include('keywords'), + include('builtins'), + (r'[()]', Punctuation), + (r'[=/*+><-]', Operator), + (r'[a-zA-Z][a-zA-Z0-9_-]*', Name), + (r'\?[a-zA-Z][a-zA-Z0-9_-]*', Name.Variable), + (r'[0-9]+\.[0-9]+', Number.Float), + (r'[0-9]+', Number.Integer), + ], + 'keywords': [ + (words(( + ':requirements', ':types', ':constants', + ':predicates', ':functions', ':action', ':agent', + ':parameters', ':precondition', ':effect', + ':durative-action', ':duration', ':condition', + ':derived', ':domain', ':objects', ':init', + ':goal', ':metric', ':length', ':serial', ':parallel', + # the following are requirements + ':strips', ':typing', ':negative-preconditions', + ':disjunctive-preconditions', ':equality', + ':existential-preconditions', ':universal-preconditions', + ':conditional-effects', ':fluents', ':numeric-fluents', + ':object-fluents', ':adl', ':durative-actions', + ':continuous-effects', ':derived-predicates', + ':time-intial-literals', ':preferences', + ':constraints', ':action-costs', ':multi-agent', + ':unfactored-privacy', ':factored-privacy', + ':non-deterministic' + ), suffix=r'\b'), Keyword) + ], + 'builtins': [ + (words(( + 'define', 'domain', 'object', 'either', 'and', + 'forall', 'preference', 'imply', 'or', 'exists', + 'not', 'when', 'assign', 'scale-up', 'scale-down', + 'increase', 'decrease', 'at', 'over', 'start', + 'end', 'all', 'problem', 'always', 'sometime', + 'within', 'at-most-once', 'sometime-after', + 'sometime-before', 'always-within', 'hold-during', + 'hold-after', 'minimize', 'maximize', + 'total-time', 'is-violated'), suffix=r'\b'), + Name.Builtin) + ] + } + diff --git a/contrib/python/Pygments/py3/pygments/lexers/perl.py b/contrib/python/Pygments/py3/pygments/lexers/perl.py index 3ec19445c45..33f91f5800b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/perl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/perl.py @@ -4,7 +4,7 @@ Lexers for Perl, Raku and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/phix.py b/contrib/python/Pygments/py3/pygments/lexers/phix.py index 29082e05cd0..f0b03775e27 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/phix.py +++ b/contrib/python/Pygments/py3/pygments/lexers/phix.py @@ -4,7 +4,7 @@ Lexers for Phix. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/php.py b/contrib/python/Pygments/py3/pygments/lexers/php.py index 4f00c6f48a4..82d4aeb3d9d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/php.py +++ b/contrib/python/Pygments/py3/pygments/lexers/php.py @@ -4,7 +4,7 @@ Lexers for PHP and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/pointless.py b/contrib/python/Pygments/py3/pygments/lexers/pointless.py index 4e330e3da69..adedb757d89 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pointless.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pointless.py @@ -4,7 +4,7 @@ Lexers for Pointless. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/pony.py b/contrib/python/Pygments/py3/pygments/lexers/pony.py index f7fc769db5b..055423a4694 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/pony.py +++ b/contrib/python/Pygments/py3/pygments/lexers/pony.py @@ -4,7 +4,7 @@ Lexers for Pony and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/praat.py b/contrib/python/Pygments/py3/pygments/lexers/praat.py index e10cac489e8..054f5b61e56 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/praat.py +++ b/contrib/python/Pygments/py3/pygments/lexers/praat.py @@ -4,7 +4,7 @@ Lexer for Praat - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/procfile.py b/contrib/python/Pygments/py3/pygments/lexers/procfile.py index 3b42b3164da..32619804f88 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/procfile.py +++ b/contrib/python/Pygments/py3/pygments/lexers/procfile.py @@ -4,7 +4,7 @@ Lexer for Procfile file format. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/prolog.py b/contrib/python/Pygments/py3/pygments/lexers/prolog.py index 7578889d113..7bf951c1c4f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/prolog.py +++ b/contrib/python/Pygments/py3/pygments/lexers/prolog.py @@ -4,7 +4,7 @@ Lexers for Prolog and Prolog-like languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/promql.py b/contrib/python/Pygments/py3/pygments/lexers/promql.py index 7996c3d0743..cad3c254a12 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/promql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/promql.py @@ -4,7 +4,7 @@ Lexer for Prometheus Query Language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/prql.py b/contrib/python/Pygments/py3/pygments/lexers/prql.py index 1f22eb29d09..ee95d2d4749 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/prql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/prql.py @@ -4,7 +4,7 @@ Lexer for the PRQL query language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ptx.py b/contrib/python/Pygments/py3/pygments/lexers/ptx.py index 405e7f7e2dd..784ca13a6f0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ptx.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ptx.py @@ -4,7 +4,7 @@ Lexer for other PTX language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/python.py b/contrib/python/Pygments/py3/pygments/lexers/python.py index 287305c75cc..805f6ff2ac7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/python.py +++ b/contrib/python/Pygments/py3/pygments/lexers/python.py @@ -4,7 +4,7 @@ Lexers for Python and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -33,7 +33,7 @@ class PythonLexer(RegexLexer): name = 'Python' url = 'https://www.python.org' - aliases = ['python', 'py', 'sage', 'python3', 'py3', 'bazel', 'starlark'] + aliases = ['python', 'py', 'sage', 'python3', 'py3', 'bazel', 'starlark', 'pyi'] filenames = [ '*.py', '*.pyw', @@ -109,11 +109,11 @@ class PythonLexer(RegexLexer): (r'\\', Text), include('keywords'), include('soft-keywords'), - (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'funcname'), - (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'), - (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'funcname'), + (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'classname'), + (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace), 'fromimport'), - (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace), 'import'), include('expr'), ], @@ -329,14 +329,14 @@ class PythonLexer(RegexLexer): (uni_name, Name.Class, '#pop'), ], 'import': [ - (r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)), + (r'(\s+)(as)(\s+)', bygroups(Whitespace, Keyword, Whitespace)), (r'\.', Name.Namespace), (uni_name, Name.Namespace), - (r'(\s*)(,)(\s*)', bygroups(Text, Operator, Text)), + (r'(\s*)(,)(\s*)', bygroups(Whitespace, Operator, Whitespace)), default('#pop') # all else: go back ], 'fromimport': [ - (r'(\s+)(import)\b', bygroups(Text, Keyword.Namespace), '#pop'), + (r'(\s+)(import)\b', bygroups(Whitespace, Keyword.Namespace), '#pop'), (r'\.', Name.Namespace), # if None occurs here, it's "raise x from None", since None can # never be a module name @@ -459,11 +459,11 @@ class Python2Lexer(RegexLexer): (r'(in|is|and|or|not)\b', Operator.Word), (r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator), include('keywords'), - (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'funcname'), - (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'classname'), - (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + (r'(def)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'funcname'), + (r'(class)((?:\s|\\\s)+)', bygroups(Keyword, Whitespace), 'classname'), + (r'(from)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace), 'fromimport'), - (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Text), + (r'(import)((?:\s|\\\s)+)', bygroups(Keyword.Namespace, Whitespace), 'import'), include('builtins'), include('magicfuncs'), @@ -635,6 +635,7 @@ class Python2Lexer(RegexLexer): def analyse_text(text): return shebang_matches(text, r'pythonw?2(\.\d)?') + class _PythonConsoleLexerBase(RegexLexer): name = 'Python console session' aliases = ['pycon', 'python-console'] @@ -671,6 +672,7 @@ class _PythonConsoleLexerBase(RegexLexer): ], } + class PythonConsoleLexer(DelegatingLexer): """ For Python console output or doctests, such as: @@ -719,6 +721,7 @@ class PythonConsoleLexer(DelegatingLexer): super().__init__(pylexer, _PythonConsoleLexerBase, Other.Code, **options) super().__init__(tblexer, _ReplaceInnerCode, Other.Traceback, **options) + class PythonTracebackLexer(RegexLexer): """ For Python 3.x tracebacks, with support for chained exceptions. @@ -851,16 +854,16 @@ class CythonLexer(RegexLexer): bygroups(Punctuation, Keyword.Type, Punctuation)), (r'!=|==|<<|>>|[-~+/*%=<>&^|.?]', Operator), (r'(from)(\d+)(<=)(\s+)(<)(\d+)(:)', - bygroups(Keyword, Number.Integer, Operator, Name, Operator, + bygroups(Keyword, Number.Integer, Operator, Whitespace, Operator, Name, Punctuation)), include('keywords'), - (r'(def|property)(\s+)', bygroups(Keyword, Text), 'funcname'), - (r'(cp?def)(\s+)', bygroups(Keyword, Text), 'cdef'), + (r'(def|property)(\s+)', bygroups(Keyword, Whitespace), 'funcname'), + (r'(cp?def)(\s+)', bygroups(Keyword, Whitespace), 'cdef'), # (should actually start a block with only cdefs) (r'(cdef)(:)', bygroups(Keyword, Punctuation)), - (r'(class|struct)(\s+)', bygroups(Keyword, Text), 'classname'), - (r'(from)(\s+)', bygroups(Keyword, Text), 'fromimport'), - (r'(c?import)(\s+)', bygroups(Keyword, Text), 'import'), + (r'(class|struct)(\s+)', bygroups(Keyword, Whitespace), 'classname'), + (r'(from)(\s+)', bygroups(Keyword, Whitespace), 'fromimport'), + (r'(c?import)(\s+)', bygroups(Keyword, Whitespace), 'import'), include('builtins'), include('backtick'), ('(?:[rR]|[uU][rR]|[rR][uU])"""', String, 'tdqs'), @@ -938,9 +941,9 @@ class CythonLexer(RegexLexer): (r'(public|readonly|extern|api|inline)\b', Keyword.Reserved), (r'(struct|enum|union|class)\b', Keyword), (r'([a-zA-Z_]\w*)(\s*)(?=[(:#=]|$)', - bygroups(Name.Function, Text), '#pop'), + bygroups(Name.Function, Whitespace), '#pop'), (r'([a-zA-Z_]\w*)(\s*)(,)', - bygroups(Name.Function, Text, Punctuation)), + bygroups(Name.Function, Whitespace, Punctuation)), (r'from\b', Keyword, '#pop'), (r'as\b', Keyword), (r':', Punctuation, '#pop'), @@ -952,13 +955,13 @@ class CythonLexer(RegexLexer): (r'[a-zA-Z_]\w*', Name.Class, '#pop') ], 'import': [ - (r'(\s+)(as)(\s+)', bygroups(Text, Keyword, Text)), + (r'(\s+)(as)(\s+)', bygroups(Whitespace, Keyword, Whitespace)), (r'[a-zA-Z_][\w.]*', Name.Namespace), - (r'(\s*)(,)(\s*)', bygroups(Text, Operator, Text)), + (r'(\s*)(,)(\s*)', bygroups(Whitespace, Operator, Whitespace)), default('#pop') # all else: go back ], 'fromimport': [ - (r'(\s+)(c?import)\b', bygroups(Text, Keyword), '#pop'), + (r'(\s+)(c?import)\b', bygroups(Whitespace, Keyword), '#pop'), (r'[a-zA-Z_.][\w.]*', Name.Namespace), # ``cdef foo from "header"``, or ``for foo from 0 < i < 10`` default('#pop'), diff --git a/contrib/python/Pygments/py3/pygments/lexers/q.py b/contrib/python/Pygments/py3/pygments/lexers/q.py index 6ab121c8873..bfa8017e65a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/q.py +++ b/contrib/python/Pygments/py3/pygments/lexers/q.py @@ -4,7 +4,7 @@ Lexer for the Q programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/qlik.py b/contrib/python/Pygments/py3/pygments/lexers/qlik.py index b9b8721a2e1..a29f89f35a9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/qlik.py +++ b/contrib/python/Pygments/py3/pygments/lexers/qlik.py @@ -4,7 +4,7 @@ Lexer for the qlik scripting language - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/qvt.py b/contrib/python/Pygments/py3/pygments/lexers/qvt.py index c3012100ce0..302d1b6ed89 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/qvt.py +++ b/contrib/python/Pygments/py3/pygments/lexers/qvt.py @@ -4,7 +4,7 @@ Lexer for QVT Operational language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/r.py b/contrib/python/Pygments/py3/pygments/lexers/r.py index 8d7e4a8dfa5..d3f65ba2d86 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/r.py +++ b/contrib/python/Pygments/py3/pygments/lexers/r.py @@ -4,7 +4,7 @@ Lexers for the R/S languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -30,6 +30,7 @@ class RConsoleLexer(Lexer): filenames = ['*.Rout'] url = 'https://www.r-project.org' version_added = '' + _example = "rconsole/r-console-transcript.Rout" def get_tokens_unprocessed(self, text): slexer = SLexer(**self.options) @@ -87,6 +88,9 @@ class SLexer(RegexLexer): 'valid_name': [ (valid_name, Name), ], + 'function_name': [ + (rf'({valid_name})\s*(?=\()', Name.Function), + ], 'punctuation': [ (r'\[{1,2}|\]{1,2}|\(|\)|;|,', Punctuation), ], @@ -96,7 +100,7 @@ class SLexer(RegexLexer): Keyword.Reserved), ], 'operators': [ - (r'<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\?', Operator), + (r'<<?-|->>?|-|==|<=|>=|\|>|<|>|&&?|!=|\|\|?|\?', Operator), (r'\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}', Operator), ], 'builtin_symbols': [ @@ -120,15 +124,15 @@ class SLexer(RegexLexer): (r'\'', String, 'string_squote'), (r'\"', String, 'string_dquote'), include('builtin_symbols'), + include('keywords'), + include('function_name'), include('valid_name'), include('numbers'), - include('keywords'), include('punctuation'), include('operators'), ], 'root': [ # calls: - (rf'({valid_name})\s*(?=\()', Name.Function), include('statements'), # blocks: (r'\{|\}', Punctuation), diff --git a/contrib/python/Pygments/py3/pygments/lexers/rdf.py b/contrib/python/Pygments/py3/pygments/lexers/rdf.py index 1a0571be7a0..4930c1b387a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rdf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rdf.py @@ -4,7 +4,7 @@ Lexers for semantic web and RDF query languages and markup. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -280,7 +280,7 @@ class TurtleLexer(RegexLexer): ], 'triple-double-quoted-string': [ (r'"""', String, 'end-of-string'), - (r'[^\\]+', String), + (r'[^\\]+(?=""")', String), (r'\\', String, 'string-escape'), ], 'single-double-quoted-string': [ @@ -290,7 +290,7 @@ class TurtleLexer(RegexLexer): ], 'triple-single-quoted-string': [ (r"'''", String, 'end-of-string'), - (r'[^\\]+', String), + (r"[^\\]+(?=''')", String), (r'\\', String, 'string-escape'), ], 'single-single-quoted-string': [ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rebol.py b/contrib/python/Pygments/py3/pygments/lexers/rebol.py index 94656f4f266..4b37a749450 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rebol.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rebol.py @@ -4,7 +4,7 @@ Lexers for the REBOL and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rego.py b/contrib/python/Pygments/py3/pygments/lexers/rego.py new file mode 100644 index 00000000000..6f2e3e9e669 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/rego.py @@ -0,0 +1,57 @@ +""" + pygments.lexers.rego + ~~~~~~~~~~~~~~~~~~~~ + + Lexers for the Rego policy languages. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, words +from pygments.token import Comment, Operator, Keyword, Name, String, Number, Punctuation, Whitespace + +class RegoLexer(RegexLexer): + """ + For Rego source. + """ + name = 'Rego' + url = 'https://www.openpolicyagent.org/docs/latest/policy-language/' + filenames = ['*.rego'] + aliases = ['rego'] + mimetypes = ['text/x-rego'] + version_added = '2.19' + + reserved_words = ( + 'as', 'contains', 'data', 'default', 'else', 'every', 'false', + 'if', 'in', 'import', 'package', 'not', 'null', + 'some', 'true', 'with' + ) + + builtins = ( + # https://www.openpolicyagent.org/docs/latest/philosophy/#the-opa-document-model + 'data', # Global variable for accessing base and virtual documents + 'input', # Represents synchronously pushed base documents + ) + + tokens = { + 'root': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'#.*?$', Comment.Single), + (words(reserved_words, suffix=r'\b'), Keyword), + (words(builtins, suffix=r'\b'), Name.Builtin), + (r'[a-zA-Z_][a-zA-Z0-9_]*', Name), + (r'"(\\\\|\\"|[^"])*"', String.Double), + (r'`[^`]*`', String.Backtick), + (r'-?\d+(\.\d+)?', Number), + (r'(==|!=|<=|>=|:=)', Operator), # Compound operators + (r'[=<>+\-*/%&|]', Operator), # Single-character operators + (r'[\[\]{}(),.:;]', Punctuation), + ] + } + +__all__ = ['RegoLexer'] + + + diff --git a/contrib/python/Pygments/py3/pygments/lexers/resource.py b/contrib/python/Pygments/py3/pygments/lexers/resource.py index f2e965cd1f5..9593c2124c1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/resource.py +++ b/contrib/python/Pygments/py3/pygments/lexers/resource.py @@ -4,7 +4,7 @@ Lexer for resource definition files. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ride.py b/contrib/python/Pygments/py3/pygments/lexers/ride.py index 1c3ba928b12..4d60c29cbb2 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ride.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ride.py @@ -4,7 +4,7 @@ Lexer for the Ride programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rita.py b/contrib/python/Pygments/py3/pygments/lexers/rita.py index 53da9be2622..536aafffd2e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rita.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rita.py @@ -4,7 +4,7 @@ Lexers for RITA language - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rnc.py b/contrib/python/Pygments/py3/pygments/lexers/rnc.py index af157d63bd0..b7a06bb9183 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rnc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rnc.py @@ -4,7 +4,7 @@ Lexer for Relax-NG Compact syntax - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/roboconf.py b/contrib/python/Pygments/py3/pygments/lexers/roboconf.py index 7e0b1054499..31adba9f48f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/roboconf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/roboconf.py @@ -4,7 +4,7 @@ Lexers for Roboconf DSL. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/robotframework.py b/contrib/python/Pygments/py3/pygments/lexers/robotframework.py index 54494419404..f92d567503f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/robotframework.py +++ b/contrib/python/Pygments/py3/pygments/lexers/robotframework.py @@ -4,7 +4,7 @@ Lexer for Robot Framework. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/ruby.py b/contrib/python/Pygments/py3/pygments/lexers/ruby.py index 134ff779f23..72aaeb5fec0 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ruby.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ruby.py @@ -4,7 +4,7 @@ Lexers for Ruby and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/rust.py b/contrib/python/Pygments/py3/pygments/lexers/rust.py index 04e15c8c774..63410475553 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/rust.py +++ b/contrib/python/Pygments/py3/pygments/lexers/rust.py @@ -4,7 +4,7 @@ Lexers for the Rust language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/sas.py b/contrib/python/Pygments/py3/pygments/lexers/sas.py index c3039090eb3..1b2ad432d23 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sas.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sas.py @@ -4,7 +4,7 @@ Lexer for SAS. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/savi.py b/contrib/python/Pygments/py3/pygments/lexers/savi.py index f65818f37cd..1e443ae302a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/savi.py +++ b/contrib/python/Pygments/py3/pygments/lexers/savi.py @@ -4,7 +4,7 @@ Lexer for Savi. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/scdoc.py b/contrib/python/Pygments/py3/pygments/lexers/scdoc.py index fecdd9c921a..8e850d02ed8 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/scdoc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/scdoc.py @@ -4,7 +4,7 @@ Lexer for scdoc, a simple man page generator. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/scripting.py b/contrib/python/Pygments/py3/pygments/lexers/scripting.py index d38387e0737..6e494c33b8e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/scripting.py +++ b/contrib/python/Pygments/py3/pygments/lexers/scripting.py @@ -4,7 +4,7 @@ Lexer for scripting and embedded languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -21,6 +21,10 @@ __all__ = ['LuaLexer', 'LuauLexer', 'MoonScriptLexer', 'ChaiscriptLexer', 'LSLLe 'EasytrieveLexer', 'JclLexer', 'MiniScriptLexer'] +def all_lua_builtins(): + from pygments.lexers._lua_builtins import MODULES + return [w for values in MODULES.values() for w in values] + class LuaLexer(RegexLexer): """ For Lua source code. @@ -53,7 +57,7 @@ class LuaLexer(RegexLexer): _comment_multiline = r'(?:--\[(?P<level>=*)\[[\w\W]*?\](?P=level)\])' _comment_single = r'(?:--.*$)' - _space = r'(?:\s+)' + _space = r'(?:\s+(?!\s))' _s = rf'(?:{_comment_multiline}|{_comment_single}|{_space})' _name = r'(?:[^\W\d]\w*)' @@ -66,7 +70,7 @@ class LuaLexer(RegexLexer): 'ws': [ (_comment_multiline, Comment.Multiline), (_comment_single, Comment.Single), - (_space, Text), + (_space, Whitespace), ], 'base': [ include('ws'), @@ -82,23 +86,37 @@ class LuaLexer(RegexLexer): (r'::', Punctuation, 'label'), (r'\.{3}', Punctuation), (r'[=<>|~&+\-*/%#^]+|\.\.', Operator), - (r'[\[\]{}().,:;]', Punctuation), + (r'[\[\]{}().,:;]+', Punctuation), (r'(and|or|not)\b', Operator.Word), - ('(break|do|else|elseif|end|for|if|in|repeat|return|then|until|' - r'while)\b', Keyword.Reserved), + (words([ + 'break', 'do', 'else', 'elseif', 'end', 'for', 'if', 'in', + 'repeat', 'return', 'then', 'until', 'while' + ], suffix=r'\b'), Keyword.Reserved), (r'goto\b', Keyword.Reserved, 'goto'), (r'(local)\b', Keyword.Declaration), (r'(true|false|nil)\b', Keyword.Constant), (r'(function)\b', Keyword.Reserved, 'funcname'), - (r'[A-Za-z_]\w*(\.[A-Za-z_]\w*)?', Name), + (words(all_lua_builtins(), suffix=r"\b"), Name.Builtin), + (fr'[A-Za-z_]\w*(?={_s}*[.:])', Name.Variable, 'varname'), + (fr'[A-Za-z_]\w*(?={_s}*\()', Name.Function), + (r'[A-Za-z_]\w*', Name.Variable), ("'", String.Single, combined('stringescape', 'sqs')), ('"', String.Double, combined('stringescape', 'dqs')) ], + 'varname': [ + include('ws'), + (r'\.\.', Operator, '#pop'), + (r'[.:]', Punctuation), + (rf'{_name}(?={_s}*[.:])', Name.Property), + (rf'{_name}(?={_s}*\()', Name.Function, '#pop'), + (_name, Name.Property, '#pop'), + ], + 'funcname': [ include('ws'), (r'[.:]', Punctuation), @@ -151,16 +169,15 @@ class LuaLexer(RegexLexer): def get_tokens_unprocessed(self, text): for index, token, value in \ RegexLexer.get_tokens_unprocessed(self, text): - if token is Name: - if value in self._functions: - yield index, Name.Builtin, value - continue - elif '.' in value: + if token is Name.Builtin and value not in self._functions: + if '.' in value: a, b = value.split('.') yield index, Name, a yield index + len(a), Punctuation, '.' yield index + len(a) + 1, Name, b - continue + else: + yield index, Name, value + continue yield index, token, value def _luau_make_expression(should_pop, _s): @@ -521,7 +538,8 @@ class MoonScriptLexer(LuaLexer): (r'(self)\b', Name.Builtin.Pseudo), (r'@@?([a-zA-Z_]\w*)?', Name.Variable.Class), (r'[A-Z]\w*', Name.Class), # proper name - (r'[A-Za-z_]\w*(\.[A-Za-z_]\w*)?', Name), + (words(all_lua_builtins(), suffix=r"\b"), Name.Builtin), + (r'[A-Za-z_]\w*', Name), ("'", String.Single, combined('stringescape', 'sqs')), ('"', String.Double, combined('stringescape', 'dqs')) ], diff --git a/contrib/python/Pygments/py3/pygments/lexers/sgf.py b/contrib/python/Pygments/py3/pygments/lexers/sgf.py index 21861e4a20b..f0e56cba552 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sgf.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sgf.py @@ -4,7 +4,7 @@ Lexer for Smart Game Format (sgf) file format. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/shell.py b/contrib/python/Pygments/py3/pygments/lexers/shell.py index cfab8591cc5..744767a1d44 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/shell.py +++ b/contrib/python/Pygments/py3/pygments/lexers/shell.py @@ -4,7 +4,7 @@ Lexers for various shells. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -232,6 +232,7 @@ class BashSessionLexer(ShellSessionBaseLexer): mimetypes = ['application/x-shell-session', 'application/x-sh-session'] url = 'https://en.wikipedia.org/wiki/Unix_shell' version_added = '1.1' + _example = "console/example.sh-session" _innerLexerCls = BashLexer _ps1rgx = re.compile( @@ -542,6 +543,7 @@ class MSDOSSessionLexer(ShellSessionBaseLexer): mimetypes = [] url = 'https://en.wikipedia.org/wiki/MS-DOS' version_added = '2.1' + _example = "doscon/session" _innerLexerCls = BatchLexer _ps1rgx = re.compile(r'^([^>]*>)(.*\n?)') @@ -628,6 +630,7 @@ class TcshSessionLexer(ShellSessionBaseLexer): mimetypes = [] url = 'https://www.tcsh.org' version_added = '2.1' + _example = "tcshcon/session" _innerLexerCls = TcshLexer _ps1rgx = re.compile(r'^([^>]+>)(.*\n?)') @@ -760,6 +763,7 @@ class PowerShellSessionLexer(ShellSessionBaseLexer): mimetypes = [] url = 'https://learn.microsoft.com/en-us/powershell' version_added = '2.1' + _example = "pwsh-session/session" _innerLexerCls = PowerShellLexer _bare_continuation = True diff --git a/contrib/python/Pygments/py3/pygments/lexers/sieve.py b/contrib/python/Pygments/py3/pygments/lexers/sieve.py index 19d9d549dc0..fc48980c499 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sieve.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sieve.py @@ -13,7 +13,7 @@ https://tools.ietf.org/html/rfc5429 https://tools.ietf.org/html/rfc8580 - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/slash.py b/contrib/python/Pygments/py3/pygments/lexers/slash.py index 5ff20592e32..1c439d0db0f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/slash.py +++ b/contrib/python/Pygments/py3/pygments/lexers/slash.py @@ -4,7 +4,7 @@ Lexer for the Slash programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py b/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py index df46aa2b9c7..674b7b4b345 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py +++ b/contrib/python/Pygments/py3/pygments/lexers/smalltalk.py @@ -4,7 +4,7 @@ Lexers for Smalltalk and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/smithy.py b/contrib/python/Pygments/py3/pygments/lexers/smithy.py index 3835258abca..bd479aec40c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/smithy.py +++ b/contrib/python/Pygments/py3/pygments/lexers/smithy.py @@ -4,7 +4,7 @@ Lexers for the Smithy IDL. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/smv.py b/contrib/python/Pygments/py3/pygments/lexers/smv.py index 5bccf22d3a2..bf97b52a5ce 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/smv.py +++ b/contrib/python/Pygments/py3/pygments/lexers/smv.py @@ -4,7 +4,7 @@ Lexers for the SMV languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/snobol.py b/contrib/python/Pygments/py3/pygments/lexers/snobol.py index c8c1d03d27b..bab51e9b110 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/snobol.py +++ b/contrib/python/Pygments/py3/pygments/lexers/snobol.py @@ -4,7 +4,7 @@ Lexers for the SNOBOL language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/solidity.py b/contrib/python/Pygments/py3/pygments/lexers/solidity.py index b3ad9241d5e..3182a148a38 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/solidity.py +++ b/contrib/python/Pygments/py3/pygments/lexers/solidity.py @@ -4,7 +4,7 @@ Lexers for Solidity. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/soong.py b/contrib/python/Pygments/py3/pygments/lexers/soong.py index b47d87fb393..bbf204dd225 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/soong.py +++ b/contrib/python/Pygments/py3/pygments/lexers/soong.py @@ -4,7 +4,7 @@ Lexers for Soong (Android.bp Blueprint) files. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/sophia.py b/contrib/python/Pygments/py3/pygments/lexers/sophia.py index 89dbee79ebf..37fcec5c39b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sophia.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sophia.py @@ -6,7 +6,7 @@ Derived from pygments/lexers/reason.py. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/special.py b/contrib/python/Pygments/py3/pygments/lexers/special.py index 22ad1e6cec2..524946fc310 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/special.py +++ b/contrib/python/Pygments/py3/pygments/lexers/special.py @@ -4,7 +4,7 @@ Special lexers. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -46,6 +46,7 @@ class OutputLexer(Lexer): aliases = ['output'] url = "" version_added = '2.10' + _example = "output/output" def get_tokens_unprocessed(self, text): yield 0, Generic.Output, text diff --git a/contrib/python/Pygments/py3/pygments/lexers/spice.py b/contrib/python/Pygments/py3/pygments/lexers/spice.py index ec7cd978574..9d2b1a1a81a 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/spice.py +++ b/contrib/python/Pygments/py3/pygments/lexers/spice.py @@ -4,7 +4,7 @@ Lexers for the Spice programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/sql.py b/contrib/python/Pygments/py3/pygments/lexers/sql.py index 31b45fbb7d9..d3e6f17f394 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/sql.py +++ b/contrib/python/Pygments/py3/pygments/lexers/sql.py @@ -36,32 +36,27 @@ The ``tests/examplefiles`` contains a few test files with data to be parsed by these lexers. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ +import collections import re from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, words +from pygments.lexers import _googlesql_builtins +from pygments.lexers import _mysql_builtins +from pygments.lexers import _postgres_builtins +from pygments.lexers import _sql_builtins +from pygments.lexers import _tsql_builtins +from pygments.lexers import get_lexer_by_name, ClassNotFound from pygments.token import Punctuation, Whitespace, Text, Comment, Operator, \ Keyword, Name, String, Number, Generic, Literal -from pygments.lexers import get_lexer_by_name, ClassNotFound - -from pygments.lexers._postgres_builtins import KEYWORDS, DATATYPES, \ - PSEUDO_TYPES, PLPGSQL_KEYWORDS, EXPLAIN_KEYWORDS -from pygments.lexers._mysql_builtins import \ - MYSQL_CONSTANTS, \ - MYSQL_DATATYPES, \ - MYSQL_FUNCTIONS, \ - MYSQL_KEYWORDS, \ - MYSQL_OPTIMIZER_HINTS - -from pygments.lexers import _tsql_builtins -__all__ = ['PostgresLexer', 'PlPgsqlLexer', 'PostgresConsoleLexer', - 'PostgresExplainLexer', 'SqlLexer', 'TransactSqlLexer', - 'MySqlLexer', 'SqliteConsoleLexer', 'RqlLexer'] +__all__ = ['GoogleSqlLexer', 'PostgresLexer', 'PlPgsqlLexer', + 'PostgresConsoleLexer', 'PostgresExplainLexer', 'SqlLexer', + 'TransactSqlLexer', 'MySqlLexer', 'SqliteConsoleLexer', 'RqlLexer'] line_re = re.compile('.*?\n') sqlite_prompt_re = re.compile(r'^(?:sqlite| ...)>(?= )') @@ -77,6 +72,12 @@ tsql_go_re = re.compile(r'\bgo\b', re.IGNORECASE) tsql_declare_re = re.compile(r'\bdeclare\s+@', re.IGNORECASE) tsql_variable_re = re.compile(r'@[a-zA-Z_]\w*\b') +# Identifiers for analyse_text() +googlesql_identifiers = ( + _googlesql_builtins.functionnames + + _googlesql_builtins.keywords + + _googlesql_builtins.types) + def language_callback(lexer, match): """Parse the content of a $-string using a lexer @@ -169,9 +170,10 @@ class PostgresLexer(PostgresBase, RegexLexer): (r'--.*\n?', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), (r'(' + '|'.join(s.replace(" ", r"\s+") - for s in DATATYPES + PSEUDO_TYPES) + r')\b', + for s in _postgres_builtins.DATATYPES + + _postgres_builtins.PSEUDO_TYPES) + r')\b', Name.Builtin), - (words(KEYWORDS, suffix=r'\b'), Keyword), + (words(_postgres_builtins.KEYWORDS, suffix=r'\b'), Keyword), (r'[+*/<>=~!@#%^&|`?-]+', Operator), (r'::', Operator), # cast (r'\$\d+', Name.Variable), @@ -225,7 +227,8 @@ class PlPgsqlLexer(PostgresBase, RegexLexer): for i, pattern in enumerate(tokens['root']): if pattern[1] == Keyword: tokens['root'][i] = ( - words(KEYWORDS + PLPGSQL_KEYWORDS, suffix=r'\b'), + words(_postgres_builtins.KEYWORDS + + _postgres_builtins.PLPGSQL_KEYWORDS, suffix=r'\b'), Keyword) del i break @@ -310,6 +313,7 @@ class PostgresConsoleLexer(Lexer): mimetypes = ['text/x-postgresql-psql'] url = 'https://www.postgresql.org' version_added = '1.5' + _example = "psql/psql_session.txt" def get_tokens_unprocessed(self, data): sql = PsqlRegexLexer(**self.options) @@ -386,7 +390,7 @@ class PostgresExplainLexer(RegexLexer): tokens = { 'root': [ - (r'(:|\(|\)|ms|kB|->|\.\.|\,)', Punctuation), + (r'(:|\(|\)|ms|kB|->|\.\.|\,|\/)', Punctuation), (r'(\s+)', Whitespace), # This match estimated cost and effectively measured counters with ANALYZE @@ -395,9 +399,9 @@ class PostgresExplainLexer(RegexLexer): (r'(actual)( )(=?)', bygroups(Name.Class, Whitespace, Punctuation), 'instrumentation'), # Misc keywords - (words(('actual', 'Memory Usage', 'Memory', 'Buckets', 'Batches', + (words(('actual', 'Memory Usage', 'Disk Usage', 'Memory', 'Buckets', 'Batches', 'originally', 'row', 'rows', 'Hits', 'Misses', - 'Evictions', 'Overflows'), suffix=r'\b'), + 'Evictions', 'Overflows', 'Planned Partitions'), suffix=r'\b'), Comment.Single), (r'(hit|read|dirtied|written|write|time|calls)(=)', bygroups(Comment.Single, Operator)), @@ -442,7 +446,7 @@ class PostgresExplainLexer(RegexLexer): suffix=r'\b'), Name.Exception), (r'(I/O Timings)(:)( )', bygroups(Name.Exception, Punctuation, Whitespace)), - (words(EXPLAIN_KEYWORDS, suffix=r'\b'), Keyword), + (words(_postgres_builtins.EXPLAIN_KEYWORDS, suffix=r'\b'), Keyword), # join keywords (r'((Right|Left|Full|Semi|Anti) Join)', Keyword.Type), @@ -577,101 +581,8 @@ class SqlLexer(RegexLexer): (r'\s+', Whitespace), (r'--.*\n?', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), - (words(( - 'ABORT', 'ABS', 'ABSOLUTE', 'ACCESS', 'ADA', 'ADD', 'ADMIN', 'AFTER', - 'AGGREGATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALTER', 'ANALYSE', 'ANALYZE', - 'AND', 'ANY', 'ARE', 'AS', 'ASC', 'ASENSITIVE', 'ASSERTION', 'ASSIGNMENT', - 'ASYMMETRIC', 'AT', 'ATOMIC', 'AUTHORIZATION', 'AVG', 'BACKWARD', - 'BEFORE', 'BEGIN', 'BETWEEN', 'BITVAR', 'BIT_LENGTH', 'BOTH', 'BREADTH', - 'BY', 'C', 'CACHE', 'CALL', 'CALLED', 'CARDINALITY', 'CASCADE', - 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CATALOG_NAME', 'CHAIN', - 'CHARACTERISTICS', 'CHARACTER_LENGTH', 'CHARACTER_SET_CATALOG', - 'CHARACTER_SET_NAME', 'CHARACTER_SET_SCHEMA', 'CHAR_LENGTH', 'CHECK', - 'CHECKED', 'CHECKPOINT', 'CLASS', 'CLASS_ORIGIN', 'CLOB', 'CLOSE', - 'CLUSTER', 'COALESCE', 'COBOL', 'COLLATE', 'COLLATION', - 'COLLATION_CATALOG', 'COLLATION_NAME', 'COLLATION_SCHEMA', 'COLUMN', - 'COLUMN_NAME', 'COMMAND_FUNCTION', 'COMMAND_FUNCTION_CODE', 'COMMENT', - 'COMMIT', 'COMMITTED', 'COMPLETION', 'CONDITION_NUMBER', 'CONNECT', - 'CONNECTION', 'CONNECTION_NAME', 'CONSTRAINT', 'CONSTRAINTS', - 'CONSTRAINT_CATALOG', 'CONSTRAINT_NAME', 'CONSTRAINT_SCHEMA', - 'CONSTRUCTOR', 'CONTAINS', 'CONTINUE', 'CONVERSION', 'CONVERT', - 'COPY', 'CORRESPONDING', 'COUNT', 'CREATE', 'CREATEDB', 'CREATEUSER', - 'CROSS', 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', - 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', - 'CURSOR', 'CURSOR_NAME', 'CYCLE', 'DATA', 'DATABASE', - 'DATETIME_INTERVAL_CODE', 'DATETIME_INTERVAL_PRECISION', 'DAY', - 'DEALLOCATE', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFERRABLE', - 'DEFERRED', 'DEFINED', 'DEFINER', 'DELETE', 'DELIMITER', 'DELIMITERS', - 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', - 'DETERMINISTIC', 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISPATCH', - 'DISTINCT', 'DO', 'DOMAIN', 'DROP', 'DYNAMIC', 'DYNAMIC_FUNCTION', - 'DYNAMIC_FUNCTION_CODE', 'EACH', 'ELSE', 'ELSIF', 'ENCODING', - 'ENCRYPTED', 'END', 'END-EXEC', 'EQUALS', 'ESCAPE', 'EVERY', 'EXCEPTION', - 'EXCEPT', 'EXCLUDING', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTING', - 'EXISTS', 'EXPLAIN', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FINAL', - 'FIRST', 'FOR', 'FORCE', 'FOREIGN', 'FORTRAN', 'FORWARD', 'FOUND', 'FREE', - 'FREEZE', 'FROM', 'FULL', 'FUNCTION', 'G', 'GENERAL', 'GENERATED', 'GET', - 'GLOBAL', 'GO', 'GOTO', 'GRANT', 'GRANTED', 'GROUP', 'GROUPING', - 'HANDLER', 'HAVING', 'HIERARCHY', 'HOLD', 'HOST', 'IDENTITY', 'IF', - 'IGNORE', 'ILIKE', 'IMMEDIATE', 'IMMEDIATELY', 'IMMUTABLE', 'IMPLEMENTATION', 'IMPLICIT', - 'IN', 'INCLUDING', 'INCREMENT', 'INDEX', 'INDITCATOR', 'INFIX', - 'INHERITS', 'INITIALIZE', 'INITIALLY', 'INNER', 'INOUT', 'INPUT', - 'INSENSITIVE', 'INSERT', 'INSTANTIABLE', 'INSTEAD', 'INTERSECT', 'INTO', - 'INVOKER', 'IS', 'ISNULL', 'ISOLATION', 'ITERATE', 'JOIN', 'KEY', - 'KEY_MEMBER', 'KEY_TYPE', 'LANCOMPILER', 'LANGUAGE', 'LARGE', 'LAST', - 'LATERAL', 'LEADING', 'LEFT', 'LENGTH', 'LESS', 'LEVEL', 'LIKE', 'LIMIT', - 'LISTEN', 'LOAD', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATION', - 'LOCATOR', 'LOCK', 'LOWER', 'MAP', 'MATCH', 'MAX', 'MAXVALUE', - 'MESSAGE_LENGTH', 'MESSAGE_OCTET_LENGTH', 'MESSAGE_TEXT', 'METHOD', 'MIN', - 'MINUTE', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODIFY', 'MONTH', - 'MORE', 'MOVE', 'MUMPS', 'NAMES', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', - 'NEW', 'NEXT', 'NO', 'NOCREATEDB', 'NOCREATEUSER', 'NONE', 'NOT', - 'NOTHING', 'NOTIFY', 'NOTNULL', 'NULL', 'NULLABLE', 'NULLIF', 'OBJECT', - 'OCTET_LENGTH', 'OF', 'OFF', 'OFFSET', 'OIDS', 'OLD', 'ON', 'ONLY', - 'OPEN', 'OPERATION', 'OPERATOR', 'OPTION', 'OPTIONS', 'OR', 'ORDER', - 'ORDINALITY', 'OUT', 'OUTER', 'OUTPUT', 'OVERLAPS', 'OVERLAY', - 'OVERRIDING', 'OWNER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARAMETER_MODE', - 'PARAMETER_NAME', 'PARAMETER_ORDINAL_POSITION', - 'PARAMETER_SPECIFIC_CATALOG', 'PARAMETER_SPECIFIC_NAME', - 'PARAMETER_SPECIFIC_SCHEMA', 'PARTIAL', 'PASCAL', 'PENDANT', 'PERIOD', 'PLACING', - 'PLI', 'POSITION', 'POSTFIX', 'PRECEEDS', 'PRECISION', 'PREFIX', 'PREORDER', - 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURAL', - 'PROCEDURE', 'PUBLIC', 'READ', 'READS', 'RECHECK', 'RECURSIVE', 'REF', - 'REFERENCES', 'REFERENCING', 'REINDEX', 'RELATIVE', 'RENAME', - 'REPEATABLE', 'REPLACE', 'RESET', 'RESTART', 'RESTRICT', 'RESULT', - 'RETURN', 'RETURNED_LENGTH', 'RETURNED_OCTET_LENGTH', 'RETURNED_SQLSTATE', - 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', - 'ROUTINE_CATALOG', 'ROUTINE_NAME', 'ROUTINE_SCHEMA', 'ROW', 'ROWS', - 'ROW_COUNT', 'RULE', 'SAVE_POINT', 'SCALE', 'SCHEMA', 'SCHEMA_NAME', - 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECURITY', 'SELECT', 'SELF', - 'SENSITIVE', 'SERIALIZABLE', 'SERVER_NAME', 'SESSION', 'SESSION_USER', - 'SET', 'SETOF', 'SETS', 'SHARE', 'SHOW', 'SIMILAR', 'SIMPLE', 'SIZE', - 'SOME', 'SOURCE', 'SPACE', 'SPECIFIC', 'SPECIFICTYPE', 'SPECIFIC_NAME', - 'SQL', 'SQLCODE', 'SQLERROR', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNINIG', - 'STABLE', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STDIN', - 'STDOUT', 'STORAGE', 'STRICT', 'STRUCTURE', 'STYPE', 'SUBCLASS_ORIGIN', - 'SUBLIST', 'SUBSTRING', 'SUCCEEDS', 'SUM', 'SYMMETRIC', 'SYSID', 'SYSTEM', - 'SYSTEM_USER', 'TABLE', 'TABLE_NAME', ' TEMP', 'TEMPLATE', 'TEMPORARY', - 'TERMINATE', 'THAN', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', - 'TIMEZONE_MINUTE', 'TO', 'TOAST', 'TRAILING', 'TRANSACTION', - 'TRANSACTIONS_COMMITTED', 'TRANSACTIONS_ROLLED_BACK', 'TRANSACTION_ACTIVE', - 'TRANSFORM', 'TRANSFORMS', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER', - 'TRIGGER_CATALOG', 'TRIGGER_NAME', 'TRIGGER_SCHEMA', 'TRIM', 'TRUE', - 'TRUNCATE', 'TRUSTED', 'TYPE', 'UNCOMMITTED', 'UNDER', 'UNENCRYPTED', - 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLISTEN', 'UNNAMED', 'UNNEST', 'UNTIL', - 'UPDATE', 'UPPER', 'USAGE', 'USER', 'USER_DEFINED_TYPE_CATALOG', - 'USER_DEFINED_TYPE_NAME', 'USER_DEFINED_TYPE_SCHEMA', 'USING', 'VACUUM', - 'VALID', 'VALIDATOR', 'VALUES', 'VARIABLE', 'VERBOSE', - 'VERSION', 'VERSIONS', 'VERSIONING', 'VIEW', - 'VOLATILE', 'WHEN', 'WHENEVER', 'WHERE', 'WITH', 'WITHOUT', 'WORK', - 'WRITE', 'YEAR', 'ZONE'), suffix=r'\b'), - Keyword), - (words(( - 'ARRAY', 'BIGINT', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'CHAR', - 'CHARACTER', 'DATE', 'DEC', 'DECIMAL', 'FLOAT', 'INT', 'INTEGER', - 'INTERVAL', 'NUMBER', 'NUMERIC', 'REAL', 'SERIAL', 'SMALLINT', - 'VARCHAR', 'VARYING', 'INT8', 'SERIAL8', 'TEXT'), suffix=r'\b'), - Name.Builtin), + (words(_sql_builtins.KEYWORDS, suffix=r'\b'), Keyword), + (words(_sql_builtins.DATATYPES, suffix=r'\b'), Name.Builtin), (r'[+*/<>=~!@#%^&|`?-]', Operator), (r'[0-9]+', Number.Integer), # TODO: Backslash escapes? @@ -697,7 +608,7 @@ class TransactSqlLexer(RegexLexer): Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to SQL. - The list of keywords includes ODBC and keywords reserved for future use.. + The list of keywords includes ODBC and keywords reserved for future use. """ name = 'Transact-SQL' @@ -712,7 +623,7 @@ class TransactSqlLexer(RegexLexer): tokens = { 'root': [ (r'\s+', Whitespace), - (r'--.*?$\n?', Comment.Single), + (r'--.*[$|\n]?', Comment.Single), (r'/\*', Comment.Multiline, 'multiline-comments'), (words(_tsql_builtins.OPERATORS), Operator), (words(_tsql_builtins.OPERATOR_WORDS, suffix=r'\b'), Operator.Word), @@ -855,10 +766,13 @@ class MySqlLexer(RegexLexer): (r'\b(character)(\s+)(set)\b', bygroups(Keyword, Whitespace, Keyword)), # In all other known cases, "SET" is tokenized by MYSQL_DATATYPES. - (words(MYSQL_CONSTANTS, prefix=r'\b', suffix=r'\b'), Name.Constant), - (words(MYSQL_DATATYPES, prefix=r'\b', suffix=r'\b'), Keyword.Type), - (words(MYSQL_KEYWORDS, prefix=r'\b', suffix=r'\b'), Keyword), - (words(MYSQL_FUNCTIONS, prefix=r'\b', suffix=r'\b(\s*)(\()'), + (words(_mysql_builtins.MYSQL_CONSTANTS, prefix=r'\b', suffix=r'\b'), + Name.Constant), + (words(_mysql_builtins.MYSQL_DATATYPES, prefix=r'\b', suffix=r'\b'), + Keyword.Type), + (words(_mysql_builtins.MYSQL_KEYWORDS, prefix=r'\b', suffix=r'\b'), + Keyword), + (words(_mysql_builtins.MYSQL_FUNCTIONS, prefix=r'\b', suffix=r'\b(\s*)(\()'), bygroups(Name.Function, Whitespace, Punctuation)), # Schema object names @@ -880,7 +794,8 @@ class MySqlLexer(RegexLexer): 'optimizer-hints': [ (r'[^*a-z]+', Comment.Special), (r'\*/', Comment.Special, '#pop'), - (words(MYSQL_OPTIMIZER_HINTS, suffix=r'\b'), Comment.Preproc), + (words(_mysql_builtins.MYSQL_OPTIMIZER_HINTS, suffix=r'\b'), + Comment.Preproc), ('[a-z]+', Comment.Special), (r'\*', Comment.Special), ], @@ -963,6 +878,166 @@ class MySqlLexer(RegexLexer): return rating +class GoogleSqlLexer(RegexLexer): + """ + GoogleSQL is Google's standard SQL dialect, formerly known as ZetaSQL. + + The list of keywords includes reserved words for future use. + """ + + name = 'GoogleSQL' + aliases = ['googlesql', 'zetasql'] + filenames = ['*.googlesql', '*.googlesql.sql'] + mimetypes = ['text/x-google-sql', 'text/x-google-sql-aux'] + url = 'https://cloud.google.com/bigquery/googlesql' + version_added = '2.19' + + flags = re.IGNORECASE + tokens = { + 'root': [ + (r'\s+', Whitespace), + + # Comments + (r'(?:#|--\s+).*', Comment.Single), + (r'/\*', Comment.Multiline, 'multiline-comment'), + + # Hexadecimal literals + (r"x'([0-9a-f]{2})+'", Number.Hex), + (r'0x[0-9a-f]+', Number.Hex), + + # Binary literals + (r"b'[01]+'", Number.Bin), + (r'0b[01]+', Number.Bin), + + # Numeric literals + (r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float), # Mandatory integer, optional fraction and exponent + (r'[0-9]*\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), # Mandatory fraction, optional integer and exponent + (r'[0-9]+e[+-]?[0-9]+', Number.Float), # Exponents with integer significands are still floats + (r'[0-9]+(?=[^0-9a-z$_\u0080-\uffff])', Number.Integer), # Integers that are not in a schema object name + + # Date literals + (r"\{\s*d\s*(?P<quote>['\"])\s*\d{2}(\d{2})?.?\d{2}.?\d{2}\s*(?P=quote)\s*\}", + Literal.Date), + + # Time literals + (r"\{\s*t\s*(?P<quote>['\"])\s*(?:\d+\s+)?\d{1,2}.?\d{1,2}.?\d{1,2}(\.\d*)?\s*(?P=quote)\s*\}", + Literal.Date), + + # Timestamp literals + ( + r"\{\s*ts\s*(?P<quote>['\"])\s*" + r"\d{2}(?:\d{2})?.?\d{2}.?\d{2}" # Date part + r"\s+" # Whitespace between date and time + r"\d{1,2}.?\d{1,2}.?\d{1,2}(\.\d*)?" # Time part + r"\s*(?P=quote)\s*\}", + Literal.Date + ), + + # String literals + (r"'", String.Single, 'single-quoted-string'), + (r'"', String.Double, 'double-quoted-string'), + + # Variables + (r'@@(?:global\.|persist\.|persist_only\.|session\.)?[a-z_]+', Name.Variable), + (r'@[a-z0-9_$.]+', Name.Variable), + (r"@'", Name.Variable, 'single-quoted-variable'), + (r'@"', Name.Variable, 'double-quoted-variable'), + (r"@`", Name.Variable, 'backtick-quoted-variable'), + (r'\?', Name.Variable), # For demonstrating prepared statements + + # Exceptions; these words tokenize differently in different contexts. + (r'\b(set)(?!\s*\()', Keyword), + (r'\b(character)(\s+)(set)\b', bygroups(Keyword, Whitespace, Keyword)), + + # Constants, types, keywords, functions, operators + (words(_googlesql_builtins.constants, prefix=r'\b', suffix=r'\b'), Name.Constant), + (words(_googlesql_builtins.types, prefix=r'\b', suffix=r'\b'), Keyword.Type), + (words(_googlesql_builtins.keywords, prefix=r'\b', suffix=r'\b'), Keyword), + (words(_googlesql_builtins.functionnames, prefix=r'\b', suffix=r'\b(\s*)(\()'), + bygroups(Name.Function, Whitespace, Punctuation)), + (words(_googlesql_builtins.operators, prefix=r'\b', suffix=r'\b'), Operator), + + # Schema object names + # + # Note: Although the first regex supports unquoted all-numeric + # identifiers, this will not be a problem in practice because + # numeric literals have already been handled above. + # + ('[0-9a-z$_\u0080-\uffff]+', Name), + (r'`', Name.Quoted, 'schema-object-name'), + + # Punctuation + (r'[(),.;]', Punctuation), + ], + + # Multiline comment substates + # --------------------------- + + 'multiline-comment': [ + (r'[^*]+', Comment.Multiline), + (r'\*/', Comment.Multiline, '#pop'), + (r'\*', Comment.Multiline), + ], + + # String substates + # ---------------- + + 'single-quoted-string': [ + (r"[^'\\]+", String.Single), + (r"''", String.Escape), + (r"""\\[0'"bnrtZ\\%_]""", String.Escape), + (r"'", String.Single, '#pop'), + ], + + 'double-quoted-string': [ + (r'[^"\\]+', String.Double), + (r'""', String.Escape), + (r"""\\[0'"bnrtZ\\%_]""", String.Escape), + (r'"', String.Double, '#pop'), + ], + + # Variable substates + # ------------------ + + 'single-quoted-variable': [ + (r"[^']+", Name.Variable), + (r"''", Name.Variable), + (r"'", Name.Variable, '#pop'), + ], + + 'double-quoted-variable': [ + (r'[^"]+', Name.Variable), + (r'""', Name.Variable), + (r'"', Name.Variable, '#pop'), + ], + + 'backtick-quoted-variable': [ + (r'[^`]+', Name.Variable), + (r'``', Name.Variable), + (r'`', Name.Variable, '#pop'), + ], + + # Schema object name substates + # ---------------------------- + # + # "Name.Quoted" and "Name.Quoted.Escape" are non-standard but + # formatters will style them as "Name" by default but add + # additional styles based on the token name. This gives users + # flexibility to add custom styles as desired. + # + 'schema-object-name': [ + (r'[^`]+', Name.Quoted), + (r'``', Name.Quoted.Escape), + (r'`', Name.Quoted, '#pop'), + ], + } + + def analyse_text(text): + tokens = collections.Counter(text.split()) + return 0.001 * sum(count for t, count in tokens.items() + if t in googlesql_identifiers) + + class SqliteConsoleLexer(Lexer): """ Lexer for example sessions using sqlite3. @@ -974,6 +1049,7 @@ class SqliteConsoleLexer(Lexer): mimetypes = ['text/x-sqlite3-console'] url = 'https://www.sqlite.org' version_added = '0.11' + _example = "sqlite3/sqlite3.sqlite3-console" def get_tokens_unprocessed(self, data): sql = SqlLexer(**self.options) diff --git a/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py b/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py index abba0c3dc0b..daf654ea9d3 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py +++ b/contrib/python/Pygments/py3/pygments/lexers/srcinfo.py @@ -7,7 +7,7 @@ The description of the format can be found in the wiki: https://wiki.archlinux.org/title/.SRCINFO - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/stata.py b/contrib/python/Pygments/py3/pygments/lexers/stata.py index 5fca5b743e3..dc93cb4e0de 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/stata.py +++ b/contrib/python/Pygments/py3/pygments/lexers/stata.py @@ -4,7 +4,7 @@ Lexer for Stata - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/supercollider.py b/contrib/python/Pygments/py3/pygments/lexers/supercollider.py index b4a719cfde6..0f19d2af3d4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/supercollider.py +++ b/contrib/python/Pygments/py3/pygments/lexers/supercollider.py @@ -4,7 +4,7 @@ Lexer for SuperCollider - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/tablegen.py b/contrib/python/Pygments/py3/pygments/lexers/tablegen.py new file mode 100644 index 00000000000..5bcb3eef6a9 --- /dev/null +++ b/contrib/python/Pygments/py3/pygments/lexers/tablegen.py @@ -0,0 +1,177 @@ +""" + pygments.lexers.tablegen + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for LLVM's TableGen DSL. + + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, include, words, using +from pygments.lexers.c_cpp import CppLexer +from pygments.token import Comment, Keyword, Name, Number, Operator, \ + Punctuation, String, Text, Whitespace, Error + +__all__ = ['TableGenLexer'] + +KEYWORDS = ( + 'assert', + 'class', + 'code', + 'def', + 'dump', + 'else', + 'foreach', + 'defm', + 'defset', + 'defvar', + 'field', + 'if', + 'in', + 'include', + 'let', + 'multiclass', + 'then', +) + +KEYWORDS_CONST = ( + 'false', + 'true', +) +KEYWORDS_TYPE = ( + 'bit', + 'bits', + 'dag', + 'int', + 'list', + 'string', +) + +BANG_OPERATORS = ( + 'add', + 'and', + 'cast', + 'con', + 'cond', + 'dag', + 'div', + 'empty', + 'eq', + 'exists', + 'filter', + 'find', + 'foldl', + 'foreach', + 'ge', + 'getdagarg', + 'getdagname', + 'getdagop', + 'gt', + 'head', + 'if', + 'interleave', + 'isa', + 'le', + 'listconcat', + 'listremove', + 'listsplat', + 'logtwo', + 'lt', + 'mul', + 'ne', + 'not', + 'or', + 'range', + 'repr', + 'setdagarg', + 'setdagname', + 'setdagop', + 'shl', + 'size', + 'sra', + 'srl', + 'strconcat', + 'sub', + 'subst', + 'substr', + 'tail', + 'tolower', + 'toupper', + 'xor', +) + +class TableGenLexer(RegexLexer): + """ + Lexer for TableGen + """ + + name = 'TableGen' + url = 'https://llvm.org/docs/TableGen/ProgRef.html' + aliases = ['tablegen', 'td'] + filenames = ['*.td'] + + version_added = '2.19' + + tokens = { + 'root': [ + (r'\s+', Whitespace), + + (r'/\*', Comment.Multiline, 'comment'), + (r'//.*?$', Comment.SingleLine), + (r'#(define|ifdef|ifndef|else|endif)', Comment.Preproc), + + # Binary/hex numbers. Note that these take priority over names, + # which may begin with numbers. + (r'0b[10]+', Number.Bin), + (r'0x[0-9a-fA-F]+', Number.Hex), + + # Keywords + (words(KEYWORDS, suffix=r'\b'), Keyword), + (words(KEYWORDS_CONST, suffix=r'\b'), Keyword.Constant), + (words(KEYWORDS_TYPE, suffix=r'\b'), Keyword.Type), + + # Bang operators + (words(BANG_OPERATORS, prefix=r'\!', suffix=r'\b'), Operator), + # Unknown bang operators are an error + (r'![a-zA-Z]+', Error), + + # Names and identifiers + (r'[0-9]*[a-zA-Z_][a-zA-Z_0-9]*', Name), + (r'\$[a-zA-Z_][a-zA-Z_0-9]*', Name.Variable), + + # Place numbers after keywords. Names/identifiers may begin with + # numbers, and we want to parse 1X as one name token as opposed to + # a number and a name. + (r'[-\+]?[0-9]+', Number.Integer), + + # String literals + (r'"', String, 'dqs'), + (r'\[\{', Text, 'codeblock'), + + # Misc. punctuation + (r'[-+\[\]{}()<>\.,;:=?#]+', Punctuation), + ], + 'comment': [ + (r'[^*/]+', Comment.Multiline), + (r'/\*', Comment.Multiline, '#push'), + (r'\*/', Comment.Multiline, '#pop'), + (r'[*/]', Comment.Multiline) + ], + 'strings': [ + (r'\\[\\\'"tn]', String.Escape), + (r'[^\\"]+', String), + ], + # Double-quoted string, a la C + 'dqs': [ + (r'"', String, '#pop'), + include('strings'), + ], + # No escaping inside a code block - everything is literal + # Assume that the code inside a code block is C++. This isn't always + # true in TableGen, but is the far most common scenario. + 'codeblock': [ + (r'\}\]', Text, '#pop'), + (r'([^}]+|\}[^]])*', using(CppLexer)), + ], + } diff --git a/contrib/python/Pygments/py3/pygments/lexers/tact.py b/contrib/python/Pygments/py3/pygments/lexers/tact.py index 8ede906f213..9199a5b14bb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tact.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tact.py @@ -4,7 +4,7 @@ Lexers for Tact. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/tal.py b/contrib/python/Pygments/py3/pygments/lexers/tal.py index 86249b85d24..33c1bdc9362 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tal.py @@ -6,7 +6,7 @@ .. versionadded:: 2.12 - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/tcl.py b/contrib/python/Pygments/py3/pygments/lexers/tcl.py index 436438c177f..f156efa6a69 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tcl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tcl.py @@ -4,7 +4,7 @@ Lexers for Tcl and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/teal.py b/contrib/python/Pygments/py3/pygments/lexers/teal.py index 1862fba2457..54ee268cde6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/teal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/teal.py @@ -4,7 +4,7 @@ Lexer for TEAL. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/templates.py b/contrib/python/Pygments/py3/pygments/lexers/templates.py index 4084fbd5033..ff796d3d067 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/templates.py +++ b/contrib/python/Pygments/py3/pygments/lexers/templates.py @@ -4,7 +4,7 @@ Lexers for various template engines' markup. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -1501,7 +1501,7 @@ class EvoqueHtmlLexer(DelegatingLexer): """ name = 'HTML+Evoque' aliases = ['html+evoque'] - filenames = ['*.html'] + alias_filenames = ['*.html'] mimetypes = ['text/html+evoque'] url = 'https://gizmojo.org/templating' version_added = '1.1' @@ -1520,7 +1520,7 @@ class EvoqueXmlLexer(DelegatingLexer): """ name = 'XML+Evoque' aliases = ['xml+evoque'] - filenames = ['*.xml'] + alias_filenames = ['*.xml'] mimetypes = ['application/xml+evoque'] url = 'https://gizmojo.org/templating' version_added = '1.1' diff --git a/contrib/python/Pygments/py3/pygments/lexers/teraterm.py b/contrib/python/Pygments/py3/pygments/lexers/teraterm.py index 9a88337bf14..a2c2980d456 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/teraterm.py +++ b/contrib/python/Pygments/py3/pygments/lexers/teraterm.py @@ -4,7 +4,7 @@ Lexer for Tera Term macro files. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/testing.py b/contrib/python/Pygments/py3/pygments/lexers/testing.py index 7df7fa78066..e6c59269f04 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/testing.py +++ b/contrib/python/Pygments/py3/pygments/lexers/testing.py @@ -4,7 +4,7 @@ Lexers for testing languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/text.py b/contrib/python/Pygments/py3/pygments/lexers/text.py index 17e2056b715..f5524783e70 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/text.py +++ b/contrib/python/Pygments/py3/pygments/lexers/text.py @@ -4,7 +4,7 @@ Lexers for non-source code file types. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,7 +16,7 @@ from pygments.lexers.console import PyPyLogLexer from pygments.lexers.textedit import VimLexer from pygments.lexers.markup import BBCodeLexer, MoinWikiLexer, RstLexer, \ TexLexer, GroffLexer -from pygments.lexers.installers import DebianControlLexer, SourcesListLexer +from pygments.lexers.installers import DebianControlLexer, DebianSourcesLexer, SourcesListLexer from pygments.lexers.make import MakefileLexer, BaseMakefileLexer, CMakeLexer from pygments.lexers.haxe import HxmlLexer from pygments.lexers.sgf import SmartGameFormatLexer diff --git a/contrib/python/Pygments/py3/pygments/lexers/textedit.py b/contrib/python/Pygments/py3/pygments/lexers/textedit.py index 0e1f2b2bed6..ea6a0a97696 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/textedit.py +++ b/contrib/python/Pygments/py3/pygments/lexers/textedit.py @@ -4,7 +4,7 @@ Lexers for languages related to text processing. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/textfmts.py b/contrib/python/Pygments/py3/pygments/lexers/textfmts.py index f2a9253f9a1..6dd4e581b8f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/textfmts.py +++ b/contrib/python/Pygments/py3/pygments/lexers/textfmts.py @@ -4,7 +4,7 @@ Lexers for various text formats. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/theorem.py b/contrib/python/Pygments/py3/pygments/lexers/theorem.py index 79f0606c02e..9e3f150d411 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/theorem.py +++ b/contrib/python/Pygments/py3/pygments/lexers/theorem.py @@ -6,7 +6,7 @@ See also :mod:`pygments.lexers.lean` - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py b/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py index 73366530885..ee859c995c7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py +++ b/contrib/python/Pygments/py3/pygments/lexers/thingsdb.py @@ -4,7 +4,7 @@ Lexers for the ThingsDB language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/tlb.py b/contrib/python/Pygments/py3/pygments/lexers/tlb.py index 45d0743f11e..e652eac33ab 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tlb.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tlb.py @@ -4,7 +4,7 @@ Lexers for TL-b. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/tls.py b/contrib/python/Pygments/py3/pygments/lexers/tls.py index f7027bb02d0..a3079a22a6b 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tls.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tls.py @@ -4,7 +4,7 @@ Lexers for the TLS presentation language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re diff --git a/contrib/python/Pygments/py3/pygments/lexers/tnt.py b/contrib/python/Pygments/py3/pygments/lexers/tnt.py index bb444fdf867..1ae2ed84afd 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/tnt.py +++ b/contrib/python/Pygments/py3/pygments/lexers/tnt.py @@ -4,7 +4,7 @@ Lexer for Typographic Number Theory. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py b/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py index 9480ddc02cd..8c801c4cb09 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/trafficscript.py @@ -4,7 +4,7 @@ Lexer for RiverBed's TrafficScript (RTS) language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/typoscript.py b/contrib/python/Pygments/py3/pygments/lexers/typoscript.py index 0f397725298..d71d5c355b9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/typoscript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/typoscript.py @@ -13,7 +13,7 @@ `TypoScriptHtmlDataLexer` Lexer that highlights markers, constants and registers within html tags. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/typst.py b/contrib/python/Pygments/py3/pygments/lexers/typst.py index 5daa6766fbc..21f8efd3020 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/typst.py +++ b/contrib/python/Pygments/py3/pygments/lexers/typst.py @@ -4,13 +4,14 @@ Lexers for Typst language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, words, bygroups, include from pygments.token import Comment, Keyword, Name, String, Punctuation, \ Whitespace, Generic, Operator, Number, Text +from pygments.util import get_choice_opt __all__ = ['TypstLexer'] @@ -18,6 +19,12 @@ __all__ = ['TypstLexer'] class TypstLexer(RegexLexer): """ For Typst code. + + Additional options accepted: + + `start` + Specifies the starting state of the lexer (one of 'markup', 'math', + 'code'). The default is 'markup'. """ name = 'Typst' @@ -27,49 +34,75 @@ class TypstLexer(RegexLexer): url = 'https://typst.app' version_added = '2.18' + MATH_SHORTHANDS = ( + '[|', '|]', '||', '*', ':=', '::=', '...', '\'', '-', '=:', '!=', '>>', + '>=', '>>>', '<<', '<=', '<<<', '->', '|->', '=>', '|=>', '==>', + '-->', '~~>', '~>', '>->', '->>', '<-', '<==', '<--', '<~~', '<~', + '<-<','<<-','<->','<=>','<==>','<-->', '>', '<', '~', ':', '|' + ) + tokens = { 'root': [ include('markup'), ], - 'common': [ - (r'[ \t]+', Whitespace), - (r'((?!=[*_$`\-+0-9/<@\\#\[]|https?://).)+', Text), + # common cases going from math/markup into code mode + 'into_code': [ + (words(('#let', '#set', '#show'), suffix=r'\b'), Keyword.Declaration, 'inline_code'), + (words(('#import', '#include'), suffix=r'\b'), Keyword.Namespace, 'inline_code'), + (words(('#if', '#for', '#while', '#export'), suffix=r'\b'), Keyword.Reserved, 'inline_code'), + (r'#\{', Punctuation, 'code'), + (r'#\(', Punctuation, 'code'), + (r'(#[a-zA-Z_][a-zA-Z0-9_-]*)(\[)', bygroups(Name.Function, Punctuation), 'markup'), + (r'(#[a-zA-Z_][a-zA-Z0-9_-]*)(\()', bygroups(Name.Function, Punctuation), 'code'), + (words(('#true', '#false', '#none', '#auto'), suffix=r'\b'), Keyword.Constant), + (r'#[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable), + (r'#0x[0-9a-fA-F]+', Number.Hex), + (r'#0b[01]+', Number.Bin), + (r'#0o[0-7]+', Number.Oct), + (r'#[0-9]+[\.e][0-9]+', Number.Float), + (r'#[0-9]+', Number.Integer), ], 'markup': [ include('comment'), (r'^\s*=+.*$', Generic.Heading), (r'[*][^*]*[*]', Generic.Strong), (r'_[^_]*_', Generic.Emph), - (r'\$', Punctuation, 'maths'), + (r'\$', Punctuation, 'math'), (r'`[^`]*`', String.Backtick), # inline code - (r'^\s*-', Punctuation), # unnumbered list - (r'^\s*\+', Punctuation), # numbered list - (r'^\s*[0-9.]+', Punctuation), # numbered list variant - (r'^(\s*/\s+)([^:]+)(:)', bygroups(Punctuation, Name.Variable, Punctuation)), # definitions + (r'^(\s*)(-)(\s+)', bygroups(Whitespace, Punctuation, Whitespace)), # unnumbered list + (r'^(\s*)(\+)(\s+)', bygroups(Whitespace, Punctuation, Whitespace)), # numbered list + (r'^(\s*)([0-9]+\.)', bygroups(Whitespace, Punctuation)), # numbered list variant + (r'^(\s*)(/)(\s+)([^:]+)(:)', bygroups(Whitespace, Punctuation, Whitespace, Name.Variable, Punctuation)), # definitions (r'<[a-zA-Z_][a-zA-Z0-9_-]*>', Name.Label), # label (r'@[a-zA-Z_][a-zA-Z0-9_-]*', Name.Label), # reference (r'\\#', Text), # escaped - (words(('#let', '#set', '#show'), suffix=r'\b'), Keyword.Declaration, 'inline_code'), - (r'(#[a-zA-Z_][a-zA-Z0-9_]*)(\[)', bygroups(Name.Function, Punctuation), 'markup'), - (r'(#[a-zA-Z_][a-zA-Z0-9_]*)(\()', bygroups(Name.Function, Punctuation), 'inline_code'), - (r'#[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable), + include('into_code'), (r'```(?:.|\n)*?```', String.Backtick), # code block (r'https?://[0-9a-zA-Z~/%#&=\',;.+?]*', Generic.Emph), # links - (words((r'---', r'\\', r'~', r'--', r'...'), suffix=r'\b'), Punctuation), # special chars shorthand + (words(('---', '\\', '~', '--', '...'), suffix=r'\B'), Punctuation), # special chars shorthand (r'\\\[', Punctuation), # escaped (r'\\\]', Punctuation), # escaped (r'\[', Punctuation, '#push'), (r'\]', Punctuation, '#pop'), - include('common'), + (r'[ \t]+\n?|\n', Whitespace), + (r'((?![*_$`<@\\#\] ]|https?://).)+', Text), ], - 'maths': [ + 'math': [ include('comment'), - (words(('_', '^', '+', '-', '/', '*', '->', '<-', '!=', '=='), - suffix=r'\b'), Operator), - (words((r'\\', '$='), suffix=r'\b'), Operator), # maths markup operators + (words(('\\_', '\\^', '\\&')), Text), # escapes + (words(('_', '^', '&', ';')), Punctuation), + (words(('+', '/', '=') + MATH_SHORTHANDS), Operator), + (r'\\', Punctuation), # line break (r'\\\$', Punctuation), # escaped (r'\$', Punctuation, '#pop'), # end of math mode - include('code'), + include('into_code'), + (r'([a-zA-Z][a-zA-Z0-9-]*)(\s*)(\()', bygroups(Name.Function, Whitespace, Punctuation)), + (r'([a-zA-Z][a-zA-Z0-9-]*)(:)', bygroups(Name.Variable, Punctuation)), # named arguments in math functions + (r'([a-zA-Z][a-zA-Z0-9-]*)', Name.Variable), # both variables and symbols (_ isn't supported for variables) + (r'[0-9]+(\.[0-9]+)?', Number), + (r'\.{1,3}|\(|\)|,|\{|\}', Punctuation), + (r'"[^"]*"', String.Double), + (r'[ \t\n]+', Whitespace), ], 'comment': [ (r'//.*$', Comment.Single), @@ -81,24 +114,47 @@ class TypstLexer(RegexLexer): (r'\(|\{', Punctuation, 'code'), (r'\)|\}', Punctuation, '#pop'), (r'"[^"]*"', String.Double), - (r'[=,]', Operator), + (r',|\.{1,2}', Punctuation), + (r'=', Operator), (words(('and', 'or', 'not'), suffix=r'\b'), Operator.Word), (r'=>|<=|==|!=|>|<|-=|\+=|\*=|/=|\+|-|\\|\*', Operator), # comparisons - (r'([a-zA-Z_][a-zA-Z0-9_]*)(:)', bygroups(Name.Variable, Punctuation), '#push'), - (r'([a-zA-Z_][a-zA-Z0-9_]*)(\()', bygroups(Name.Function, Punctuation), '#push'), + (r'([a-zA-Z_][a-zA-Z0-9_-]*)(:)', bygroups(Name.Variable, Punctuation)), + (r'([a-zA-Z_][a-zA-Z0-9_-]*)(\()', bygroups(Name.Function, Punctuation), 'code'), (words(('as', 'break', 'export', 'continue', 'else', 'for', 'if', - 'import', 'in', 'include', 'return', 'while'), suffix=r'\b'), + 'in', 'return', 'while'), suffix=r'\b'), Keyword.Reserved), + (words(('import', 'include'), suffix=r'\b'), Keyword.Namespace), (words(('auto', 'none', 'true', 'false'), suffix=r'\b'), Keyword.Constant), (r'([0-9.]+)(mm|pt|cm|in|em|fr|%)', bygroups(Number, Keyword.Reserved)), + (r'0x[0-9a-fA-F]+', Number.Hex), + (r'0b[01]+', Number.Bin), + (r'0o[0-7]+', Number.Oct), + (r'[0-9]+[\.e][0-9]+', Number.Float), + (r'[0-9]+', Number.Integer), (words(('let', 'set', 'show'), suffix=r'\b'), Keyword.Declaration), # FIXME: make this work ## (r'(import|include)( *)(")([^"])(")', ## bygroups(Keyword.Reserved, Text, Punctuation, String.Double, Punctuation)), - include('common'), + (r'([a-zA-Z_][a-zA-Z0-9_-]*)', Name.Variable), + (r'[ \t\n]+', Whitespace), + (r':', Punctuation), # from imports like "import a: b" or "show: text.with(..)" ], 'inline_code': [ - (r';$', Punctuation, '#pop'), + (r';\b', Punctuation, '#pop'), + (r'\n', Whitespace, '#pop'), include('code'), ], } + + def __init__(self, **options): + self.start_state = get_choice_opt( + options, 'start', ['markup', 'code', 'math'], 'markup', True) + + RegexLexer.__init__(self, **options) + + def get_tokens_unprocessed(self, text): + stack = ['root'] + if self.start_state != 'markup': # markup is equivalent to root + stack.append(self.start_state) + + yield from RegexLexer.get_tokens_unprocessed(self, text, stack) diff --git a/contrib/python/Pygments/py3/pygments/lexers/ul4.py b/contrib/python/Pygments/py3/pygments/lexers/ul4.py index 467d3381c43..552832caede 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/ul4.py +++ b/contrib/python/Pygments/py3/pygments/lexers/ul4.py @@ -4,7 +4,7 @@ Lexer for the UL4 templating language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/unicon.py b/contrib/python/Pygments/py3/pygments/lexers/unicon.py index dcf129d49a1..1077661a349 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/unicon.py +++ b/contrib/python/Pygments/py3/pygments/lexers/unicon.py @@ -4,7 +4,7 @@ Lexers for the Icon and Unicon languages, including ucode VM. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/urbi.py b/contrib/python/Pygments/py3/pygments/lexers/urbi.py index 3a81385c5d3..93cfcedc162 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/urbi.py +++ b/contrib/python/Pygments/py3/pygments/lexers/urbi.py @@ -4,7 +4,7 @@ Lexers for UrbiScript language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/usd.py b/contrib/python/Pygments/py3/pygments/lexers/usd.py index 083125961d1..468a373691c 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/usd.py +++ b/contrib/python/Pygments/py3/pygments/lexers/usd.py @@ -4,7 +4,7 @@ The module that parses Pixar's Universal Scene Description file format. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/varnish.py b/contrib/python/Pygments/py3/pygments/lexers/varnish.py index db17d80060c..5c3de799491 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/varnish.py +++ b/contrib/python/Pygments/py3/pygments/lexers/varnish.py @@ -4,7 +4,7 @@ Lexers for Varnish configuration - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/verification.py b/contrib/python/Pygments/py3/pygments/lexers/verification.py index 2d396b0e65e..ac0675797fc 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/verification.py +++ b/contrib/python/Pygments/py3/pygments/lexers/verification.py @@ -4,7 +4,7 @@ Lexer for Intermediate Verification Languages (IVLs). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/verifpal.py b/contrib/python/Pygments/py3/pygments/lexers/verifpal.py index dad5cb54521..e226339dc39 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/verifpal.py +++ b/contrib/python/Pygments/py3/pygments/lexers/verifpal.py @@ -4,7 +4,7 @@ Lexers for Verifpal languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/vip.py b/contrib/python/Pygments/py3/pygments/lexers/vip.py index cabb678b315..22395e1e9c6 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/vip.py +++ b/contrib/python/Pygments/py3/pygments/lexers/vip.py @@ -4,7 +4,7 @@ Lexers for Visual Prolog & Grammar files. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/vyper.py b/contrib/python/Pygments/py3/pygments/lexers/vyper.py index 41550289011..002ffeddc6f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/vyper.py +++ b/contrib/python/Pygments/py3/pygments/lexers/vyper.py @@ -4,7 +4,7 @@ Lexer for the Vyper Smart Contract language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -61,7 +61,7 @@ class VyperLexer(RegexLexer): # Keywords (words(('def', 'event', 'pass', 'return', 'for', 'while', 'if', 'elif', 'else', 'assert', 'raise', 'import', 'in', 'struct', 'implements', - 'interface', 'from', 'indexed', 'log'), + 'interface', 'from', 'indexed', 'log', 'extcall', 'staticcall'), prefix=r'\b', suffix=r'\b'), Keyword), # Visibility and State Mutability diff --git a/contrib/python/Pygments/py3/pygments/lexers/web.py b/contrib/python/Pygments/py3/pygments/lexers/web.py index 1c052abeff5..3d359662def 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/web.py +++ b/contrib/python/Pygments/py3/pygments/lexers/web.py @@ -4,7 +4,7 @@ Just export previously exported lexers. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/webassembly.py b/contrib/python/Pygments/py3/pygments/lexers/webassembly.py index db3ce5e3f26..78cd4ca31b4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/webassembly.py +++ b/contrib/python/Pygments/py3/pygments/lexers/webassembly.py @@ -8,7 +8,7 @@ and https://webassembly.github.io/spec/core/text/. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/webidl.py b/contrib/python/Pygments/py3/pygments/lexers/webidl.py index 22a4d61dc3b..3bbd12efd6f 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/webidl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/webidl.py @@ -4,7 +4,7 @@ Lexers for Web IDL, including some extensions. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/webmisc.py b/contrib/python/Pygments/py3/pygments/lexers/webmisc.py index 815c7a31353..347592d916d 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/webmisc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/webmisc.py @@ -4,7 +4,7 @@ Lexers for misc. web stuff. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/wgsl.py b/contrib/python/Pygments/py3/pygments/lexers/wgsl.py index 145e0c0b34f..8fe950d9fbb 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/wgsl.py +++ b/contrib/python/Pygments/py3/pygments/lexers/wgsl.py @@ -4,7 +4,7 @@ Lexer for the WebGPU Shading Language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/whiley.py b/contrib/python/Pygments/py3/pygments/lexers/whiley.py index d6e2ea27ca5..ea98eb2d7b4 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/whiley.py +++ b/contrib/python/Pygments/py3/pygments/lexers/whiley.py @@ -4,7 +4,7 @@ Lexers for the Whiley language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/wowtoc.py b/contrib/python/Pygments/py3/pygments/lexers/wowtoc.py index 60abb83ef79..2b18757d7d9 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/wowtoc.py +++ b/contrib/python/Pygments/py3/pygments/lexers/wowtoc.py @@ -6,7 +6,7 @@ TOC files describe game addons. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/wren.py b/contrib/python/Pygments/py3/pygments/lexers/wren.py index 4dc521874e1..ec2cd54c98e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/wren.py +++ b/contrib/python/Pygments/py3/pygments/lexers/wren.py @@ -4,7 +4,7 @@ Lexer for Wren. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/x10.py b/contrib/python/Pygments/py3/pygments/lexers/x10.py index 638808aa599..4b5d097c5b7 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/x10.py +++ b/contrib/python/Pygments/py3/pygments/lexers/x10.py @@ -4,7 +4,7 @@ Lexers for the X10 programming language. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/xorg.py b/contrib/python/Pygments/py3/pygments/lexers/xorg.py index a57bd130fd7..37251e490ec 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/xorg.py +++ b/contrib/python/Pygments/py3/pygments/lexers/xorg.py @@ -4,7 +4,7 @@ Lexers for Xorg configs. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/yang.py b/contrib/python/Pygments/py3/pygments/lexers/yang.py index 624ebf5ad1d..e7f39512569 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/yang.py +++ b/contrib/python/Pygments/py3/pygments/lexers/yang.py @@ -4,7 +4,7 @@ Lexer for the YANG 1.1 modeling language. See :rfc:`7950`. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/yara.py b/contrib/python/Pygments/py3/pygments/lexers/yara.py index f0445d88f16..29694f5a132 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/yara.py +++ b/contrib/python/Pygments/py3/pygments/lexers/yara.py @@ -4,7 +4,7 @@ Lexers for YARA. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/lexers/zig.py b/contrib/python/Pygments/py3/pygments/lexers/zig.py index 86b4adc9ca6..2b0168acf83 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/zig.py +++ b/contrib/python/Pygments/py3/pygments/lexers/zig.py @@ -4,7 +4,7 @@ Lexers for Zig. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/modeline.py b/contrib/python/Pygments/py3/pygments/modeline.py index e4d9fe167bd..c310f0edbdc 100644 --- a/contrib/python/Pygments/py3/pygments/modeline.py +++ b/contrib/python/Pygments/py3/pygments/modeline.py @@ -4,7 +4,7 @@ A simple modeline parser (based on pymodeline). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/plugin.py b/contrib/python/Pygments/py3/pygments/plugin.py index 2e462f2c2f9..498db423849 100644 --- a/contrib/python/Pygments/py3/pygments/plugin.py +++ b/contrib/python/Pygments/py3/pygments/plugin.py @@ -29,7 +29,7 @@ yourfilter = yourfilter:YourFilter - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from importlib.metadata import entry_points diff --git a/contrib/python/Pygments/py3/pygments/regexopt.py b/contrib/python/Pygments/py3/pygments/regexopt.py index c44eedbf2ad..cc8d2c31b54 100644 --- a/contrib/python/Pygments/py3/pygments/regexopt.py +++ b/contrib/python/Pygments/py3/pygments/regexopt.py @@ -5,7 +5,7 @@ An algorithm that generates optimized regexes for matching long lists of literal strings. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/scanner.py b/contrib/python/Pygments/py3/pygments/scanner.py index 112da34917e..3c8c8487316 100644 --- a/contrib/python/Pygments/py3/pygments/scanner.py +++ b/contrib/python/Pygments/py3/pygments/scanner.py @@ -11,7 +11,7 @@ Have a look at the `DelphiLexer` to get an idea of how to use this scanner. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re diff --git a/contrib/python/Pygments/py3/pygments/sphinxext.py b/contrib/python/Pygments/py3/pygments/sphinxext.py index a742897c0bd..c215399ba5b 100644 --- a/contrib/python/Pygments/py3/pygments/sphinxext.py +++ b/contrib/python/Pygments/py3/pygments/sphinxext.py @@ -5,7 +5,7 @@ Sphinx extension to generate automatic documentation of lexers, formatters and filters. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/style.py b/contrib/python/Pygments/py3/pygments/style.py index 449522c5a4c..ac36cad7b3f 100644 --- a/contrib/python/Pygments/py3/pygments/style.py +++ b/contrib/python/Pygments/py3/pygments/style.py @@ -4,7 +4,7 @@ Basic style object. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/__init__.py b/contrib/python/Pygments/py3/pygments/styles/__init__.py index d80f2a39950..5d45d8b237d 100644 --- a/contrib/python/Pygments/py3/pygments/styles/__init__.py +++ b/contrib/python/Pygments/py3/pygments/styles/__init__.py @@ -4,7 +4,7 @@ Contains built-in styles. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/abap.py b/contrib/python/Pygments/py3/pygments/styles/abap.py index 9438cf6e304..584a4e64963 100644 --- a/contrib/python/Pygments/py3/pygments/styles/abap.py +++ b/contrib/python/Pygments/py3/pygments/styles/abap.py @@ -4,7 +4,7 @@ ABAP workbench like style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/algol.py b/contrib/python/Pygments/py3/pygments/styles/algol.py index e54e4b1258f..86cafce232c 100644 --- a/contrib/python/Pygments/py3/pygments/styles/algol.py +++ b/contrib/python/Pygments/py3/pygments/styles/algol.py @@ -25,7 +25,7 @@ [1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>` - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/algol_nu.py b/contrib/python/Pygments/py3/pygments/styles/algol_nu.py index d786a842f3f..d28da8f1bc1 100644 --- a/contrib/python/Pygments/py3/pygments/styles/algol_nu.py +++ b/contrib/python/Pygments/py3/pygments/styles/algol_nu.py @@ -25,7 +25,7 @@ [1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>` - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/arduino.py b/contrib/python/Pygments/py3/pygments/styles/arduino.py index 3aa6d124153..dcb32521748 100644 --- a/contrib/python/Pygments/py3/pygments/styles/arduino.py +++ b/contrib/python/Pygments/py3/pygments/styles/arduino.py @@ -4,7 +4,7 @@ Arduino® Syntax highlighting style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/autumn.py b/contrib/python/Pygments/py3/pygments/styles/autumn.py index 5ba15a78b03..8229ad17529 100644 --- a/contrib/python/Pygments/py3/pygments/styles/autumn.py +++ b/contrib/python/Pygments/py3/pygments/styles/autumn.py @@ -4,7 +4,7 @@ A colorful style, inspired by the terminal highlighting style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/borland.py b/contrib/python/Pygments/py3/pygments/styles/borland.py index 6bcc6fb37c4..bfceaea0f5d 100644 --- a/contrib/python/Pygments/py3/pygments/styles/borland.py +++ b/contrib/python/Pygments/py3/pygments/styles/borland.py @@ -4,7 +4,7 @@ Style similar to the style used in the Borland IDEs. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/bw.py b/contrib/python/Pygments/py3/pygments/styles/bw.py index aadcf5dfd13..30cd7876370 100644 --- a/contrib/python/Pygments/py3/pygments/styles/bw.py +++ b/contrib/python/Pygments/py3/pygments/styles/bw.py @@ -4,7 +4,7 @@ Simple black/white only style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/coffee.py b/contrib/python/Pygments/py3/pygments/styles/coffee.py index bb4055c537c..66f504d87ee 100644 --- a/contrib/python/Pygments/py3/pygments/styles/coffee.py +++ b/contrib/python/Pygments/py3/pygments/styles/coffee.py @@ -4,7 +4,7 @@ A warm and cozy theme based off gruvbox - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/colorful.py b/contrib/python/Pygments/py3/pygments/styles/colorful.py index a9656bdf0f0..012d943ac33 100644 --- a/contrib/python/Pygments/py3/pygments/styles/colorful.py +++ b/contrib/python/Pygments/py3/pygments/styles/colorful.py @@ -4,7 +4,7 @@ A colorful style, inspired by CodeRay. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/default.py b/contrib/python/Pygments/py3/pygments/styles/default.py index a46d8e1e343..30f882e9679 100644 --- a/contrib/python/Pygments/py3/pygments/styles/default.py +++ b/contrib/python/Pygments/py3/pygments/styles/default.py @@ -4,7 +4,7 @@ The default highlighting style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/dracula.py b/contrib/python/Pygments/py3/pygments/styles/dracula.py index 71ecff26722..805e6630ab6 100644 --- a/contrib/python/Pygments/py3/pygments/styles/dracula.py +++ b/contrib/python/Pygments/py3/pygments/styles/dracula.py @@ -7,7 +7,7 @@ Based on the Dracula Theme for pygments by Chris Bracco. See https://github.com/dracula/pygments/tree/fee9ed5613d1086bc01b9d0a5a0e9867a009f571 - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/emacs.py b/contrib/python/Pygments/py3/pygments/styles/emacs.py index 6d67492a8e2..72948634497 100644 --- a/contrib/python/Pygments/py3/pygments/styles/emacs.py +++ b/contrib/python/Pygments/py3/pygments/styles/emacs.py @@ -4,7 +4,7 @@ A highlighting style for Pygments, inspired by Emacs. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/friendly.py b/contrib/python/Pygments/py3/pygments/styles/friendly.py index ba5759b614d..e1950f08728 100644 --- a/contrib/python/Pygments/py3/pygments/styles/friendly.py +++ b/contrib/python/Pygments/py3/pygments/styles/friendly.py @@ -4,7 +4,7 @@ A modern style based on the VIM pyte theme. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py b/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py index c2acdeb2c21..23dfaa59c10 100644 --- a/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py +++ b/contrib/python/Pygments/py3/pygments/styles/friendly_grayscale.py @@ -7,7 +7,7 @@ using the luminosity value calculated by http://www.workwithcolor.com/color-converter-01.htm - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/fruity.py b/contrib/python/Pygments/py3/pygments/styles/fruity.py index 5d9b67b6557..64c8f96eb25 100644 --- a/contrib/python/Pygments/py3/pygments/styles/fruity.py +++ b/contrib/python/Pygments/py3/pygments/styles/fruity.py @@ -4,7 +4,7 @@ pygments version of my "fruity" vim theme. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/gh_dark.py b/contrib/python/Pygments/py3/pygments/styles/gh_dark.py index 4bed6d2c7d1..3bfd3000364 100644 --- a/contrib/python/Pygments/py3/pygments/styles/gh_dark.py +++ b/contrib/python/Pygments/py3/pygments/styles/gh_dark.py @@ -5,7 +5,7 @@ Github's Dark-Colorscheme based theme for Pygments Colors extracted from https://github.com/primer/primitives - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/gruvbox.py b/contrib/python/Pygments/py3/pygments/styles/gruvbox.py index 97bd511e35c..23563911875 100644 --- a/contrib/python/Pygments/py3/pygments/styles/gruvbox.py +++ b/contrib/python/Pygments/py3/pygments/styles/gruvbox.py @@ -5,7 +5,7 @@ pygments version of the "gruvbox" vim theme. https://github.com/morhetz/gruvbox - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/igor.py b/contrib/python/Pygments/py3/pygments/styles/igor.py index 48f76e04e59..467b281d0be 100644 --- a/contrib/python/Pygments/py3/pygments/styles/igor.py +++ b/contrib/python/Pygments/py3/pygments/styles/igor.py @@ -4,7 +4,7 @@ Igor Pro default style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/inkpot.py b/contrib/python/Pygments/py3/pygments/styles/inkpot.py index b6f93014fa7..39902c27ce8 100644 --- a/contrib/python/Pygments/py3/pygments/styles/inkpot.py +++ b/contrib/python/Pygments/py3/pygments/styles/inkpot.py @@ -4,7 +4,7 @@ A highlighting style for Pygments, inspired by the Inkpot theme for VIM. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/lightbulb.py b/contrib/python/Pygments/py3/pygments/styles/lightbulb.py index 4e5658a9f6f..8bcd21aafbd 100644 --- a/contrib/python/Pygments/py3/pygments/styles/lightbulb.py +++ b/contrib/python/Pygments/py3/pygments/styles/lightbulb.py @@ -4,7 +4,7 @@ A minimal dark theme based on the Lightbulb theme for VSCode. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/lilypond.py b/contrib/python/Pygments/py3/pygments/styles/lilypond.py index 5e46f3dc605..b538798f18e 100644 --- a/contrib/python/Pygments/py3/pygments/styles/lilypond.py +++ b/contrib/python/Pygments/py3/pygments/styles/lilypond.py @@ -4,7 +4,7 @@ LilyPond-specific style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/lovelace.py b/contrib/python/Pygments/py3/pygments/styles/lovelace.py index 1fdb149057a..6e255cd6677 100644 --- a/contrib/python/Pygments/py3/pygments/styles/lovelace.py +++ b/contrib/python/Pygments/py3/pygments/styles/lovelace.py @@ -8,7 +8,7 @@ A desaturated, somewhat subdued style created for the Lovelace interactive learning environment. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/manni.py b/contrib/python/Pygments/py3/pygments/styles/manni.py index f39810b6839..df1822a217e 100644 --- a/contrib/python/Pygments/py3/pygments/styles/manni.py +++ b/contrib/python/Pygments/py3/pygments/styles/manni.py @@ -7,7 +7,7 @@ This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/material.py b/contrib/python/Pygments/py3/pygments/styles/material.py index 720b403b0ae..633ef380fcf 100644 --- a/contrib/python/Pygments/py3/pygments/styles/material.py +++ b/contrib/python/Pygments/py3/pygments/styles/material.py @@ -6,7 +6,7 @@ https://github.com/material-theme/vsc-material-theme - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/monokai.py b/contrib/python/Pygments/py3/pygments/styles/monokai.py index fb6b1ebf8d4..4a6ac0cab54 100644 --- a/contrib/python/Pygments/py3/pygments/styles/monokai.py +++ b/contrib/python/Pygments/py3/pygments/styles/monokai.py @@ -6,7 +6,7 @@ http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/murphy.py b/contrib/python/Pygments/py3/pygments/styles/murphy.py index 0d9128ce96d..1299fd5b6bf 100644 --- a/contrib/python/Pygments/py3/pygments/styles/murphy.py +++ b/contrib/python/Pygments/py3/pygments/styles/murphy.py @@ -4,7 +4,7 @@ Murphy's style from CodeRay. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/native.py b/contrib/python/Pygments/py3/pygments/styles/native.py index d76360c5ded..c9f818dd53b 100644 --- a/contrib/python/Pygments/py3/pygments/styles/native.py +++ b/contrib/python/Pygments/py3/pygments/styles/native.py @@ -4,7 +4,7 @@ pygments version of my "native" vim theme. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/nord.py b/contrib/python/Pygments/py3/pygments/styles/nord.py index c208335d3d0..5481e968195 100644 --- a/contrib/python/Pygments/py3/pygments/styles/nord.py +++ b/contrib/python/Pygments/py3/pygments/styles/nord.py @@ -5,7 +5,7 @@ pygments version of the "nord" theme by Arctic Ice Studio https://www.nordtheme.com/ - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/onedark.py b/contrib/python/Pygments/py3/pygments/styles/onedark.py index 335135485fd..75c4b17a43e 100644 --- a/contrib/python/Pygments/py3/pygments/styles/onedark.py +++ b/contrib/python/Pygments/py3/pygments/styles/onedark.py @@ -7,7 +7,7 @@ Inspired by one-dark-ui for the code editor Atom (https://atom.io/themes/one-dark-ui). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py b/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py index 88968bff8f1..9983e60d021 100644 --- a/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py +++ b/contrib/python/Pygments/py3/pygments/styles/paraiso_dark.py @@ -8,7 +8,7 @@ Created with Base16 Builder by Chris Kempson (https://github.com/chriskempson/base16-builder). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py b/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py index 35e2c2d13db..903ad88d63f 100644 --- a/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py +++ b/contrib/python/Pygments/py3/pygments/styles/paraiso_light.py @@ -8,7 +8,7 @@ Created with Base16 Builder by Chris Kempson (https://github.com/chriskempson/base16-builder). - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/pastie.py b/contrib/python/Pygments/py3/pygments/styles/pastie.py index 844f539ef74..819968e1a1b 100644 --- a/contrib/python/Pygments/py3/pygments/styles/pastie.py +++ b/contrib/python/Pygments/py3/pygments/styles/pastie.py @@ -6,7 +6,7 @@ .. _pastie: http://pastie.caboo.se/ - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/perldoc.py b/contrib/python/Pygments/py3/pygments/styles/perldoc.py index 3fe361713b0..e76697a9ae2 100644 --- a/contrib/python/Pygments/py3/pygments/styles/perldoc.py +++ b/contrib/python/Pygments/py3/pygments/styles/perldoc.py @@ -6,7 +6,7 @@ .. _perldoc: http://perldoc.perl.org/ - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py b/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py index aa9e445bc63..f98d5ef08e9 100644 --- a/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py +++ b/contrib/python/Pygments/py3/pygments/styles/rainbow_dash.py @@ -6,7 +6,7 @@ .. _theme: http://sanssecours.github.io/Rainbow-Dash.tmbundle - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/rrt.py b/contrib/python/Pygments/py3/pygments/styles/rrt.py index 4aa23304f0d..1e87d262517 100644 --- a/contrib/python/Pygments/py3/pygments/styles/rrt.py +++ b/contrib/python/Pygments/py3/pygments/styles/rrt.py @@ -4,12 +4,12 @@ pygments "rrt" theme, based on Zap and Emacs defaults. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style -from pygments.token import Token, Comment, Name, Keyword, String, Number +from pygments.token import Token, Comment, Name, Keyword, String, Number, Operator __all__ = ['RrtStyle'] @@ -32,6 +32,7 @@ class RrtStyle(Style): Name.Variable: '#eedd82', Name.Constant: '#7fffd4', Keyword: '#ff0000', + Operator.Word: '#ff0000', Comment.Preproc: '#e5e5e5', String: '#87ceeb', Keyword.Type: '#ee82ee', diff --git a/contrib/python/Pygments/py3/pygments/styles/sas.py b/contrib/python/Pygments/py3/pygments/styles/sas.py index faee0ec1031..549a0cc9fac 100644 --- a/contrib/python/Pygments/py3/pygments/styles/sas.py +++ b/contrib/python/Pygments/py3/pygments/styles/sas.py @@ -6,7 +6,7 @@ meant to be a complete style. It's merely meant to mimic SAS' program editor syntax highlighting. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/solarized.py b/contrib/python/Pygments/py3/pygments/styles/solarized.py index 214a491c765..c0517024503 100644 --- a/contrib/python/Pygments/py3/pygments/styles/solarized.py +++ b/contrib/python/Pygments/py3/pygments/styles/solarized.py @@ -7,7 +7,7 @@ A Pygments style for the Solarized themes (licensed under MIT). See: https://github.com/altercation/solarized - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/staroffice.py b/contrib/python/Pygments/py3/pygments/styles/staroffice.py index dfe2dc0f446..a21aa415743 100644 --- a/contrib/python/Pygments/py3/pygments/styles/staroffice.py +++ b/contrib/python/Pygments/py3/pygments/styles/staroffice.py @@ -4,7 +4,7 @@ Style similar to StarOffice style, also in OpenOffice and LibreOffice. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/stata_dark.py b/contrib/python/Pygments/py3/pygments/styles/stata_dark.py index f6b9decbf00..315c5c6abc0 100644 --- a/contrib/python/Pygments/py3/pygments/styles/stata_dark.py +++ b/contrib/python/Pygments/py3/pygments/styles/stata_dark.py @@ -6,7 +6,7 @@ meant to be a complete style, just for Stata's file formats. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/stata_light.py b/contrib/python/Pygments/py3/pygments/styles/stata_light.py index a5bd1fe3107..95d72e2f3d6 100644 --- a/contrib/python/Pygments/py3/pygments/styles/stata_light.py +++ b/contrib/python/Pygments/py3/pygments/styles/stata_light.py @@ -5,7 +5,7 @@ Light Style inspired by Stata's do-file editor. Note this is not meant to be a complete style, just for Stata's file formats. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/tango.py b/contrib/python/Pygments/py3/pygments/styles/tango.py index fcbab7b3751..986e3ffe6cc 100644 --- a/contrib/python/Pygments/py3/pygments/styles/tango.py +++ b/contrib/python/Pygments/py3/pygments/styles/tango.py @@ -32,7 +32,7 @@ have been chosen to have the same style. Similarly, keywords (Keyword.*), and Operator.Word (and, or, in) have been assigned the same style. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/trac.py b/contrib/python/Pygments/py3/pygments/styles/trac.py index 44dc8cc2df4..2dbffa468b6 100644 --- a/contrib/python/Pygments/py3/pygments/styles/trac.py +++ b/contrib/python/Pygments/py3/pygments/styles/trac.py @@ -4,7 +4,7 @@ Port of the default trac highlighter design. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/vim.py b/contrib/python/Pygments/py3/pygments/styles/vim.py index 98eda4f2099..6b53d008022 100644 --- a/contrib/python/Pygments/py3/pygments/styles/vim.py +++ b/contrib/python/Pygments/py3/pygments/styles/vim.py @@ -4,7 +4,7 @@ A highlighting style for Pygments, inspired by vim. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/vs.py b/contrib/python/Pygments/py3/pygments/styles/vs.py index acfd77fcca8..9ac18c7818b 100644 --- a/contrib/python/Pygments/py3/pygments/styles/vs.py +++ b/contrib/python/Pygments/py3/pygments/styles/vs.py @@ -4,7 +4,7 @@ Simple style with MS Visual Studio colors. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/xcode.py b/contrib/python/Pygments/py3/pygments/styles/xcode.py index acf2293f966..9ef7c8f1850 100644 --- a/contrib/python/Pygments/py3/pygments/styles/xcode.py +++ b/contrib/python/Pygments/py3/pygments/styles/xcode.py @@ -4,7 +4,7 @@ Style similar to the `Xcode` default theme. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/styles/zenburn.py b/contrib/python/Pygments/py3/pygments/styles/zenburn.py index e10ccd92391..4d0e0567fcb 100644 --- a/contrib/python/Pygments/py3/pygments/styles/zenburn.py +++ b/contrib/python/Pygments/py3/pygments/styles/zenburn.py @@ -7,7 +7,7 @@ See: https://kippura.org/zenburnpage/ https://github.com/jnurmine/Zenburn - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/token.py b/contrib/python/Pygments/py3/pygments/token.py index f78018a7aa7..2f3b97e09ac 100644 --- a/contrib/python/Pygments/py3/pygments/token.py +++ b/contrib/python/Pygments/py3/pygments/token.py @@ -4,7 +4,7 @@ Basic token types and the standard tokens. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/unistring.py b/contrib/python/Pygments/py3/pygments/unistring.py index e2c3523e4bb..e3bd2e72738 100644 --- a/contrib/python/Pygments/py3/pygments/unistring.py +++ b/contrib/python/Pygments/py3/pygments/unistring.py @@ -7,7 +7,7 @@ Inspired by chartypes_create.py from the MoinMoin project. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/pygments/util.py b/contrib/python/Pygments/py3/pygments/util.py index 83cf1049253..71c5710ae16 100644 --- a/contrib/python/Pygments/py3/pygments/util.py +++ b/contrib/python/Pygments/py3/pygments/util.py @@ -4,7 +4,7 @@ Utility functions. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/contrib/python/Pygments/py3/ya.make b/contrib/python/Pygments/py3/ya.make index 68cec5c11e9..198f1ffceeb 100644 --- a/contrib/python/Pygments/py3/ya.make +++ b/contrib/python/Pygments/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(2.18.0) +VERSION(2.19.2) LICENSE(BSD-3-Clause) @@ -43,6 +43,7 @@ PY_SRCS( pygments/lexers/_cocoa_builtins.py pygments/lexers/_csound_builtins.py pygments/lexers/_css_builtins.py + pygments/lexers/_googlesql_builtins.py pygments/lexers/_julia_builtins.py pygments/lexers/_lasso_builtins.py pygments/lexers/_lilypond_builtins.py @@ -58,6 +59,7 @@ PY_SRCS( pygments/lexers/_scheme_builtins.py pygments/lexers/_scilab_builtins.py pygments/lexers/_sourcemod_builtins.py + pygments/lexers/_sql_builtins.py pygments/lexers/_stan_builtins.py pygments/lexers/_stata_builtins.py pygments/lexers/_tsql_builtins.py @@ -96,6 +98,7 @@ PY_SRCS( pygments/lexers/cddl.py pygments/lexers/chapel.py pygments/lexers/clean.py + pygments/lexers/codeql.py pygments/lexers/comal.py pygments/lexers/compiled.py pygments/lexers/configs.py @@ -136,6 +139,7 @@ PY_SRCS( pygments/lexers/futhark.py pygments/lexers/gcodelexer.py pygments/lexers/gdscript.py + pygments/lexers/gleam.py pygments/lexers/go.py pygments/lexers/grammar_notation.py pygments/lexers/graph.py @@ -143,6 +147,7 @@ PY_SRCS( pygments/lexers/graphql.py pygments/lexers/graphviz.py pygments/lexers/gsql.py + pygments/lexers/hare.py pygments/lexers/haskell.py pygments/lexers/haxe.py pygments/lexers/hdl.py @@ -158,6 +163,7 @@ PY_SRCS( pygments/lexers/javascript.py pygments/lexers/jmespath.py pygments/lexers/jslt.py + pygments/lexers/json5.py pygments/lexers/jsonnet.py pygments/lexers/jsx.py pygments/lexers/julia.py @@ -170,6 +176,7 @@ PY_SRCS( pygments/lexers/lisp.py pygments/lexers/macaulay2.py pygments/lexers/make.py + pygments/lexers/maple.py pygments/lexers/markup.py pygments/lexers/math.py pygments/lexers/matlab.py @@ -188,6 +195,7 @@ PY_SRCS( pygments/lexers/nimrod.py pygments/lexers/nit.py pygments/lexers/nix.py + pygments/lexers/numbair.py pygments/lexers/oberon.py pygments/lexers/objective.py pygments/lexers/ooc.py @@ -197,6 +205,7 @@ PY_SRCS( pygments/lexers/parsers.py pygments/lexers/pascal.py pygments/lexers/pawn.py + pygments/lexers/pddl.py pygments/lexers/perl.py pygments/lexers/phix.py pygments/lexers/php.py @@ -215,6 +224,7 @@ PY_SRCS( pygments/lexers/r.py pygments/lexers/rdf.py pygments/lexers/rebol.py + pygments/lexers/rego.py pygments/lexers/resource.py pygments/lexers/ride.py pygments/lexers/rita.py @@ -244,6 +254,7 @@ PY_SRCS( pygments/lexers/srcinfo.py pygments/lexers/stata.py pygments/lexers/supercollider.py + pygments/lexers/tablegen.py pygments/lexers/tact.py pygments/lexers/tal.py pygments/lexers/tcl.py |
