Show More
@@ -168,7 +168,9 b' def parsedag(desc):' | |||||
168 | if not desc: |
|
168 | if not desc: | |
169 | return |
|
169 | return | |
170 |
|
170 | |||
171 |
wordchars = pycompat.bytestr( |
|
171 | wordchars = pycompat.bytestr( | |
|
172 | string.ascii_letters + string.digits | |||
|
173 | ) # pytype: disable=wrong-arg-types | |||
172 |
|
174 | |||
173 | labels = {} |
|
175 | labels = {} | |
174 | p1 = -1 |
|
176 | p1 = -1 | |
@@ -177,7 +179,9 b' def parsedag(desc):' | |||||
177 | def resolve(ref): |
|
179 | def resolve(ref): | |
178 | if not ref: |
|
180 | if not ref: | |
179 | return p1 |
|
181 | return p1 | |
180 |
elif ref[0] in pycompat.bytestr( |
|
182 | elif ref[0] in pycompat.bytestr( | |
|
183 | string.digits | |||
|
184 | ): # pytype: disable=wrong-arg-types | |||
181 | return r - int(ref) |
|
185 | return r - int(ref) | |
182 | else: |
|
186 | else: | |
183 | return labels[ref] |
|
187 | return labels[ref] | |
@@ -211,7 +215,9 b' def parsedag(desc):' | |||||
211 |
|
215 | |||
212 | c = nextch() |
|
216 | c = nextch() | |
213 | while c != b'\0': |
|
217 | while c != b'\0': | |
214 |
while c in pycompat.bytestr( |
|
218 | while c in pycompat.bytestr( | |
|
219 | string.whitespace | |||
|
220 | ): # pytype: disable=wrong-arg-types | |||
215 | c = nextch() |
|
221 | c = nextch() | |
216 | if c == b'.': |
|
222 | if c == b'.': | |
217 | yield b'n', (r, [p1]) |
|
223 | yield b'n', (r, [p1]) | |
@@ -219,7 +225,9 b' def parsedag(desc):' | |||||
219 | r += 1 |
|
225 | r += 1 | |
220 | c = nextch() |
|
226 | c = nextch() | |
221 | elif c == b'+': |
|
227 | elif c == b'+': | |
222 | c, digs = nextrun(nextch(), pycompat.bytestr(string.digits)) |
|
228 | c, digs = nextrun( | |
|
229 | nextch(), pycompat.bytestr(string.digits) | |||
|
230 | ) # pytype: disable=wrong-arg-types | |||
223 | n = int(digs) |
|
231 | n = int(digs) | |
224 | for i in pycompat.xrange(0, n): |
|
232 | for i in pycompat.xrange(0, n): | |
225 | yield b'n', (r, [p1]) |
|
233 | yield b'n', (r, [p1]) |
General Comments 0
You need to be logged in to leave comments.
Login now