char closingPeer, IDocument document) throws BadLocationException {
boolean useGenericsHeuristic = openingPeer == '<';
if (useGenericsHeuristic && !fHighlightAngularBrackets)
return -1;
PHPHeuristicScanner scanner = PHPHeuristicScanner
.createHeuristicScanner(document, offset, false);
int peer = scanner.findOpeningPeer(offset - 1,
PHPHeuristicScanner.UNBOUND, openingPeer, closingPeer);
if (peer == PHPHeuristicScanner.NOT_FOUND)
return -1;
if (useGenericsHeuristic
&& !isTypeParameterBracket(peer, document, scanner))