| Server IP : 107.13.46.68 / Your IP : 216.73.216.232 Web Server : Apache/2.4.58 (Ubuntu) System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/tinycss2/__pycache__/ |
Upload File : |
�
m�c�[ � �� � d Z ddlmZ ddlmZmZmZ G d� d� Z G d� de� Z G d � d
e� Z G d� de� Z
G d
� de� Z G d� de� Z G d� de� Z
G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� d e� Z G d!� d"e� Z G d#� d$e� Z G d%� d&e� Z G d'� d(e� Z G d)� d*e� Z G d+� d,e� Z G d-� d.e� Zy/)0z5
Data structures for the CSS abstract syntax tree.
� )�ascii_lower� )�
_serialize_to�serialize_identifier�serialize_namec �0 � e Zd ZdZddgZd� Zd� Zd� Zd� Zy) �Nodea� Every node type inherits from this class,
which is never instantiated directly.
.. attribute:: type
Each child class has a :attr:`type` class attribute
with a unique string value.
This allows checking for the node type with code like:
.. code-block:: python
if node.type == 'whitespace':
instead of the more verbose:
.. code-block:: python
from tinycss2.ast import WhitespaceToken
if isinstance(node, WhitespaceToken):
Every node also has these attributes and methods,
which are not repeated for brevity:
.. attribute:: source_line
The line number of the start of the node in the CSS source.
Starts at 1.
.. attribute:: source_column
The column number within :attr:`source_line` of the start of the node
in the CSS source.
Starts at 1.
.. automethod:: serialize
�source_line�
source_columnc � � || _ || _ y �N)r
r )�selfr
r s �./usr/lib/python3/dist-packages/tinycss2/ast.py�__init__z
Node.__init__5 s � �&���*��� c �: � | j j | �� S )N�r )�repr_format�formatr s r �__repr__z
Node.__repr__9 s � ����&�&�D�&�1�1r c �^ � g }| j |j � dj |� S )z>Serialize this node to CSS syntax and return a Unicode string.� )r �append�join)r �chunkss r � serializezNode.serialize<