boolean () { final SyntaxTreeBuilder builder = myContext.getBuilder(); IElementType tokenType = builder.getTokenType(); if (PyTokenTypes.STRING_NODES.contains(tokenType) || tokenType == PyTokenTypes.FSTRING_START) { final SyntaxTreeBuilder.Marker marker = builder.mark(); while (true) { tokenType = builder.getTokenType(); if (PyTokenTypes.STRING_NODES.contains(tokenType)) { nextToken(); } else if (tokenType == PyTokenTypes.FSTRING_START) { parseFormattedStringNode(); } else { break; } } marker.done(PyElementTypes.STRING_LITERAL_EXPRESSION); return true; } return false; }