void (boolean isTargetExpression) { LOG.assertTrue(myBuilder.getTokenType() == PyTokenTypes.LPAR); final SyntaxTreeBuilder.Marker expr = myBuilder.mark(); myBuilder.advanceLexer(); if (myBuilder.getTokenType() == PyTokenTypes.RPAR) { myBuilder.advanceLexer(); expr.done(PyElementTypes.TUPLE_EXPRESSION); } else { parseYieldOrTupleExpression(isTargetExpression); if (atForOrAsyncFor()) { parseComprehension(expr, PyTokenTypes.RPAR, PyElementTypes.GENERATOR_EXPRESSION); } else { final SyntaxTreeBuilder.Marker err = myBuilder.mark(); boolean empty = true; while (!myBuilder.eof() && myBuilder.getTokenType() != PyTokenTypes.RPAR && myBuilder.getTokenType() != PyTokenTypes.LINE_BREAK && myBuilder.getTokenType() != PyTokenTypes.STATEMENT_BREAK && myBuilder.getTokenType() != PyTokenTypes.FSTRING_END) { myBuilder.advanceLexer(); empty = false; } if (!empty) { err.error(message("unexpected.expression.syntax")); } else { err.drop(); } checkMatches(PyTokenTypes.RPAR, message("PARSE.expected.rpar")); expr.done(PyElementTypes.PARENTHESIZED_EXPRESSION); } } }