(self, terminator, name)
| 272 | self.__next() |
| 273 | return result |
| 274 | def getuntil(self, terminator, name): |
| 275 | result = '' |
| 276 | while True: |
| 277 | c = self.next |
| 278 | self.__next() |
| 279 | if c is None: |
| 280 | if not result: |
| 281 | raise self.error("missing " + name) |
| 282 | raise self.error("missing %s, unterminated name" % terminator, |
| 283 | len(result)) |
| 284 | if c == terminator: |
| 285 | if not result: |
| 286 | raise self.error("missing " + name, 1) |
| 287 | break |
| 288 | result += c |
| 289 | return result |
| 290 | @property |
| 291 | def pos(self): |
| 292 | return self.index - len(self.next or '') |
no test coverage detected