관리-도구
편집 파일: lexer.cpython-37.pyc
B �C]B � @ s\ d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlmZ i Z G dd� de �ZdS ) zGprovides the Lexer class for parsing template strings into parse trees.� N)�compat)� exceptions)� parsetree)�adjust_whitespacec @ s� e Zd Zd$dd�Zedd� �Zd%dd�Zd d � Zdd� Zd d� Z e �d�Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� ZdS )&�LexerNFc C s� || _ || _t�| j�| _d| _d| _d| _d| _g | _ g | _ g | _|| _|| _ tjrd|rdt�d��|d krtg | _nt|d�s�|g| _n|| _d S )N� r z4Mako for Python 3 does not support disabling Unicode�__iter__)�text�filenamer ZTemplateNode�template�matched_lineno�matched_charpos�lineno�match_position�tag�control_line� ternary_stack�disable_unicode�encodingr Zpy3kr ZUnsupportedError�preprocessor�hasattr)�selfr r r Zinput_encodingr � r �;/opt/alt/python37/lib/python3.7/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_kwargs6 s zLexer.exception_kwargsc C sX yt ||f }W n< tk rL |r2t�||�}n t�|�}|t ||f<