관리-도구
편집 파일: splitter.cpython-39.pyc
a �)g2% � @ sD d dl mZmZmZ eZdd� Zdd� Zdd� Zdd � Z d d� Z dS ) � )�absolute_import�division�print_functionc C sT d}t | �D ]B\}}|dkr(| |d }|dv r|dkr|rJ||krNd}q|}q|S )z� the goal of this block is to determine if the quoted string is unterminated in which case it needs to be put back together Nr � z"'�\)� enumerate)�token� quote_charZ prev_char�idxZcur_char� r �A/usr/lib/python3.9/site-packages/ansible/module_utils/splitter.py�_get_quote_state! s r c C s8 | � |�}| � |�}||kr4||| 7 }|dk r4d}|S )z� this function counts the number of opening/closing blocks for a given opening/closing type and adjusts the current depth for that block based on the difference r )�count)r Z cur_depthZ open_tokenZclose_tokenZnum_openZ num_closer r r �_count_jinja2_blocks5 s r c C s� g }| � � } z| �d�} d}W n ty4 d}Y n0 | �d�}d}d}d}d}d}t|�D �]2\} } | � � �d�}d}t|�D �]�\} }|dkr�|s�d}q�|}t||�}|du}d}|r�|s�|�|� d}n�|s�|s�|s�|s�|�r�| dk�r|�s|�rd |d |f |d <