Lexer (@NotNull OccurrenceConsumer consumer) { return new BaseFilterLexer(new MarkdownHighlightingLexer(), consumer) { @Override public void advance() { if (MarkdownIndexPatternBuilder.COMMENT_TOKEN_SET.contains(myDelegate.getTokenType())) { scanWordsInToken(UsageSearchContext.IN_COMMENTS, false, false); advanceTodoItemCountsInToken(); } myDelegate.advance(); } }; }