Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/mako/ext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/mako/ext/__pycache__/extract.cpython-38.pyc
U

O��g3�@sJddlmZddlmZddlZddlmZddlmZGdd�d�ZdS)�)�BytesIO)�StringION)�lexer)�	parsetreec@s,eZdZdZdd�Zdd�Zedd��ZdS)	�MessageExtractorTccs4tj|��|jdd���}|�|���EdHdS)N�encoding)�input_encoding)r�Lexer�read�config�parse�
extract_nodesZget_children)�self�fileobjZ
template_node�r�=/opt/cppython/lib/python3.8/site-packages/mako/ext/extract.py�process_files
�
zMessageExtractor.process_fileccs`g}d}|jdpd}ttdt�d|jd���}|D�]"}d}|r\t|tj�r\|j�	�s\q6t|tj
�r�|j�	�}|r�|�|�
|j|��q6|D]&}	|�|	�r�d}|�|�
|j|��q�q6t|tj�r�|jj}
|j}n�t|tj�r�|jj}
|j}n�t|tj��r|jj}
|j}n�t|tj��r(|jj}
ntt|tj��rD|j}
|j}nXt|tj��rh|j�r`d}q6|j}
n4t|tj��r�d}|jj}
nt|tj�r6|jj}
nq6|�r�|dd|jd	k�r�g}d
d�|D�}t|
t��r�|j�r�|
� |d�}
d}|j�rt!d
|
�}
nt"d|
�}
|�#|
|jd	|�D]}
|
Vd}�q&|�rBg}d}|r6|�$|�EdHq6dS)NFr�asciiz\s+zcomment-tagsT���r�cSsg|]}|d�qS)rr)�.0�commentrrr�
<listcomp>[sz2MessageExtractor.extract_nodes.<locals>.<listcomp>�backslashreplace�
�
)%r�list�filter�re�split�
isinstancer�Text�content�strip�Comment�text�extend�_split_comment�lineno�
startswithZDefTagZ
function_decl�code�nodesZBlockTagZ	body_declZCallTagZPageTagZCallNamespaceTag�
expressionZControlLineZisendZCode�
Expression�str�	use_bytes�encoderrZprocess_pythonr
)rr+Ztranslator_commentsZin_translator_commentsrZcomment_tags�nodeZchild_nodes�valueZcomment_tagr*Ztranslator_stringsZused_translator_comments�messagerrrr
s��
�
��
�
�


����zMessageExtractor.extract_nodescs�fdd�t|���D�S)zzReturn the multiline comment at lineno split into a list of
        comment line numbers and the accompanying comment linecsg|]\}}�||f�qSrr)r�index�line�r(rrr~s�z3MessageExtractor._split_comment.<locals>.<listcomp>)�	enumerate�
splitlines)r(rrr6rr'zs

�zMessageExtractor._split_commentN)�__name__�
__module__�__qualname__r/rr
�staticmethodr'rrrrrs
br)�iorrr�makorrrrrrr�<module>s


F1le Man4ger