| 232 | |
| 233 | |
| 234 | class QuotedString(TokenList): |
| 235 | |
| 236 | token_type = 'quoted-string' |
| 237 | |
| 238 | @property |
| 239 | def content(self): |
| 240 | for x in self: |
| 241 | if x.token_type == 'bare-quoted-string': |
| 242 | return x.value |
| 243 | |
| 244 | @property |
| 245 | def quoted_value(self): |
| 246 | res = [] |
| 247 | for x in self: |
| 248 | if x.token_type == 'bare-quoted-string': |
| 249 | res.append(str(x)) |
| 250 | else: |
| 251 | res.append(x.value) |
| 252 | return ''.join(res) |
| 253 | |
| 254 | @property |
| 255 | def stripped_value(self): |
| 256 | for token in self: |
| 257 | if token.token_type == 'bare-quoted-string': |
| 258 | return token.value |
| 259 | |
| 260 | |
| 261 | class BareQuotedString(QuotedString): |