ThirdParty/Pygments/pygments/lexer.py

changeset 5713
6762afd9f963
parent 4697
c2e9bf425554
equal deleted inserted replaced
5712:f0d08bdeacf4 5713:6762afd9f963
3 pygments.lexer 3 pygments.lexer
4 ~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~
5 5
6 Base lexer classes. 6 Base lexer classes.
7 7
8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details. 9 :license: BSD, see LICENSE for details.
10 """ 10 """
11 11
12 from __future__ import print_function 12 from __future__ import print_function
13 13
317 else: 317 else:
318 data = match.group(i + 1) 318 data = match.group(i + 1)
319 if data is not None: 319 if data is not None:
320 if ctx: 320 if ctx:
321 ctx.pos = match.start(i + 1) 321 ctx.pos = match.start(i + 1)
322 for item in action( 322 for item in action(lexer,
323 lexer, _PseudoMatch(match.start(i + 1), data), ctx): 323 _PseudoMatch(match.start(i + 1), data), ctx):
324 if item: 324 if item:
325 yield item 325 yield item
326 if ctx: 326 if ctx:
327 ctx.pos = match.end() 327 ctx.pos = match.end()
328 return callback 328 return callback

eric ide

mercurial