summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/token.py
diff options
context:
space:
mode:
authororivej <[email protected]>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/python/Pygments/py3/pygments/token.py
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 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 d7aaae9e22c..9013acb709c 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 __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
@@ -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',