aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/token.py
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/python/Pygments/py3/pygments/token.py
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/token.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/token.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/contrib/python/Pygments/py3/pygments/token.py b/contrib/python/Pygments/py3/pygments/token.py
index 9013acb709..d7aaae9e22 100644
--- a/contrib/python/Pygments/py3/pygments/token.py
+++ b/contrib/python/Pygments/py3/pygments/token.py
@@ -8,7 +8,7 @@
:license: BSD, see LICENSE for details.
"""
-
+
class _TokenType(tuple):
parent = None
@@ -43,39 +43,39 @@ class _TokenType(tuple):
def __repr__(self):
return 'Token' + (self and '.' or '') + '.'.join(self)
- def __copy__(self):
- # These instances are supposed to be singletons
- return self
-
- def __deepcopy__(self, memo):
- # These instances are supposed to be singletons
- return self
-
+ def __copy__(self):
+ # These instances are supposed to be singletons
+ return self
-Token = _TokenType()
+ def __deepcopy__(self, memo):
+ # These instances are supposed to be singletons
+ return self
+
+Token = _TokenType()
+
# Special token types
-Text = Token.Text
-Whitespace = Text.Whitespace
-Escape = Token.Escape
-Error = Token.Error
+Text = Token.Text
+Whitespace = Text.Whitespace
+Escape = Token.Escape
+Error = Token.Error
# Text that doesn't belong to this lexer (e.g. HTML in PHP)
-Other = Token.Other
+Other = Token.Other
# Common token types for source code
-Keyword = Token.Keyword
-Name = Token.Name
-Literal = Token.Literal
-String = Literal.String
-Number = Literal.Number
+Keyword = Token.Keyword
+Name = Token.Name
+Literal = Token.Literal
+String = Literal.String
+Number = Literal.Number
Punctuation = Token.Punctuation
-Operator = Token.Operator
-Comment = Token.Comment
+Operator = Token.Operator
+Comment = Token.Comment
# Generic types for non-source code
-Generic = Token.Generic
+Generic = Token.Generic
-# String and some others are not direct children of Token.
+# String and some others are not direct children of Token.
# alias them:
Token.Token = Token
Token.String = String
@@ -147,7 +147,7 @@ STANDARD_TYPES = {
Name.Entity: 'ni',
Name.Exception: 'ne',
Name.Function: 'nf',
- Name.Function.Magic: 'fm',
+ Name.Function.Magic: 'fm',
Name.Property: 'py',
Name.Label: 'nl',
Name.Namespace: 'nn',
@@ -157,16 +157,16 @@ STANDARD_TYPES = {
Name.Variable.Class: 'vc',
Name.Variable.Global: 'vg',
Name.Variable.Instance: 'vi',
- Name.Variable.Magic: 'vm',
+ Name.Variable.Magic: 'vm',
Literal: 'l',
Literal.Date: 'ld',
String: 's',
- String.Affix: 'sa',
+ String.Affix: 'sa',
String.Backtick: 'sb',
String.Char: 'sc',
- String.Delimiter: 'dl',
+ String.Delimiter: 'dl',
String.Doc: 'sd',
String.Double: 's2',
String.Escape: 'se',