docs: def attempt(self, *kinds):
          """Try to get the next token if it matches one of the kinds given,
          otherwise returning None. If no kinds are given, any kind is
          accepted."""
          if self._error:
              raise self._error
          token = self.next_token
          if not token:
              return None
          if kinds and token.kind not in kinds:
              return None
          self._advance()
          return token