void (IElementType endToken, boolean advanceLexer, boolean isLambda) { SyntaxTreeBuilder.Marker parameterList; parameterList = myBuilder.mark(); if (advanceLexer) { myBuilder.advanceLexer(); } boolean first = true; boolean afterStarParameter = false; while (myBuilder.getTokenType() != endToken) { if (first) { first = false; } else { if (myBuilder.getTokenType() == PyTokenTypes.COMMA) { myBuilder.advanceLexer(); } else { myBuilder.error(message("PARSE.expected.comma.lpar.rpar")); break; } } if (myBuilder.getTokenType() == PyTokenTypes.LPAR) { parseParameterSubList(); continue; } boolean isStarParameter = atAnyOfTokens(PyTokenTypes.MULT, PyTokenTypes.EXP); if (!parseParameter(endToken, isLambda)) { if (afterStarParameter && myContext.getLanguageLevel().isOlderThan(LanguageLevel.PYTHON36)) { myBuilder.error(message("PARSE.expected.expression")); } break; } if (isStarParameter) { afterStarParameter = true; } } if (myBuilder.getTokenType() == endToken && endToken == PyTokenTypes.RPAR) { myBuilder.advanceLexer(); } parameterList.done(PyElementTypes.PARAMETER_LIST); if (myBuilder.getTokenType() == endToken && endToken == PyTokenTypes.COLON) { myBuilder.advanceLexer(); } }