void () { int prevEnd = myCurrentEnd; myCurrentStart = getCurrentStart(); myCurrentEnd = getCurrentEnd(); assert prevEnd <= myCurrentStart && myCurrentStart <= myCurrentEnd : "Unexpected range returned by highlighter: " + myIterator.getStart() + ":" + myIterator.getEnd() + ", prevEnd: " + prevEnd + ", scanned range: " + myStartOffset + ":" + myEndOffset + ", resulting range: " + myCurrentStart + ":" + myCurrentEnd + ", highlighter: " + myHighlighter; myCurrentAttributes = myIterator.getTokenType() == TokenType.BAD_CHARACTER ? EMPTY_ATTRIBUTES : myIterator.getTextAttributes(); myIterator.advance(); }