Method
__init__
(self, start=None, end=None, value=None, token_type=None)
Source from the content-addressed store, hash-verified
| 138 | """Represents a token in a Pump source file.""" |
| 139 | |
| 140 | def __init__(self, start=None, end=None, value=None, token_type=None): |
| 141 | if start is None: |
| 142 | self.start = Eof() |
| 143 | else: |
| 144 | self.start = start |
| 145 | if end is None: |
| 146 | self.end = Eof() |
| 147 | else: |
| 148 | self.end = end |
| 149 | self.value = value |
| 150 | self.token_type = token_type |
| 151 | |
| 152 | def __str__(self): |
| 153 | return 'Token @%s: \'%s\' type=%s' % ( |
Callers
nothing calls this directly
Tested by
no test coverage detected