o
    /hY
                     @   s<   d Z dgZddlZddlZddlmZ G dd dejZdS )zCSSComment is not defined in DOM Level 2 at all but a cssutils defined
class only.

Implements CSSRule which is also extended for a CSSComment rule type.

CSSComment    N   )cssrulec                       sr   e Zd ZdZ	d fdd	Zdd Zdd	 Zd
d Z fddZe	eeddZ
e	dd ddZe	dd Z  ZS )r   zR
    Represents a CSS comment (cssutils only).

    Format::

        /*...*/
    NFc                    s.   t  j||d d | _|r| | || _d S )N)
parentRuleparentStyleSheet)super__init___cssText_setCssText	_readonly)selfcssTextr   r   readonly	__class__ K/var/www/html/myenv/lib/python3.10/site-packages/cssutils/css/csscomment.pyr      s
   

zCSSComment.__init__c                 C   s   d| j j d| jdS )Nzcssutils.css.z	(cssText=))r   __name__r   r   r   r   r   __repr__$   s   zCSSComment.__repr__c                 C   s$   d| j j d| jdt| ddS )Nz<cssutils.css.z object cssText=z at 0xx>)r   r   r   idr   r   r   r   __str__'   s   $zCSSComment.__str__c                 C   s   t j| S )z#Return serialized property cssText.)cssutilsserdo_CSSCommentr   r   r   r   _getCssText*   s   zCSSComment._getCssTextc                    sv   t  | | |}| |}| |}|r"| || jjks"|r3| jjd| 	| t
jjd dS | || _dS )ah  
        :param cssText:
            textual text to set or tokenlist which is not tokenized
            anymore. May also be a single token for this rule

        :exceptions:
            - :exc:`~xml.dom.SyntaxErr`:
              Raised if the specified CSS string value has a syntax error and
              is unparsable.
            - :exc:`~xml.dom.InvalidModificationErr`:
              Raised if the specified CSS string value represents a different
              type of rule than the current one.
            - :exc:`~xml.dom.NoModificationAllowedErr`:
              Raised if the rule is readonly.
        z CSSComment: Not a CSSComment: %r)errorN)r   r
   
_tokenize2
_nexttoken_type_prodsCOMMENT_logr   	_valuestrxmldomInvalidModificationErr_tokenvaluer	   )r   r   	tokenizercommenttoken
unexpectedr   r   r   r
   .   s   



zCSSComment._setCssTextz1The parsable textual representation of this rule.)docc                 C   s   | j S )N)r$   r   r   r   r   <lambda>W   s    zCSSComment.<lambda>z=The type of this rule, as defined by a CSSRule type constant.c                 C   s   dS )NTr   r   r   r   r   r/   \   s    )NNNF)r   
__module____qualname____doc__r   r   r   r   r
   propertyr   type
wellformed__classcell__r   r   r   r   r      s$    	")	r2   __all__xml.domr'   r    r   CSSRuler   r   r   r   r   <module>   s    