void (SyntaxTreeBuilder.Marker classMarker) { assertCurrentToken(PyTokenTypes.CLASS_KEYWORD); myBuilder.advanceLexer(); parseIdentifierOrSkip(PyTokenTypes.LPAR, PyTokenTypes.LBRACKET, PyTokenTypes.COLON); parseTypeParameterList(); if (myBuilder.getTokenType() == PyTokenTypes.LPAR) { getExpressionParser().parseArgumentList(); } else { final SyntaxTreeBuilder.Marker inheritMarker = myBuilder.mark(); inheritMarker.done(PyElementTypes.ARGUMENT_LIST); } final ParsingContext context = getParsingContext(); context.pushScope(context.getScope().withClass()); parseColonAndSuite(); context.popScope(); classMarker.done(PyElementTypes.CLASS_DECLARATION); }