(self, instream)
| 60 | _split_decimal = re.compile("([.,])") |
| 61 | |
| 62 | def __init__(self, instream): |
| 63 | if isinstance(instream, (bytes, bytearray)): |
| 64 | instream = instream.decode() |
| 65 | |
| 66 | if isinstance(instream, text_type): |
| 67 | instream = StringIO(instream) |
| 68 | elif getattr(instream, 'read', None) is None: |
| 69 | raise TypeError('Parser must be a string or character stream, not ' |
| 70 | '{itype}'.format(itype=instream.__class__.__name__)) |
| 71 | |
| 72 | self.instream = instream |
| 73 | self.charstack = [] |
| 74 | self.tokenstack = [] |
| 75 | self.eof = False |
| 76 | |
| 77 | def get_token(self): |
| 78 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected