equal
deleted
inserted
replaced
3 # Copyright 2010 Peter Arrenbrecht <peter@arrenbrecht.ch> |
3 # Copyright 2010 Peter Arrenbrecht <peter@arrenbrecht.ch> |
4 # |
4 # |
5 # This software may be used and distributed according to the terms of the |
5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. |
6 # GNU General Public License version 2 or any later version. |
7 |
7 |
8 from __future__ import absolute_import |
|
9 |
8 |
10 import re |
9 import re |
11 import string |
10 import string |
12 |
11 |
13 from .i18n import _ |
12 from .i18n import _ |
227 elif c == b'+': |
226 elif c == b'+': |
228 # pytype: disable=wrong-arg-types |
227 # pytype: disable=wrong-arg-types |
229 c, digs = nextrun(nextch(), pycompat.bytestr(string.digits)) |
228 c, digs = nextrun(nextch(), pycompat.bytestr(string.digits)) |
230 # pytype: enable=wrong-arg-types |
229 # pytype: enable=wrong-arg-types |
231 n = int(digs) |
230 n = int(digs) |
232 for i in pycompat.xrange(0, n): |
231 for i in range(0, n): |
233 yield b'n', (r, [p1]) |
232 yield b'n', (r, [p1]) |
234 p1 = r |
233 p1 = r |
235 r += 1 |
234 r += 1 |
236 elif c in b'*/': |
235 elif c in b'*/': |
237 if c == b'*': |
236 if c == b'*': |