| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /tmp/calpy/tinycss2/__pycache__/ |
Upload File : |
�
Υ=jJ � � � d dl mZ ddlmZmZmZmZ ddlmZ dd�Z d� Z
dd�Zdd �Zd
� Z
dd�Zd
� Zd� Zdd�Zdd�Zdd�Zdd�Zdd�Zd� Zd� Zd� Z dd�ZdS )� )�chain� )�AtRule�Declaration�
ParseError�
QualifiedRule)�parse_component_value_listFc �j � 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 �B/tmp/claude-1015/pip-target-jmvfl800/lib/python/tinycss2/parser.py�_to_token_iteratorr s2 � � �%���� A�*�5�-�@�@����;�;�� c �* � | D ]}|j dvr|c S �dS )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 s9 � � � � ���:�6�6�6��L�L�L� 7�� 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`.
Nr �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# # sv � � ��}�
5�
5�F��f�%�%�E�
�v�
&�
&�F��}��!�Q��)9�:�:�:�
������ 4�m�%�'� '� '� �r c � � t | |� � }t |� � }|�t dddd� � S t ||� � S )a? Parse a single :diagram:`declaration`.
This is used e.g. for a declaration in an `@supports
<https://drafts.csswg.org/css-conditional/#at-supports>`_ test.
: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 :class:`~tinycss2.ast.Declaration`
or :class:`~tinycss2.ast.ParseError`.
Any whitespace or comment before the ``:`` colon is dropped.
Nr r r )r r r �_parse_declaration)r r r �first_tokens r �parse_one_declarationr'