protected boolean parseParameter(IElementType endToken, boolean isLambda) {
    SyntaxTreeBuilder.Marker parameter = myBuilder.mark();

    if (myBuilder.getTokenType() == PyTokenTypes.DIV) {
      myBuilder.advanceLexer();
      parameter.done(PyElementTypes.SLASH_PARAMETER);
      return true;
    }

    boolean isStarParameter = false;
    if (myBuilder.getTokenType() == PyTokenTypes.MULT) {
      myBuilder.advanceLexer();
      if ((myBuilder.getTokenType() == PyTokenTypes.COMMA) || myBuilder.getTokenType() == endToken) {
        if (myContext.getLanguageLevel().isPython2()) {
          parameter.rollbackTo();
          parameter = myBuilder.mark();
          advanceError(myBuilder, message("PARSE.single.star.parameter.not.supported.py2"));
        }
        parameter.done(PyElementTypes.SINGLE_STAR_PARAMETER);
        return true;
      }

      isStarParameter = true;
    }
    else if (myBuilder.getTokenType() == PyTokenTypes.EXP) {
      myBuilder.advanceLexer();
      isStarParameter = true;
    }
    if (matchToken(PyTokenTypes.IDENTIFIER)) {
      if (!isLambda) {
        parseParameterAnnotation();
      }
      if (!isStarParameter && matchToken(PyTokenTypes.EQ)) {
        if (!getExpressionParser().parseSingleExpression(false)) {
          SyntaxTreeBuilder.Marker invalidElements = myBuilder.mark();
          while (!atAnyOfTokens(endToken, PyTokenTypes.LINE_BREAK, PyTokenTypes.COMMA, null)) {
            nextToken();
          }
          invalidElements.error(message("PARSE.expected.expression"));
        }
      }
      parameter.done(PyElementTypes.NAMED_PARAMETER);
    }
    else {
      parameter.rollbackTo();
      if (atToken(endToken)) {
        return false;
      }
      SyntaxTreeBuilder.Marker invalidElements = myBuilder.mark();
      while (!atToken(endToken) && !atAnyOfTokens(PyTokenTypes.LINE_BREAK, PyTokenTypes.COMMA, null)) {
        nextToken();
      }
      invalidElements.error(message("PARSE.expected.formal.param.name"));
      return atToken(endToken) || atToken(PyTokenTypes.COMMA);
    }
    return true;
  }
protected boolean parseParameter(IElementType endToken, boolean isLambda)