ITextRegion tRegion = null;
while (matcher != null) {
int startIndex = matcher.start();
int endIndex = matcher.end();
if (startIndex != startPosition) {
tRegion = new ContextRegion(token,
commentStart + startPosition, startIndex
- startPosition, startIndex - startPosition);
result.add(tRegion);
}
tRegion = new ContextRegion(PHPRegionTypes.PHPDOC_TODO,
commentStart + startIndex, endIndex - startIndex, endIndex
- startIndex);
result.add(tRegion);
startPosition = endIndex;
matcher = getMinimalMatcher(matchers, startPosition);
}
final int length = commentLength - startPosition;
if (length != 0) {
result.add(new ContextRegion(token, commentStart + startPosition,
length, length));
}
}