boolean () { assert atToken(PyTokenTypes.IDENTIFIER, TOK_TYPE); SyntaxTreeBuilder.Marker mark = myBuilder.mark(); myBuilder.remapCurrentToken(PyTokenTypes.TYPE_KEYWORD); nextToken(); if (!atToken(PyTokenTypes.IDENTIFIER)) { mark.rollbackTo(); myBuilder.remapCurrentToken(PyTokenTypes.IDENTIFIER); return false; } parseIdentifierOrSkip(PyTokenTypes.LBRACKET, PyTokenTypes.EQ); parseTypeParameterList(); checkMatches(PyTokenTypes.EQ, PyParsingBundle.message("PARSE.eq.expected")); myContext.getExpressionParser().parseExpression(); mark.done(PyElementTypes.TYPE_ALIAS_STATEMENT); return true; }