(self, line, column)
return recursive_is_type(token_type, Token.Comment)
Check if character at column is a comment
Check if character at column is a comment
Check if character at column is a comment
def isComment(self, line, column):
        """Check if character at column is a comment
        """
        block = self.document().findBlockByNumber(line)

        # here, pygments' highlighter is implemented, so the dataobject
        # that is originally defined in Qutepart isn't the same

        # so I'm using pygments' parser, storing it in the data object

        dataObject = block.userData()
        if dataObject is None:
            return False
        if len(dataObject.syntax_stack) > 1:
            return True

        token_type = self._get_token_at(block, column)

        def recursive_is_type(token, parent_token):
            if token.parent is None:
                return False
            if token.parent is parent_token:
                return True
            return recursive_is_type(token.parent, parent_token)

        return recursive_is_type(token_type, Token.Comment)
def isComment ( self , line , column ) : block = self . document ( ) . findBlockByNumber ( line ) # here, pygments' highlighter is implemented, so the dataobject # that is originally defined in Qutepart isn't the same # so I'm using pygments' parser, storing it in the data object dataObject = block . userData ( ) if dataObject is None : return False if len ( dataObject . syntax_stack ) > 1 : return True token_type = self . _get_token_at ( block , column ) def recursive_is_type ( token , parent_token ) : if token . parent is None : return False if token . parent is parent_token : return True return recursive_is_type ( token . parent , parent_token ) return recursive_is_type ( token_type , Token . Comment )