def _PopTo(self, stop_type):
    last = None
    while True:
      last = self._Pop()
      if last.token.type == stop_type:
        break
    return last
Pops the stack until a token of the given type is popped.
dataset/ETHPy150Open google/closure-linter/closure_linter/indentation.py/IndentationRules._PopTo