|
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/__pycache__/ |
U
O��g�? � @ sN d Z ddlZddlZddlmZ ddlmZ ddlmZ i ZG dd� d�Z dS )zGprovides the Lexer class for parsing template strings into parse trees.� N)�
exceptions)� parsetree)�adjust_whitespacec @ s� e Zd Zd%dd�Zedd� �Zd&dd�Zdd � Zd
d� Zdd
� Z e
�d�Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� ZdS )'�LexerNc C sx || _ || _t�| j�| _d| _d| _d| _d| _g | _ g | _
g | _|| _|d krZg | _
nt|d�sn|g| _
n|| _
d S )N� r �__iter__)�text�filenamer ZTemplateNode�template�matched_lineno�matched_charpos�lineno�match_position�tag�control_line�
ternary_stack�encoding�preprocessor�hasattr)�selfr r Zinput_encodingr � r �7/opt/cppython/lib/python3.8/site-packages/mako/lexer.py�__init__ s
zLexer.__init__c C s | j | j| j| jd�S )N)�sourcer
�posr )r r r r )r r r r �exception_kwargs* s
�zLexer.exception_kwargsc C sV zt ||f }W n: tk
rJ |r0t�||�nt�|�}|t ||f<