| 239 | |
| 240 | |
| 241 | class QuotedString(TokenList): |
| 242 | |
| 243 | token_type = 'quoted-string' |
| 244 | |
| 245 | @property |
| 246 | def content(self): |
| 247 | for x in self: |
| 248 | if x.token_type == 'bare-quoted-string': |
| 249 | return x.value |
| 250 | |
| 251 | @property |
| 252 | def quoted_value(self): |
| 253 | res = [] |
| 254 | for x in self: |
| 255 | if x.token_type == 'bare-quoted-string': |
| 256 | res.append(str(x)) |
| 257 | else: |
| 258 | res.append(x.value) |
| 259 | return ''.join(res) |
| 260 | |
| 261 | @property |
| 262 | def stripped_value(self): |
| 263 | for token in self: |
| 264 | if token.token_type == 'bare-quoted-string': |
| 265 | return token.value |
| 266 | |
| 267 | |
| 268 | class BareQuotedString(QuotedString): |
no outgoing calls
no test coverage detected
searching dependent graphs…