boolean (HighlighterIterator iterator, int offset) { final IElementType tokenType = iterator.getTokenType(); if (tokenType == GroovyTokenTypes.mGSTRING_END) return true; if (GroovyTokenSets.STRING_LITERALS.contains(tokenType)) { int start = iterator.getStart(); int end = iterator.getEnd(); return end - start >= 1 && offset == end - 1 || end - start >= 5 && offset >= end - 3; } if (tokenType == GroovyTokenTypes.mREGEX_END) { int start = iterator.getStart(); int end = iterator.getEnd(); return end - start >= 1 && offset == end - 1; } return false; }