code: def register_token(self, token_class, regexp=None):
          
          if regexp is None:
              regexp = token_class.regexp
  
          self.tokens.register(token_class, regexp)
docs: Register a token class.
  
          Args:
              token_class (tdparser.Token): the token class to register
              regexp (optional str): the regexp for elements of that token.
                  Defaults to the `regexp` attribute of the token class.