Skip to content

Commit

Permalink
Release preparation for 2.16.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anteru committed Aug 6, 2023
1 parent 15e61f8 commit 1caade1
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 60 deletions.
2 changes: 1 addition & 1 deletion CHANGES
Expand Up @@ -5,7 +5,7 @@ Pull request numbers before 2.4.2 are not linked as they refer to the now defunc

Version 2.16.0
--------------
(unreleased)
(released August 6th, 2023)

- New lexers:

Expand Down
2 changes: 1 addition & 1 deletion pygments/__init__.py
Expand Up @@ -26,7 +26,7 @@
"""
from io import StringIO, BytesIO

__version__ = '2.15.1'
__version__ = '2.16.0'
__docformat__ = 'restructuredtext'

__all__ = ['lex', 'format', 'highlight']
Expand Down
2 changes: 1 addition & 1 deletion pygments/lexers/asn1.py
Expand Up @@ -126,7 +126,7 @@ class Asn1Lexer(RegexLexer):

name = 'ASN.1'
aliases = ['asn1']
filenames = [ "*.asn1" ]
filenames = ["*.asn1"]
url = "https://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf"

tokens = {
Expand Down
2 changes: 2 additions & 0 deletions pygments/lexers/bqn.py
Expand Up @@ -18,6 +18,8 @@
class BQNLexer(RegexLexer):
"""
A simple BQN lexer.
.. versionadded:: 2.16
"""
name = 'BQN'
url = 'https://mlochbaum.github.io/BQN/index.html'
Expand Down
6 changes: 4 additions & 2 deletions pygments/lexers/configs.py
Expand Up @@ -68,10 +68,11 @@ def analyse_text(text):
return False



class DesktopLexer(RegexLexer):
"""
Lexer for .desktop files.
.. versionadded:: 2.16
"""

name = 'Desktop file'
Expand All @@ -97,10 +98,11 @@ def analyse_text(text):
return 0.0



class SystemdLexer(RegexLexer):
"""
Lexer for systemd unit files.
.. versionadded:: 2.16
"""

name = 'Systemd'
Expand Down
2 changes: 1 addition & 1 deletion pygments/lexers/graphql.py
Expand Up @@ -58,7 +58,7 @@ class GraphQLLexer(RegexLexer):
"""
Lexer for GraphQL syntax
.. versionadded:: 2.15.1
.. versionadded:: 2.16
"""
name = "GraphQL"
aliases = ["graphql"]
Expand Down
4 changes: 2 additions & 2 deletions pygments/lexers/openscad.py
Expand Up @@ -16,8 +16,8 @@

class OpenScadLexer(RegexLexer):
"""For openSCAD code.
.. versionadded:: 2.16.0
.. versionadded:: 2.16
"""
name = "OpenSCAD"
url = "https://openscad.org/"
Expand Down
74 changes: 37 additions & 37 deletions pygments/lexers/ptx.py
Expand Up @@ -9,8 +9,8 @@
"""

from pygments.lexer import RegexLexer, include, words
from pygments.token import Comment, Keyword, Name, String, Number, Punctuation, \
Whitespace, Operator
from pygments.token import Comment, Keyword, Name, String, Number, \
Punctuation, Whitespace, Operator

__all__ = ["PtxLexer"]

Expand All @@ -20,7 +20,7 @@ class PtxLexer(RegexLexer):
For NVIDIA `PTX <https://docs.nvidia.com/cuda/parallel-thread-execution/>`_
source.
.. versionadded:: 2.15
.. versionadded:: 2.16
"""
name = 'PTX'
url = "https://docs.nvidia.com/cuda/parallel-thread-execution/"
Expand Down Expand Up @@ -65,31 +65,31 @@ class PtxLexer(RegexLexer):
(words((
'abs', 'discard', 'min', 'shf', 'vadd',
'activemask', 'div', 'mma', 'shfl', 'vadd2',
'add','dp2a','mov','shl','vadd4',
'addc','dp4a','movmatrix','shr','vavrg2',
'alloca','elect','mul','sin','vavrg4',
'and','ex2','mul24','slct','vmad',
'applypriority','exit','multimem','sqrt','vmax',
'atom','fence','nanosleep','st','vmax2',
'bar','fma','neg','stackrestore','vmax4',
'barrier','fns','not','stacksave','vmin',
'bfe','getctarank','or','stmatrix','vmin2',
'bfi','griddepcontrol','pmevent','sub','vmin4',
'bfind','isspacep','popc','subc','vote',
'bmsk','istypep','prefetch','suld','vset',
'bra','ld', 'prefetchu','suq','vset2',
'brev','ldmatrix','prmt','sured','vset4',
'brkpt','ldu','rcp','sust','vshl',
'brx','lg2','red','szext','vshr',
'call','lop3','redux','tanh','vsub',
'clz','mad', 'rem','testp','vsub2',
'cnot','mad24','ret','tex','vsub4',
'copysign','madc','rsqrt','tld4','wgmma',
'cos','mapa','sad','trap','wmma',
'cp','match','selp','txq','xor',
'createpolicy','max','set','vabsdiff','cvt',
'mbarrier','setmaxnreg','vabsdiff2','cvta',
'membar','setp','vabsdiff4')), Keyword),
'add', 'dp2a', 'mov', 'shl', 'vadd4',
'addc', 'dp4a', 'movmatrix', 'shr', 'vavrg2',
'alloca', 'elect', 'mul', 'sin', 'vavrg4',
'and', 'ex2', 'mul24', 'slct', 'vmad',
'applypriority', 'exit', 'multimem', 'sqrt', 'vmax',
'atom', 'fence', 'nanosleep', 'st', 'vmax2',
'bar', 'fma', 'neg', 'stackrestore', 'vmax4',
'barrier', 'fns', 'not', 'stacksave', 'vmin',
'bfe', 'getctarank', 'or', 'stmatrix', 'vmin2',
'bfi', 'griddepcontrol', 'pmevent', 'sub', 'vmin4',
'bfind', 'isspacep', 'popc', 'subc', 'vote',
'bmsk', 'istypep', 'prefetch', 'suld', 'vset',
'bra', 'ld', 'prefetchu', 'suq', 'vset2',
'brev', 'ldmatrix', 'prmt', 'sured', 'vset4',
'brkpt', 'ldu', 'rcp', 'sust', 'vshl',
'brx', 'lg2', 'red', 'szext', 'vshr',
'call', 'lop3', 'redux', 'tanh', 'vsub',
'clz', 'mad', 'rem', 'testp', 'vsub2',
'cnot', 'mad24', 'ret', 'tex', 'vsub4',
'copysign', 'madc', 'rsqrt', 'tld4', 'wgmma',
'cos', 'mapa', 'sad', 'trap', 'wmma',
'cp', 'match', 'selp', 'txq', 'xor',
'createpolicy', 'max', 'set', 'vabsdiff', 'cvt',
'mbarrier', 'setmaxnreg', 'vabsdiff2', 'cvta',
'membar', 'setp', 'vabsdiff4')), Keyword),
# State Spaces and Suffixes
(words((
'reg', '.sreg', '.const', '.global',
Expand All @@ -98,15 +98,15 @@ class PtxLexer(RegexLexer):
)), Keyword.Pseudo),
# PTX Directives
(words((
'.address_size','.explicitcluster','.maxnreg','.section',
'.alias', '.extern','.maxntid','.shared',
'.align','.file','.minnctapersm','.sreg',
'.branchtargets','.func','.noreturn','.target',
'.callprototype','.global','.param','.tex',
'.calltargets','.loc','.pragma','.version',
'.common','.local','.reg','.visible',
'.const','.maxclusterrank','.reqnctapercluster','.weak',
'.entry','.maxnctapersm','.reqntid')), Keyword.Reserved),
'.address_size', '.explicitcluster', '.maxnreg', '.section',
'.alias', '.extern', '.maxntid', '.shared',
'.align', '.file', '.minnctapersm', '.sreg',
'.branchtargets', '.func', '.noreturn', '.target',
'.callprototype', '.global', '.param', '.tex',
'.calltargets', '.loc', '.pragma', '.version',
'.common', '.local', '.reg', '.visible',
'.const', '.maxclusterrank', '.reqnctapercluster', '.weak',
'.entry', '.maxnctapersm', '.reqntid')), Keyword.Reserved),
# Fundamental Types
(words((
'.s8', '.s16', '.s32', '.s64',
Expand Down
4 changes: 2 additions & 2 deletions pygments/lexers/tls.py
Expand Up @@ -9,8 +9,8 @@
"""
import re

from pygments.lexer import RegexLexer, bygroups, words
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
from pygments.lexer import RegexLexer, words
from pygments.token import Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Whitespace

__all__ = ['TlsLexer']
Expand Down
9 changes: 4 additions & 5 deletions pygments/lexers/verifpal.py
Expand Up @@ -8,10 +8,9 @@
:license: BSD, see LICENSE for details.
"""

import re

from pygments.lexer import RegexLexer, include, words, bygroups, default
from pygments.token import Text, Comment, Operator, Keyword, Name, String, Punctuation, Whitespace
from pygments.lexer import RegexLexer, words, bygroups, default
from pygments.token import Comment, Keyword, Name, String, Punctuation, \
Whitespace

__all__ = ['VerifpalLexer']

Expand All @@ -20,7 +19,7 @@ class VerifpalLexer(RegexLexer):
"""
For Verifpal code.
.. versionadded:: 2.16.0
.. versionadded:: 2.16
"""

name = 'Verifpal'
Expand Down
20 changes: 12 additions & 8 deletions pygments/lexers/yara.py
Expand Up @@ -9,15 +9,17 @@
"""

from pygments.lexer import RegexLexer, words
from pygments.token import Comment, String, Name, Text, Punctuation, Operator, Keyword, Whitespace, Number, Generic
from pygments.token import Comment, String, Name, Text, Punctuation, \
Operator, Keyword, Whitespace, Number

__all__ = ['YaraLexer']


class YaraLexer(RegexLexer):
"""
For YARA rules
.. versionadded:: 2.16.0
.. versionadded:: 2.16
"""

name = 'YARA'
Expand All @@ -37,12 +39,14 @@ class YaraLexer(RegexLexer):
Keyword.Declaration),
(words(('strings', 'condition', 'meta'), prefix=r'\b', suffix=r'\b'),
Keyword),
(words(('ascii', 'at', 'base64', 'base64wide', 'condition', 'contains',
'endswith', 'entrypoint', 'filesize', 'for', 'fullword', 'icontains',
'iendswith', 'iequals', 'in', 'include', 'int16', 'int16be', 'int32',
'int32be', 'int8', 'int8be', 'istartswith', 'matches', 'meta', 'nocase',
'none', 'of', 'startswith', 'strings', 'them', 'uint16', 'uint16be',
'uint32', 'uint32be', 'uint8', 'uint8be', 'wide', 'xor', 'defined'),
(words(('ascii', 'at', 'base64', 'base64wide', 'condition',
'contains', 'endswith', 'entrypoint', 'filesize', 'for',
'fullword', 'icontains', 'iendswith', 'iequals', 'in',
'include', 'int16', 'int16be', 'int32', 'int32be', 'int8',
'int8be', 'istartswith', 'matches', 'meta', 'nocase',
'none', 'of', 'startswith', 'strings', 'them', 'uint16',
'uint16be', 'uint32', 'uint32be', 'uint8', 'uint8be',
'wide', 'xor', 'defined'),
prefix=r'\b', suffix=r'\b'),
Name.Builtin),
(r'(true|false)\b', Keyword.Constant),
Expand Down

0 comments on commit 1caade1

Please sign in to comment.