boolean () { if (myBuilder.getTokenType() == PyTokenTypes.COLON) { myBuilder.advanceLexer(); return true; } else if (myBuilder.getTokenType() == PyTokenTypes.STATEMENT_BREAK) { myBuilder.error(PyParsingBundle.message("PARSE.expected.colon")); return true; } final SyntaxTreeBuilder.Marker marker = myBuilder.mark(); while (!atAnyOfTokens(null, PyTokenTypes.DEDENT, PyTokenTypes.STATEMENT_BREAK, PyTokenTypes.COLON)) { myBuilder.advanceLexer(); } boolean result = matchToken(PyTokenTypes.COLON); if (!result && atToken(PyTokenTypes.STATEMENT_BREAK)) { myBuilder.advanceLexer(); } marker.error(PyParsingBundle.message("PARSE.expected.colon")); return result; }