def peekSymbol(self, symbol):
        token = self.peek()
        while (token and (not token.isSymbol(symbol))):
            if (token.isSymbol('(')):
                self.peekSymbol(')')
            elif (token.isSymbol('{')):
                self.peekSymbol('}')
            elif (token.isSymbol('[')):
                self.peekSymbol(']')
            token = self.peek()
        return token
Advance lookahead index until symbol token is found, respect nesting of (), {}, []
dataset/ETHPy150Open tabatkins/bikeshed/bikeshed/widlparser/widlparser/tokenizer.py/Tokenizer.peekSymbol