| 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�5 � �~ � d dl mZmZmZmZ d dlmZ dd�Zd� Zdd�Z dd�Z
d� Zd� Zdd �Z
dd
�Zdd�Zdd�Zd
� Zd� Zy)� )�AtRule�Declaration�
ParseError�
QualifiedRule)�parse_component_value_listc �P � t | t � rt | |� } t | � S )aq Iterate component values out of string or component values iterable.
:type input: :obj:`str` or :term:`iterable`
:param input: A string or an iterable of :term:`component values`.
:type skip_comments: :obj:`bool`
:param skip_comments: If the input is a string, ignore all CSS comments.
:returns: An iterator yielding :term:`component values`.
)�
isinstance�strr �iter)�input�
skip_commentss �1/usr/lib/python3/dist-packages/tinycss2/parser.py�_to_token_iteratorr s$ � � �%���*�5�-�@����;�� c �6 � | D ] }|j dvs�|c S y)z�Return the next significant (neither whitespace or comment) token.
:type tokens: :term:`iterator`
:param tokens: An iterator yielding :term:`component values`.
:returns: A :term:`component value`, or :obj:`None`.
��
whitespace�commentN)�type)�tokens�tokens r �_next_significantr s% � � � ���:�:�6�6��L�r c � � t | |� }t |� }t |� }|�t dddd� S |�"t |j |j dd� S |S )a� Parse a single :diagram:`component value`.
This is used e.g. for an attribute value
referred to by ``attr(foo length)``.
:type input: :obj:`str` or :term:`iterable`
:param input: A string or an iterable of :term:`component values`.
:type skip_comments: :obj:`bool`
:param skip_comments: If the input is a string, ignore all CSS comments.
:returns:
A :term:`component value` (that is neither whitespace or comment),
or a :class:`~tinycss2.ast.ParseError`.
r �empty�Input is empty�extra-inputzGot more than one token)r r r �source_line�
source_column)r r
r �first�seconds r �parse_one_component_valuer! "