
    ]h~                     t    d Z ddlmZmZmZmZ dgZdZdZddl	m
Z
 ddlZddlZ G d	 de
j                        Zy)
zCSSComment is not defined in DOM Level 2 at all but a css_parser defined
class only.

Implements CSSRule which is also extended for a CSSComment rule type.
    )unicode_literalsdivisionabsolute_importprint_function
CSSCommentrestructuredtextz$Id$   )cssruleNc                        e Zd ZdZ	 	 d fd	Zd Zd Zd Z fdZ e	eed      Z
 e	d	 d
      Z e	d       Z xZS )r   zT
    Represents a CSS comment (css_parser only).

    Format::

        /*...*/
    c                 r    t         t        |   ||       d | _        |r| j	                  |       || _        y )N)
parentRuleparentStyleSheet)superr   __init___cssText_setCssText	_readonly)selfcssTextr   r   readonly	__class__s        /home/pod-website-builder.sw7ft.com/pod-website-builder/website-analyzer/venv/lib/python3.12/site-packages/css_parser/css/csscomment.pyr   zCSSComment.__init__   s>    j$(J:J 	) 	L W%!    c                 P    d| j                   j                  d| j                  dS )Nzcss_parser.css.z	(cssText=))r   __name__r   r   s    r   __repr__zCSSComment.__repr__%   s     NN##LL 	r   c                 `    d| j                   j                  | j                  t        |       fz  S )Nz-<css_parser.css.%s object cssText=%r at 0x%x>)r   r   r   idr   s    r   __str__zCSSComment.__str__*   s0    >NN##LLtHB  	r   c                 @    t         j                  j                  |       S )z#Return serialized property cssText.)
css_parserserdo_CSSCommentr   s    r   _getCssTextzCSSComment._getCssText0   s    ~~++D11r   c                    t         t        |   |       | j                  |      }| j	                  |      }| j	                  |      }|r*| j                  |      | j                  j                  k7  s|rH| j                  j                  d| j                  |      z  t        j                  j                         y| j                  |      | _        y)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   r   
_tokenize2
_nexttoken_type_prodsCOMMENT_logr(   	_valuestrxmldomInvalidModificationErr_tokenvaluer   )r   r   	tokenizercommenttoken
unexpectedr   s        r   r   zCSSComment._setCssText4   s      	j$+G4OOG,	y1__Y/
::l#t{{':'::IIOO> NN734"%''"@"@  B !,,\:DMr   z1The parsable textual representation of this rule.)docc                     | j                   S )N)r-   r   s    r   <lambda>zCSSComment.<lambda>V   s
     r   z=The type of this rule, as defined by a CSSRule type constant.c                      y)NT r   s    r   r9   zCSSComment.<lambda>[   s    r   )NNNF)r   
__module____qualname____doc__r   r   r!   r&   r   propertyr   type
wellformed__classcell__)r   s   @r   r   r      s^     1516	"
2;> {KNPG -)*D
 +,Jr   )r>   
__future__r   r   r   r   __all____docformat____version__ r
   r#   xml.domr0   CSSRuler   r;   r   r   <module>rJ      s?   
 S R."   J- J-r   