parameters: (self, token)
docstring: Handle updating state after a token has been checked.
  
      This function should be used for destructive state changes such as
      deleting a tracked object.
  
      Args:
        token: The token to handle.
docstring_summary: Handle updating state after a token has been checked.
docstring_tokens: Handle updating state after a token has been checked .
function: def HandleAfterToken(self, token):
      """Handle updating state after a token has been checked.
  
      This function should be used for destructive state changes such as
      deleting a tracked object.
  
      Args:
        token: The token to handle.
      """
      type = token.type
      if type == Type.SEMICOLON or type == Type.END_PAREN or (
          type == Type.END_BRACKET and
          self._last_non_space_token.type not in (
              Type.SINGLE_QUOTE_STRING_END, Type.DOUBLE_QUOTE_STRING_END)):
        # We end on any numeric array index, but keep going for string based
        # array indices so that we pick up manually exported identifiers.
        self._doc_comment = None
        self._last_comment = None
  
      elif type == Type.END_BLOCK:
        self._doc_comment = None
        self._last_comment = None
  
        if self.InFunction() and self.IsFunctionClose():
          # TODO(robbyw): Detect the function's name for better errors.
          function = self._function_stack.pop()
          function.end_token = token
  
          # Pop all variables till delimiter ('') those were defined in the
          # function being closed so make them out of scope.
          while self._variables_in_scope and self._variables_in_scope[-1]:
            self._variables_in_scope.pop()
  
          # Pop delimiter
          if self._variables_in_scope:
            self._variables_in_scope.pop()
  
      elif type == Type.END_PARAMETERS and self._doc_comment:
        self._doc_comment = None
        self._last_comment = None
  
      if not token.IsAnyType(Type.WHITESPACE, Type.BLANK_LINE):
        self._last_non_space_token = token
  
      self._last_line = token.line
function_tokens: def HandleAfterToken ( self , token ) : type = token . type if type == Type . SEMICOLON or type == Type . END_PAREN or ( type == Type . END_BRACKET and self . _last_non_space_token . type not in ( Type . SINGLE_QUOTE_STRING_END , Type . DOUBLE_QUOTE_STRING_END ) ) : # We end on any numeric array index, but keep going for string based # array indices so that we pick up manually exported identifiers. self . _doc_comment = None self . _last_comment = None elif type == Type . END_BLOCK : self . _doc_comment = None self . _last_comment = None if self . InFunction ( ) and self . IsFunctionClose ( ) : # TODO(robbyw): Detect the function's name for better errors. function = self . _function_stack . pop ( ) function . end_token = token # Pop all variables till delimiter ('') those were defined in the # function being closed so make them out of scope. while self . _variables_in_scope and self . _variables_in_scope [ - 1 ] : self . _variables_in_scope . pop ( ) # Pop delimiter if self . _variables_in_scope : self . _variables_in_scope . pop ( ) elif type == Type . END_PARAMETERS and self . _doc_comment : self . _doc_comment = None self . _last_comment = None if not token . IsAnyType ( Type . WHITESPACE , Type . BLANK_LINE ) : self . _last_non_space_token = token self . _last_line = token . line