boolean (IElementType @NotNull ... validSuccessiveTokens) { if (myBuilder.getTokenType() == PyTokenTypes.IDENTIFIER) { myBuilder.advanceLexer(); return true; } else { final SyntaxTreeBuilder.Marker nameExpected = myBuilder.mark(); if (myBuilder.getTokenType() != PyTokenTypes.STATEMENT_BREAK && !atAnyOfTokens(validSuccessiveTokens)) { myBuilder.advanceLexer(); } nameExpected.error(PyParsingBundle.message("PARSE.expected.identifier")); return false; } }