code: public function generate($input)
      {
          $tokens = [];
          $parts = explode('\\', $input);
  
          foreach ($parts as $index => $part) {
              $tokens[] = new Token([T_STRING, $part]);
              if ($index !== \count($parts) - 1) {
                  $tokens[] = new Token([T_NS_SEPARATOR, '\\']);
              }
          }
  
          return $tokens;
      }
docs: Parse a string that contains a namespace into tokens.
  
  @param string $input
  
  @return Token[]