Refactoring Token::findClosingBracket.