관리-도구
편집 파일: parsetree.cpython-37.pyc
B �C]�K � @ st d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ G dd � d e�Z G d d� de �Z G dd � d e �ZG dd� de �ZG dd� de �Z G dd� de �ZG dd� de �ZG dd� de�ZG dd� de�ee ��ZG dd� de�ZG dd� de�ZG dd� de�ZG d d!� d!e�ZG d"d#� d#e�ZG d$d%� d%e�ZG d&d'� d'e�ZG d(d)� d)e�ZG d*d+� d+e�ZdS ),z5defines the parse tree components for Mako templates.� N)�ast)�compat)� exceptions)�filters)�utilc @ s4 e Zd ZdZdd� Zedd� �Zdd� Zdd � Zd S )�Nodez(base class for a Node in the parse tree.c C s || _ || _|| _|| _d S )N)�source�lineno�pos�filename)�selfr r r r � r �?/opt/alt/python37/lib/python3.7/site-packages/mako/parsetree.py�__init__ s z Node.__init__c C s | j | j| j| jd�S )N)r r r r )r r r r )r r r r �exception_kwargs s zNode.exception_kwargsc C s g S )Nr )r r r r �get_children% s zNode.get_childrenc s, � fdd�}t � d| jj |�}|| � d S )Nc s x| � � D ]}|�� � q W d S )N)r �accept_visitor)�node�n)�visitorr r �traverse) s z%Node.accept_visitor.<locals>.traverse�visit)�getattr� __class__�__name__)r r r �methodr )r r r ( s zNode.accept_visitorN) r � __module__�__qualname__�__doc__r �propertyr r r r r r r r s r c s0 e Zd ZdZ� fdd�Zdd� Zdd� Z� ZS )�TemplateNodez?a 'container' node that stores the overall collection of nodes.c s&