boolean () { if (!atToken(PyTokenTypes.LPAR)) { return false; } final SyntaxTreeBuilder.Marker leftPar = myBuilder.mark(); nextToken(); // Reparse empty parentheses as an empty tuple if (!parseWithItems(true)) { leftPar.rollbackTo(); return false; } if (!matchToken(PyTokenTypes.RPAR)) { myBuilder.error(PyParsingBundle.message("PARSE.expected.rpar")); } // Reparse something like "(foo()) as bar" or (foo()).bar as a single WithItem if (!atAnyOfTokens(PyTokenTypes.COLON, PyTokenTypes.STATEMENT_BREAK)) { leftPar.rollbackTo(); return false; } leftPar.drop(); return true; }