Commit Graph
5 Commits
Author SHA1 Message Date
Mikhail Golubev 6354daae42 PY-31442 Rename PyRichStringNode to PyStringElement with inheritors
so as not to cause confusion with ASTNode. Also additionally rename
PyLiteralStringElement to PyPlainStringElement, again, not to confuse
users with subtle "string literal" vs. "literal string" differences
in meaning.
2018-10-01 12:46:48 +03:00
Mikhail Golubev 1e527a9ba4 PY-31442 Shorter parser error for incomplete fragments terminated by closing quotes
In these cases one probably doesn't want to either specify a type conversion character
or add a format part and has just forgotten a closing brace.
2018-10-01 12:46:45 +03:00
Mikhail Golubev 76e672e243 PY-31442 Better reporting of mismatched/missing closing quotes 2018-10-01 12:46:44 +03:00
Mikhail Golubev cd3122c7c1 PY-31442 Implement "rich" methods of PyFormattedStringNode including decoding
Also fixed the problem that whitespaces inside literal parts of f-strings were
matched as PsiWhitespaces instead of FSTRING_TEXT tokens and updated all relevant
test data.
2018-10-01 12:46:42 +03:00
Mikhail Golubev 68f72f3dd9 PY-31442 Handle f-strings terminated by other string literals in fragments
When the terminating quote is either at the beginning of a string literal or
inside it, either in the given f-string itself or inside a nested one and
either in normal fragment or in a fragment located inside a format part of
another fragment. Normal string literals and nested f-strings are also checked
separately.
2018-10-01 12:46:42 +03:00