void () { LOG.assertTrue(myBuilder.getTokenType() == PyTokenTypes.LPAR); final SyntaxTreeBuilder.Marker arglist = myBuilder.mark(); myBuilder.advanceLexer(); SyntaxTreeBuilder.Marker genexpr = myBuilder.mark(); int argNumber = 0; while (myBuilder.getTokenType() != PyTokenTypes.RPAR) { argNumber++; if (argNumber > 1) { if (argNumber == 2 && atForOrAsyncFor() && genexpr != null) { parseComprehension(genexpr, null, PyElementTypes.GENERATOR_EXPRESSION); genexpr = null; continue; } else if (matchToken(PyTokenTypes.COMMA)) { if (atToken(PyTokenTypes.RPAR)) { break; } } else { myBuilder.error(message("PARSE.expected.comma.or.rpar")); break; } } if (myBuilder.getTokenType() == PyTokenTypes.MULT || myBuilder.getTokenType() == PyTokenTypes.EXP) { final SyntaxTreeBuilder.Marker starArgMarker = myBuilder.mark(); myBuilder.advanceLexer(); if (!parseSingleExpression(false)) { myBuilder.error(message("PARSE.expected.expression")); } starArgMarker.done(PyElementTypes.STAR_ARGUMENT_EXPRESSION); } else { if (isIdentifier(myBuilder)) { final SyntaxTreeBuilder.Marker keywordArgMarker = myBuilder.mark(); advanceIdentifierLike(myBuilder); if (myBuilder.getTokenType() == PyTokenTypes.EQ) { myBuilder.advanceLexer(); if (!parseSingleExpression(false)) { myBuilder.error(message("PARSE.expected.expression")); } keywordArgMarker.done(PyElementTypes.KEYWORD_ARGUMENT_EXPRESSION); continue; } keywordArgMarker.rollbackTo(); } if (!parseNamedTestExpression(false, false)) { myBuilder.error(message("PARSE.expected.expression")); break; } } } if (genexpr != null) { genexpr.drop(); } checkMatches(PyTokenTypes.RPAR, message("PARSE.expected.rpar")); arglist.done(PyElementTypes.ARGUMENT_LIST); }