code: def tokenize(s):
      # type: (str) -> List[Token]
      
      original = s
      tokens = []  # type: List[Token]
      while True:
          if not s:
              tokens.append(End())
              return tokens
          elif s[0] == ' ':
              s = s[1:]
          elif s[0] in '()[],*':
              tokens.append(Separator(s[0]))
              s = s[1:]
          elif s[:2] == '->':
              tokens.append(Separator('->'))
              s = s[2:]
          else:
              m = re.match(r'[-\w]+(\s*(\.|:)\s*[-/\w]*)*', s)
              if not m:
                  raise ParseError(original)
              fullname = m.group(0)
              fullname = fullname.replace(' ', '')
              if fullname in TYPE_FIXUPS:
                  fullname = TYPE_FIXUPS[fullname]
              # pytz creates classes with the name of the timezone being used:
              # https://github.com/stub42/pytz/blob/f55399cddbef67c56db1b83e0939ecc1e276cf42/src/pytz/tzfile.py#L120-L123
              # This causes pyannotates to crash as it's invalid to have a class
              # name with a `/` in it (e.g. "pytz.tzfile.America/Los_Angeles")
              if fullname.startswith('pytz.tzfile.'):
                  fullname = 'datetime.tzinfo'
              if '-' in fullname or '/' in fullname:
                  # Not a valid Python name; there are many places that
                  # generate these, so we just substitute Any rather
                  # than crashing.
                  fullname = 'Any'
              tokens.append(DottedName(fullname))
              s = s[len(m.group(0)):]
docs: Translate a type comment into a list of tokens.