| 278 | |
| 279 | |
| 280 | class Comment(WhiteSpaceTokenList): |
| 281 | |
| 282 | token_type = 'comment' |
| 283 | |
| 284 | def __str__(self): |
| 285 | return ''.join(sum([ |
| 286 | ["("], |
| 287 | [self.quote(x) for x in self], |
| 288 | [")"], |
| 289 | ], [])) |
| 290 | |
| 291 | def quote(self, value): |
| 292 | if value.token_type == 'comment': |
| 293 | return str(value) |
| 294 | return str(value).replace('\\', '\\\\').replace( |
| 295 | '(', r'\(').replace( |
| 296 | ')', r'\)') |
| 297 | |
| 298 | @property |
| 299 | def content(self): |
| 300 | return ''.join(str(x) for x in self) |
| 301 | |
| 302 | @property |
| 303 | def comments(self): |
| 304 | return [self.content] |
| 305 | |
| 306 | class AddressList(TokenList): |
| 307 |
no outgoing calls
no test coverage detected
searching dependent graphs…