aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/cddl.py
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-09 14:39:19 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-09 14:39:19 +0300
commitc04b663c7bb4b750deeb8f48f620497ec13da8fa (patch)
tree151ebc8bfdd2ad918caf5e6e2d8013e14272ddf8 /contrib/python/Pygments/py3/pygments/lexers/cddl.py
parent0d55ca22c507d18c2f35718687e0b06d9915397b (diff)
downloadydb-c04b663c7bb4b750deeb8f48f620497ec13da8fa.tar.gz
intermediate changes
ref:2d4f292087954c9344efdabb7b2a67f466263c65
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/cddl.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/cddl.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/cddl.py b/contrib/python/Pygments/py3/pygments/lexers/cddl.py
index 5c949802e3..1d29787c1e 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-2021 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -38,6 +38,7 @@ class CddlLexer(RegexLexer):
.. versionadded:: 2.8
"""
name = "CDDL"
+ url = 'https://datatracker.ietf.org/doc/rfc8610/'
aliases = ["cddl"]
filenames = ["*.cddl"]
mimetypes = ["text/x-cddl"]
@@ -114,15 +115,13 @@ class CddlLexer(RegexLexer):
_re_uint = r"(?:0b[01]+|0x[0-9a-fA-F]+|[1-9]\d*|0(?!\d))"
_re_int = r"-?" + _re_uint
- flags = re.UNICODE | re.MULTILINE
-
tokens = {
"commentsandwhitespace": [(r"\s+", Whitespace), (r";.+$", Comment.Single)],
"root": [
include("commentsandwhitespace"),
# tag types
(r"#(\d\.{uint})?".format(uint=_re_uint), Keyword.Type), # type or any
- # occurence
+ # occurrence
(
r"({uint})?(\*)({uint})?".format(uint=_re_uint),
bygroups(Number, Operator, Number),