diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-20 07:58:40 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-20 08:05:00 +0300 |
commit | bcd5bcc390793791d293d386b2ebefbe683fb4e1 (patch) | |
tree | c93e3b8c847237e7e7626f4a07f1b657bb34f04d /contrib/python/Pygments/py3/pygments/lexers/x10.py | |
parent | 1a9f1508fe9c8c5927ffebf33197a6108e70501d (diff) | |
download | ydb-bcd5bcc390793791d293d386b2ebefbe683fb4e1.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/x10.py')
-rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/x10.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/x10.py b/contrib/python/Pygments/py3/pygments/lexers/x10.py index c125b530d1..638808aa59 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-2023 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,8 +17,6 @@ __all__ = ['X10Lexer'] class X10Lexer(RegexLexer): """ For the X10 language. - - .. versionadded:: 2.2 """ name = 'X10' @@ -26,6 +24,7 @@ class X10Lexer(RegexLexer): aliases = ['x10', 'xten'] filenames = ['*.x10'] mimetypes = ['text/x-x10'] + version_added = '2.2' keywords = ( 'as', 'assert', 'async', 'at', 'athome', 'ateach', 'atomic', @@ -56,10 +55,10 @@ class X10Lexer(RegexLexer): (r'[^\S\n]+', Text), (r'//.*?\n', Comment.Single), (r'/\*(.|\n)*?\*/', Comment.Multiline), - (r'\b(%s)\b' % '|'.join(keywords), Keyword), - (r'\b(%s)\b' % '|'.join(types), Keyword.Type), - (r'\b(%s)\b' % '|'.join(values), Keyword.Constant), - (r'\b(%s)\b' % '|'.join(modifiers), Keyword.Declaration), + (r'\b({})\b'.format('|'.join(keywords)), Keyword), + (r'\b({})\b'.format('|'.join(types)), Keyword.Type), + (r'\b({})\b'.format('|'.join(values)), Keyword.Constant), + (r'\b({})\b'.format('|'.join(modifiers)), Keyword.Declaration), (r'"(\\\\|\\[^\\]|[^"\\])*"', String), (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char), (r'.', Text) |