aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py2/pygments/lexers/asm.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/Pygments/py2/pygments/lexers/asm.py
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/lexers/asm.py')
-rw-r--r--contrib/python/Pygments/py2/pygments/lexers/asm.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/contrib/python/Pygments/py2/pygments/lexers/asm.py b/contrib/python/Pygments/py2/pygments/lexers/asm.py
index a55dd27bb1..32ac936127 100644
--- a/contrib/python/Pygments/py2/pygments/lexers/asm.py
+++ b/contrib/python/Pygments/py2/pygments/lexers/asm.py
@@ -37,7 +37,7 @@ class GasLexer(RegexLexer):
char = r'[\w$.@-]'
identifier = r'(?:[a-zA-Z$_]' + char + r'*|\.' + char + '+)'
number = r'(?:0[xX][a-zA-Z0-9]+|\d+)'
- register = '%' + identifier
+ register = '%' + identifier
tokens = {
'root': [
@@ -53,7 +53,7 @@ class GasLexer(RegexLexer):
(string, String),
('@' + identifier, Name.Attribute),
(number, Number.Integer),
- (register, Name.Variable),
+ (register, Name.Variable),
(r'[\r\n]+', Text, '#pop'),
(r'[;#].*?\n', Comment, '#pop'),
@@ -74,7 +74,7 @@ class GasLexer(RegexLexer):
(identifier, Name.Constant),
(number, Number.Integer),
# Registers
- (register, Name.Variable),
+ (register, Name.Variable),
# Numeric constants
('$'+number, Number.Integer),
(r"$'(.|\\')'", String.Char),
@@ -457,10 +457,10 @@ class NasmLexer(RegexLexer):
filenames = ['*.asm', '*.ASM']
mimetypes = ['text/x-nasm']
- # Tasm uses the same file endings, but TASM is not as common as NASM, so
- # we prioritize NASM higher by default
- priority = 1.0
-
+ # Tasm uses the same file endings, but TASM is not as common as NASM, so
+ # we prioritize NASM higher by default
+ priority = 1.0
+
identifier = r'[a-z$._?][\w$.?#@~]*'
hexn = r'(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)'
octn = r'[0-7]+q'
@@ -526,12 +526,12 @@ class NasmLexer(RegexLexer):
],
}
- def analyse_text(text):
- # Probably TASM
- if re.match(r'PROC', text, re.IGNORECASE):
- return False
+ def analyse_text(text):
+ # Probably TASM
+ if re.match(r'PROC', text, re.IGNORECASE):
+ return False
+
-
class NasmObjdumpLexer(ObjdumpLexer):
"""
For the output of 'objdump -d -M intel'.
@@ -625,12 +625,12 @@ class TasmLexer(RegexLexer):
],
}
- def analyse_text(text):
- # See above
- if re.match(r'PROC', text, re.I):
- return True
+ def analyse_text(text):
+ # See above
+ if re.match(r'PROC', text, re.I):
+ return True
+
-
class Ca65Lexer(RegexLexer):
"""
For ca65 assembler sources.