aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py2/pygments/token.py
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/python/Pygments/py2/pygments/token.py
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/token.py')
-rw-r--r--contrib/python/Pygments/py2/pygments/token.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/contrib/python/Pygments/py2/pygments/token.py b/contrib/python/Pygments/py2/pygments/token.py
index af73889d4e..5c30eb4665 100644
--- a/contrib/python/Pygments/py2/pygments/token.py
+++ b/contrib/python/Pygments/py2/pygments/token.py
@@ -5,11 +5,11 @@
Basic token types and the standard tokens.
- :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
-
+
class _TokenType(tuple):
parent = None
@@ -44,39 +44,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 __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 __deepcopy__(self, memo):
- # These instances are supposed to be singletons
- return self
+Token = _TokenType()
-
-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
@@ -148,7 +148,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',
@@ -158,16 +158,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',