(self, other)
| 124 | return self |
| 125 | |
| 126 | def extend(self, other): |
| 127 | if isinstance(other, (CommandToken, TypeToken)): |
| 128 | self.tokenization.append(other.Id) |
| 129 | self.text += other.token |
| 130 | self.original_text += other.token |
| 131 | elif isinstance(other, list) and isinstance(other[0], (CommandToken, TypeToken)): |
| 132 | self.tokenization.extend([o.Id for o in other]) |
| 133 | self.text += [o.token for o in other] |
| 134 | self.original_text += [o.token for o in other] |
| 135 | elif isinstance(other, Tokenization): |
| 136 | self.tokenization.extend(other.tokenization) |
| 137 | self.text += other.text |
| 138 | self.original_text += other.original_text |
| 139 | else: |
| 140 | self.tokenization.extend(other) |
| 141 | return self |
| 142 | |
| 143 | |
| 144 | """define some default command tokens for the tokenizer to use""" |
no test coverage detected