(text)
| 651 | # has a newline at the end. For that reason, we rstrip() in relevant |
| 652 | # places here. |
| 653 | def parse_string_value(text): |
| 654 | first = text[0] |
| 655 | if first in {"'", '"'}: |
| 656 | text = text.rstrip() |
| 657 | if text[-1] != text[0] or len(text) < 2: |
| 658 | raise ValueError(f'unclosed quoted string. expected final character to be "{text[0]}" and length to be greater than 1 in "{text[0]}"') |
| 659 | return text[1:-1] |
| 660 | return text |
| 661 | |
| 662 | def parse_string_list_members(text): |
| 663 | sep = ',' |