summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py2/pygments/lexer.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/py2/pygments/lexer.py
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/lexer.py')
-rw-r--r--contrib/python/Pygments/py2/pygments/lexer.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/contrib/python/Pygments/py2/pygments/lexer.py b/contrib/python/Pygments/py2/pygments/lexer.py
index 2f115c43e8e..56a7e1e8e34 100644
--- a/contrib/python/Pygments/py2/pygments/lexer.py
+++ b/contrib/python/Pygments/py2/pygments/lexer.py
@@ -5,7 +5,7 @@
Base lexer classes.
- :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.
"""
@@ -319,8 +319,8 @@ def bygroups(*args):
if data is not None:
if ctx:
ctx.pos = match.start(i + 1)
- for item in action(lexer,
- _PseudoMatch(match.start(i + 1), data), ctx):
+ for item in action(lexer,
+ _PseudoMatch(match.start(i + 1), data), ctx):
if item:
yield item
if ctx:
@@ -639,20 +639,20 @@ class RegexLexer(Lexer):
if isinstance(new_state, tuple):
for state in new_state:
if state == '#pop':
- if len(statestack) > 1:
- statestack.pop()
+ if len(statestack) > 1:
+ statestack.pop()
elif state == '#push':
statestack.append(statestack[-1])
else:
statestack.append(state)
elif isinstance(new_state, int):
- # pop, but keep at least one state on the stack
- # (random code leading to unexpected pops should
- # not allow exceptions)
- if abs(new_state) >= len(statestack):
- del statestack[1:]
- else:
- del statestack[new_state:]
+ # pop, but keep at least one state on the stack
+ # (random code leading to unexpected pops should
+ # not allow exceptions)
+ if abs(new_state) >= len(statestack):
+ del statestack[1:]
+ else:
+ del statestack[new_state:]
elif new_state == '#push':
statestack.append(statestack[-1])
else:
@@ -730,18 +730,18 @@ class ExtendedRegexLexer(RegexLexer):
if isinstance(new_state, tuple):
for state in new_state:
if state == '#pop':
- if len(ctx.stack) > 1:
- ctx.stack.pop()
+ if len(ctx.stack) > 1:
+ ctx.stack.pop()
elif state == '#push':
ctx.stack.append(ctx.stack[-1])
else:
ctx.stack.append(state)
elif isinstance(new_state, int):
- # see RegexLexer for why this check is made
- if abs(new_state) >= len(ctx.stack):
- del ctx.state[1:]
- else:
- del ctx.stack[new_state:]
+ # see RegexLexer for why this check is made
+ if abs(new_state) >= len(ctx.stack):
+ del ctx.state[1:]
+ else:
+ del ctx.stack[new_state:]
elif new_state == '#push':
ctx.stack.append(ctx.stack[-1])
else: