(self, on_token)
| 6 | """A simple parser that reads a byte at a time from a stream.""" |
| 7 | |
| 8 | def parse(self, on_token): |
| 9 | while True: |
| 10 | data = yield self.read1() |
| 11 | if not data: |
| 12 | break |
| 13 | on_token(data) |
| 14 | |
| 15 | test_parser = TestParser() |
| 16 | test_data = "Where there is a Will there is a way!" |
no outgoing calls
no test coverage detected