mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
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.
This commit is contained in:
@@ -213,7 +213,7 @@ public class PyElementVisitor extends PsiElementVisitor {
|
||||
visitPyElement(node);
|
||||
}
|
||||
|
||||
public void visitPyFormattedStringNode(PyFormattedStringNode node) {
|
||||
public void visitPyFormattedStringElement(PyFormattedStringElement node) {
|
||||
visitPyElement(node);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* Represents an f-string, a special kind of interpolated string literal introduced in Python 3.6.
|
||||
*
|
||||
* Unlike {@link PyLiteralStringNode} these elements are composite and consist of several kinds of tokens
|
||||
* Unlike {@link PyPlainStringElement} these elements are composite and consist of several kinds of tokens
|
||||
* and normal PSI trees for embedded expressions.
|
||||
*
|
||||
* @see com.jetbrains.python.PyTokenTypes#FSTRING_START
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
* @see PyFStringFragment
|
||||
* @see com.jetbrains.python.PyTokenTypes#FSTRING_END
|
||||
*/
|
||||
public interface PyFormattedStringNode extends PyRichStringNode, PyElement {
|
||||
public interface PyFormattedStringElement extends PyStringElement, PyElement {
|
||||
/**
|
||||
* Returns a list of replacement fields containing expressions which values should be embedded into this literal content.
|
||||
* <p>
|
||||
@@ -33,7 +33,7 @@ public interface PyFormattedStringNode extends PyRichStringNode, PyElement {
|
||||
* expression fragments.
|
||||
* <p>
|
||||
* These ranges don't include literal format specifier parts of fragments and should be completely
|
||||
* covered by {@link PyRichStringNode#getContentRange()}.
|
||||
* covered by {@link PyStringElement#getContentRange()}.
|
||||
* <p>
|
||||
* For instance, for the following f-string:
|
||||
* <p>
|
||||
+1
-1
@@ -15,5 +15,5 @@ package com.jetbrains.python.psi;
|
||||
* <li>{@code '\u0041 \x41 \N{LATIN CAPITAL LETTER A}'}</li>
|
||||
* </ul>
|
||||
*/
|
||||
public interface PyLiteralStringNode extends PyRichStringNode {
|
||||
public interface PyPlainStringElement extends PyStringElement {
|
||||
}
|
||||
+4
-4
@@ -11,10 +11,10 @@ import java.util.List;
|
||||
* A common interface containing utility methods shared among both plain string literals
|
||||
* (i.e. those that don't have "f" prefix) and formatted literals (f-strings).
|
||||
*
|
||||
* @see PyLiteralStringNode
|
||||
* @see PyFormattedStringNode
|
||||
* @see PyPlainStringElement
|
||||
* @see PyFormattedStringElement
|
||||
*/
|
||||
public interface PyRichStringNode extends PsiElement {
|
||||
public interface PyStringElement extends PsiElement {
|
||||
|
||||
/**
|
||||
* Returns string prefix, e.g. "UR", "b", "f", etc.
|
||||
@@ -95,7 +95,7 @@ public interface PyRichStringNode extends PsiElement {
|
||||
/**
|
||||
* Returns whether this string literal contains "f" or "F" prefix.
|
||||
* <p>
|
||||
* It can be used as a counterpart for {@code this isinstance PyFormattedStringNode}, since only this implementation
|
||||
* It can be used as a counterpart for {@code this isinstance PyFormattedStringElement}, since only this implementation
|
||||
* is allowed to have such prefix.
|
||||
*/
|
||||
boolean isFormatted();
|
||||
@@ -37,17 +37,17 @@ import java.util.List;
|
||||
* a "raw" bytes literal {@code rb'\bar'} using apostrophes as quotes and a formatted string literal
|
||||
* {@code f'{baz}'} containing the value of the expression {@code baz}.
|
||||
* <p>
|
||||
* PSI elements representing each of these parts can be acquired using {@link #getGluedStringNodes()} method.
|
||||
* Both plain and formatted literals forming a whole string literal expression implement {@link PyRichStringNode}
|
||||
* PSI elements representing each of these parts can be acquired using {@link #getStringElements()} method.
|
||||
* Both plain and formatted literals forming a whole string literal expression implement {@link PyStringElement}
|
||||
* interface containing methods for retrieving general information about them such as quote types, prefixes,
|
||||
* decoded value, etc.
|
||||
*
|
||||
* @see <a href="https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation">
|
||||
* https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation</a>
|
||||
* @see #getGluedStringNodes()
|
||||
* @see PyRichStringNode
|
||||
* @see PyLiteralStringNode
|
||||
* @see PyFormattedStringNode
|
||||
* @see #getStringElements()
|
||||
* @see PyStringElement
|
||||
* @see PyPlainStringElement
|
||||
* @see PyFormattedStringElement
|
||||
*/
|
||||
public interface PyStringLiteralExpression extends PyLiteralExpression, StringLiteralExpression, PsiLanguageInjectionHost {
|
||||
@NotNull
|
||||
@@ -57,7 +57,7 @@ public interface PyStringLiteralExpression extends PyLiteralExpression, StringLi
|
||||
* Returns a list of implicitly concatenated string elements composing this literal expression.
|
||||
*/
|
||||
@NotNull
|
||||
List<PyRichStringNode> getGluedStringNodes();
|
||||
List<PyStringElement> getStringElements();
|
||||
|
||||
int valueOffsetToTextOffset(int valueOffset);
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ public interface PyElementTypes {
|
||||
TokenSet CLASS_OR_FUNCTION = TokenSet.create(CLASS_DECLARATION, FUNCTION_DECLARATION);
|
||||
TokenSet IMPORT_STATEMENTS = TokenSet.create(IMPORT_STATEMENT, FROM_IMPORT_STATEMENT);
|
||||
|
||||
PyElementType FSTRING_NODE = new PyElementType("FSTRING_NODE", PyFormattedStringNodeImpl.class);
|
||||
PyElementType FSTRING_NODE = new PyElementType("FSTRING_NODE", PyFormattedStringElementImpl.class);
|
||||
PyElementType FSTRING_FRAGMENT = new PyElementType("FSTRING_FRAGMENT", PyFStringFragmentImpl.class);
|
||||
PyElementType FSTRING_FRAGMENT_FORMAT_PART = new PyElementType("FSTRING_FRAGMENT_FORMAT_PART", PyFStringFragmentFormatPartImpl.class);
|
||||
}
|
||||
|
||||
@@ -1917,7 +1917,7 @@ public class PyUtil {
|
||||
|
||||
public StringNodeInfo(@NotNull ASTNode node) {
|
||||
final IElementType nodeType = node.getElementType();
|
||||
// TODO Migrate to newer PyRichStringNode API
|
||||
// TODO Migrate to newer PyStringElement API
|
||||
if (!PyTokenTypes.STRING_NODES.contains(nodeType) && nodeType != PyElementTypes.FSTRING_NODE) {
|
||||
throw new IllegalArgumentException("Node must be valid Python string literal token, but " + nodeType + " was given");
|
||||
}
|
||||
|
||||
+4
-4
@@ -13,22 +13,22 @@ import com.jetbrains.python.PyElementTypes;
|
||||
import com.jetbrains.python.PyTokenTypes;
|
||||
import com.jetbrains.python.psi.PyElementVisitor;
|
||||
import com.jetbrains.python.psi.PyFStringFragment;
|
||||
import com.jetbrains.python.psi.PyFormattedStringNode;
|
||||
import com.jetbrains.python.psi.PyFormattedStringElement;
|
||||
import com.jetbrains.python.psi.PyStringLiteralUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PyFormattedStringNodeImpl extends PyElementImpl implements PyFormattedStringNode {
|
||||
public class PyFormattedStringElementImpl extends PyElementImpl implements PyFormattedStringElement {
|
||||
|
||||
public PyFormattedStringNodeImpl(ASTNode astNode) {
|
||||
public PyFormattedStringElementImpl(ASTNode astNode) {
|
||||
super(astNode);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void acceptPyVisitor(PyElementVisitor pyVisitor) {
|
||||
pyVisitor.visitPyFormattedStringNode(this);
|
||||
pyVisitor.visitPyFormattedStringElement(this);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
+3
-3
@@ -5,7 +5,7 @@ import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.impl.source.tree.LeafPsiElement;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.jetbrains.python.psi.PyLiteralStringNode;
|
||||
import com.jetbrains.python.psi.PyPlainStringElement;
|
||||
import com.jetbrains.python.psi.PyStringLiteralUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -14,8 +14,8 @@ import java.util.List;
|
||||
/**
|
||||
* @author Mikhail Golubev
|
||||
*/
|
||||
public class PyLiteralStringNodeImpl extends LeafPsiElement implements PyLiteralStringNode {
|
||||
public PyLiteralStringNodeImpl(@NotNull IElementType type, CharSequence text) {
|
||||
public class PyPlainStringElementImpl extends LeafPsiElement implements PyPlainStringElement {
|
||||
public PyPlainStringElementImpl(@NotNull IElementType type, CharSequence text) {
|
||||
super(type, text);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.psi.PsiFile;
|
||||
import com.jetbrains.python.psi.FutureFeature;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.psi.PyFile;
|
||||
import com.jetbrains.python.psi.PyRichStringNode;
|
||||
import com.jetbrains.python.psi.PyStringElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -59,9 +59,9 @@ public class PyStringLiteralDecoder {
|
||||
return map;
|
||||
}
|
||||
|
||||
private final PyRichStringNode myNode;
|
||||
private final PyStringElement myNode;
|
||||
|
||||
public PyStringLiteralDecoder(@NotNull PyRichStringNode node) {
|
||||
public PyStringLiteralDecoder(@NotNull PyStringElement node) {
|
||||
myNode = node;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ public class PyStringLiteralExpressionImpl extends PyElementImpl implements PySt
|
||||
List<TextRange> result = myValueTextRanges;
|
||||
if (result == null) {
|
||||
final int elementStart = getTextRange().getStartOffset();
|
||||
final List<TextRange> ranges = StreamEx.of(getGluedStringNodes())
|
||||
final List<TextRange> ranges = StreamEx.of(getStringElements())
|
||||
.map(node -> {
|
||||
final int nodeRelativeOffset = node.getTextRange().getStartOffset() - elementStart;
|
||||
return node.getContentRange().shiftRight(nodeRelativeOffset);
|
||||
@@ -100,7 +100,7 @@ public class PyStringLiteralExpressionImpl extends PyElementImpl implements PySt
|
||||
final int elementStart = getTextRange().getStartOffset();
|
||||
List<Pair<TextRange, String>> result = myDecodedFragments;
|
||||
if (result == null) {
|
||||
final List<Pair<TextRange, String>> combined = StreamEx.of(getGluedStringNodes())
|
||||
final List<Pair<TextRange, String>> combined = StreamEx.of(getStringElements())
|
||||
.flatMap(node -> StreamEx.of(node.getDecodedFragments())
|
||||
.map(pair -> {
|
||||
final int nodeRelativeOffset = node.getTextRange().getStartOffset() - elementStart;
|
||||
@@ -127,10 +127,10 @@ public class PyStringLiteralExpressionImpl extends PyElementImpl implements PySt
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<PyRichStringNode> getGluedStringNodes() {
|
||||
public List<PyStringElement> getStringElements() {
|
||||
return StreamEx.of(getStringNodes())
|
||||
.map(ASTNode::getPsi)
|
||||
.select(PyRichStringNode.class)
|
||||
.select(PyStringElement.class)
|
||||
.toList();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class PythonASTFactory extends ASTFactory {
|
||||
@Override
|
||||
public LeafElement createLeaf(@NotNull IElementType type, CharSequence text) {
|
||||
if (PyTokenTypes.STRING_NODES.contains(type)) {
|
||||
return new PyLiteralStringNodeImpl(type, text);
|
||||
return new PyPlainStringElementImpl(type, text);
|
||||
}
|
||||
return super.createLeaf(type, text);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.jetbrains.python.psi.PyFStringFragment;
|
||||
import com.jetbrains.python.psi.PyFStringFragmentFormatPart;
|
||||
import com.jetbrains.python.psi.PyFormattedStringNode;
|
||||
import com.jetbrains.python.psi.PyFormattedStringElement;
|
||||
import com.jetbrains.python.psi.PyStringLiteralExpression;
|
||||
|
||||
import java.util.List;
|
||||
@@ -70,7 +70,7 @@ public class FStringsAnnotator extends PyAnnotator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitPyFormattedStringNode(PyFormattedStringNode node) {
|
||||
public void visitPyFormattedStringElement(PyFormattedStringElement node) {
|
||||
final String wholeNodeText = node.getText();
|
||||
for (TextRange textRange : node.getLiteralPartRanges()) {
|
||||
int i = textRange.getStartOffset();
|
||||
|
||||
@@ -26,7 +26,7 @@ public class StringLiteralQuotesAnnotator extends PyAnnotator {
|
||||
public void visitPyStringLiteralExpression(final PyStringLiteralExpression node) {
|
||||
final List<ASTNode> stringNodes = node.getStringNodes();
|
||||
for (ASTNode stringNode : stringNodes) {
|
||||
// TODO Migrate to newer PyRichStringNode API
|
||||
// TODO Migrate to newer PyStringElement API
|
||||
if (stringNode.getElementType() == PyElementTypes.FSTRING_NODE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -9,25 +9,25 @@ PyFile:EmptyFStrings.py
|
||||
PsiElement(Py:LPAR)('(')
|
||||
PyTupleExpression
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('F"')
|
||||
PsiElement(Py:FSTRING_END)('"')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('rf"""')
|
||||
PsiElement(Py:FSTRING_END)('"""')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('FR'''')
|
||||
PsiElement(Py:FSTRING_END)(''''')
|
||||
PsiElement(Py:COMMA)(',')
|
||||
|
||||
@@ -6,25 +6,25 @@ PyFile:FStringAllKindsNested.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: 1{f'''2{f"3{f'4'}"}'''}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PsiElement(Py:FSTRING_TEXT)('1')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: 2{f"3{f'4'}"}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PsiElement(Py:FSTRING_TEXT)('2')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: 3{f'4'}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiElement(Py:FSTRING_TEXT)('3')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: 4
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('4')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringBackslashAfterExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{42 \ }bar
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringBackslashBeforeExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{\ 42}bar
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -7,7 +7,7 @@ PyFile:FStringBackslashInsideMultilineExpression.py
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: { 1 + \
|
||||
2}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringBackslashInsteadOfExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{\}bar
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringContainsHashInLiteralPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: #foo
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('#foo')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringContainsHashSignInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:#b}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringDeeplyNestedEmptyFragments.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {:{:{:{}}}}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringEscapeSequenceInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:\\\n}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -7,7 +7,7 @@ PyFile:FStringEscapeSequenceInLiteralPart.py
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
{42}\
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('\n')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringEscapedBraces.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {} {{42}} } {
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('{{}} {{')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -7,7 +7,7 @@ PyFile:FStringEscapedLineBreakInLiteralPart.py
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo
|
||||
bar{42}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo\\nbar')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringEscapedSlashBeforeClosingQuoteInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:\\
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringExpressionContainBraces.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: { {1, 2} }
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentDuplicateTypeConversion.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!r!r}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentIllegalTypeConversion.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!!}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentIncompleteTypeConversionBeforeClosingBrace.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentIncompleteTypeConversionBeforeClosingQuote.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentIncompleteTypeConversionBeforeColon.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!:}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentTypeConversion.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!r}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentTypeConversionAfterFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{width}!r}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentWithDictLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: { {1: 2} }
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentWithInterpolatedFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: result: {value:{width}.{precision}}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('result: ')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentWithLiteralFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:foo}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentWithNotParenthesizedLambda.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {lambda x: 42}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringFragmentWithParenthesizedLambda.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {(lambda x: 42)}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -10,7 +10,7 @@ PyFile:FStringGluedWithLiteralStringNodes.py
|
||||
PyStringLiteralExpression: foo{42} {True}bar
|
||||
PsiElement(Py:SINGLE_QUOTED_STRING)(''foo'')
|
||||
PsiWhiteSpace('\n ')
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringIncompleteFragment.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringIncompleteFragmentWithFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{width}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringIncompleteFragmentWithTypeConversion.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!r
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringIncompleteFragmentWithTypeConversionAndFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42!r:{width}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringIncompleteNamedUnicodePrecedingFragment.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: \N{LATIN SMALL LETTER A{42}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('\N{LATIN SMALL LETTER A')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringNamedUnicodeEscapeInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:\N{LATIN SMALL LETTER A}}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringNamedUnicodeEscapeInLiteralPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('\N{LATIN SMALL LETTER A}')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringNamedUnicodeEscapeInStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {"\N{LATIN SMALL LETTER A}"}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringSingleSlashBeforeLeftBraceInLiteralPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo\{42}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PsiElement(Py:FSTRING_TEXT)('\')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringSingleSlashesBeforeBracesInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:foo\{bar}baz\}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -7,13 +7,13 @@ PyFile:FStringTerminatedByEscapedLineBreakInNestedStringLiteral.py
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'''{'\
|
||||
'}'''}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {'\
|
||||
'}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByLineBreakInExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByLineBreakInExpressionInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByLineBreakInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{42:bar
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByLineBreakInLiteralPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PsiErrorElement:' expected
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByLineBreakInNestedExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'{1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByLineBreakInNestedExpressionInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'{42:{1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {42:{1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByLineBreakInNestedFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'foo{42:bar
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: foo{42:bar
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByLineBreakInNestedLiteralPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'foo
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: foo
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PsiErrorElement:' expected
|
||||
|
||||
+2
-2
@@ -7,13 +7,13 @@ PyFile:FStringTerminatedByLineBreakInNestedStringLiteralInFormatPart.py
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'''{foo:{'\
|
||||
'}}'''}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {foo:{'\
|
||||
'}}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByLineBreakInStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {"""
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByLineBreakInStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {foo:{"""
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteInLiteralPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteInNestedFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"{42:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {42:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,13 +6,13 @@ PyFile:FStringTerminatedByQuoteInNestedLiteralPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{f"baz
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: baz
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiElement(Py:FSTRING_TEXT)('baz')
|
||||
PsiErrorElement:" expected
|
||||
|
||||
@@ -6,13 +6,13 @@ PyFile:FStringTerminatedByQuoteInsideFStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{f"}baz'
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteInsideFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{f"}}'
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
@@ -17,7 +17,7 @@ PyFile:FStringTerminatedByQuoteInsideFStringLiteralInFormatPart.py
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
@@ -6,17 +6,17 @@ PyFile:FStringTerminatedByQuoteInsideNestedFStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"""{f"}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {f"
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
+3
-3
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteInsideNestedFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"""{42:{f"}}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {42:{f"
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
@@ -22,7 +22,7 @@ PyFile:FStringTerminatedByQuoteInsideNestedFStringLiteralInFormatPart.py
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PsiErrorElement:" expected
|
||||
<empty list>
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteInsideNestedStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"""{"}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {"
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteInsideNestedStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"""{42:{"}}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {42:{"
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteInsideStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{"}baz'
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteInsideStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{"}}'
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteOfFStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{f
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteOfFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{f
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteOfNestedFStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"{f
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {f
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteOfNestedFStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"{42:{f
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {42:{f
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteOfNestedStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"{
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,12 +6,12 @@ PyFile:FStringTerminatedByQuoteOfNestedStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f"{42:{
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {42:{
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteOfStringLiteral.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTerminatedByQuoteOfStringLiteralInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringTrailingWhitespaceInIncompleteFragmentInFormatPart.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42:{
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStringWithSimpleFragment.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: foo{42}bar
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:FStrings.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiWhiteSpace(' \n')
|
||||
@@ -17,7 +17,7 @@ PyFile:FStrings.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('fr'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -28,7 +28,7 @@ PyFile:FStrings.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('rf'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -39,7 +39,7 @@ PyFile:FStrings.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('F'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -50,7 +50,7 @@ PyFile:FStrings.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('bf'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -61,7 +61,7 @@ PyFile:FStrings.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('uf'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
PsiWhiteSpace('\n')
|
||||
@@ -72,6 +72,6 @@ PyFile:FStrings.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('ufr'')
|
||||
PsiElement(Py:FSTRING_END)(''')
|
||||
@@ -7,7 +7,7 @@ PyFile:MultilineFStringContainingMultilineExpression.py
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {1 +
|
||||
2}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ PyFile:MultilineFStringContainingMultilineExpressionAfterStatementBreak.py
|
||||
PyExpressionStatement
|
||||
PyStringLiteralExpression: {1 +
|
||||
2}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -8,7 +8,7 @@ PyFile:MultilineFStringContainsCommentInsideExpression.py
|
||||
PyStringLiteralExpression: {[
|
||||
# comment
|
||||
]}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -8,7 +8,7 @@ PyFile:MultilineFStringContainsCommentInsteadOfExpression.py
|
||||
PyStringLiteralExpression: {
|
||||
# comment
|
||||
}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ PyFile:MultilineFStringTerminatedByQuotesInsideParenthesizedExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: { (lambda x:
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -8,7 +8,7 @@ PyFile:MultilineFStringTerminatedByQuotesOfStringLiteral.py
|
||||
PyStringLiteralExpression: {
|
||||
|
||||
}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -10,7 +10,7 @@ PyFile:NestedMultilineFStringsWithMultilineExpressions.py
|
||||
}
|
||||
'''
|
||||
}
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
@@ -18,7 +18,7 @@ PyFile:NestedMultilineFStringsWithMultilineExpressions.py
|
||||
{"bar"
|
||||
}
|
||||
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'''')
|
||||
PsiElement(Py:FSTRING_TEXT)('\n')
|
||||
PyFStringFragment
|
||||
|
||||
@@ -15,4 +15,4 @@ PyFile:SetLiteral.py
|
||||
PsiElement(Py:LBRACE)('{')
|
||||
PyNumericLiteralExpression
|
||||
PsiElement(Py:INTEGER_LITERAL)('1')
|
||||
PsiElement(Py:RBRACE)('}')
|
||||
PsiElement(Py:RBRACE)('}')
|
||||
@@ -6,7 +6,7 @@ PyFile:SingleLineFStringContainsCommentInsideExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {42 # comment}'
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
@@ -6,7 +6,7 @@ PyFile:SingleLineFStringContainsCommentInsteadOfExpression.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {# comment}'
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ PyFile:SingleQuotedFStringInsideMultilineFStringTerminatedByLineBreakInExpressio
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'{1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ PyFile:SingleQuotedFStringInsideMultilineFStringTerminatedByLineBreakInExpressio
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'{(1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: {(1 +
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ PyFile:SingleQuotedFStringInsideMultilineFStringTerminatedByLineBreakInText.py
|
||||
PsiElement(Py:EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyStringLiteralExpression: {f'foo
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f"""')
|
||||
PyFStringFragment
|
||||
PsiElement(Py:FSTRING_FRAGMENT_START)('{')
|
||||
PyStringLiteralExpression: foo
|
||||
PyFormattedStringNode
|
||||
PyFormattedStringElement
|
||||
PsiElement(Py:FSTRING_START)('f'')
|
||||
PsiElement(Py:FSTRING_TEXT)('foo')
|
||||
PsiErrorElement:' expected
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user