void () { assertCurrentToken(PyTokenTypes.WHILE_KEYWORD); final SyntaxTreeBuilder.Marker statement = myBuilder.mark(); final SyntaxTreeBuilder.Marker whilePart = myBuilder.mark(); myBuilder.advanceLexer(); if (!getExpressionParser().parseNamedTestExpression(false, false)) { myBuilder.error(PyParsingBundle.message("PARSE.expected.expression")); } parseColonAndSuite(); whilePart.done(PyElementTypes.WHILE_PART); final SyntaxTreeBuilder.Marker elsePart = myBuilder.mark(); if (myBuilder.getTokenType() == PyTokenTypes.ELSE_KEYWORD) { myBuilder.advanceLexer(); parseColonAndSuite(); elsePart.done(PyElementTypes.ELSE_PART); } else { elsePart.drop(); } statement.done(PyElementTypes.WHILE_STATEMENT); }