function traverseObj(obj, fn) {
  for (let key in obj) {
    const prop = obj[key];
    if (prop != null) {
      fn.apply(null, [obj, key, prop]);
      if (typeof prop === 'object') {
        traverseObj(prop, fn);
      }
    }
  }
}
@param {Tokens} obj
@param {(obj: Tokens|Token, key: keyof Tokens|Token, slice: Tokens|Token|string) => void} fn