void (@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) { final var bufferHash = buffer.hashCode(); myBufferStart = startOffset; myBufferEnd = endOffset; if (bufferHash == lastBufferHash && buffer.equals(myBuffer)) { myLexemeIndex = initialState; return; } lastBufferHash = bufferHash; myBuffer = buffer; final var parsedTree = MarkdownParserManager.parseContent(buffer.subSequence(startOffset, endOffset), flavour); myLexemes.clear(); myStartOffsets.clear(); myEndOffsets.clear(); ASTNodeKt.accept(parsedTree, new LexerBuildingVisitor()); myLexemeIndex = 0; }