/usr/local/lib/python3.9/site-packages/sqlparse/__pycache__
a Ұ�hnQ � @ s� d Z ddlZddlmZ ddlmZmZ G dd� d�ZG dd� d�Z G d d � d e �Z G dd� de �ZG d d� dee �ZG dd� de �Z G dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd� de �ZG dd � 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*ee �ZG d+d,� d,e �ZG d-d.� d.e �ZG d/d0� d0e �ZG d1d2� d2e �ZdS )3zFThis module contains classes representing syntactical elements of SQL.� N��tokens)�imt� remove_quotesc @ s e Zd ZdZdd� Zdd� ZdS )�NameAliasMixinz'Implements get_real_name and get_alias.c C s$ | j tjdfd�\}}| j|dd�S )�7Returns the real name (object name) of this identifier.�.��mT)� real_name)� token_next_by�T�Punctuation�_get_first_name)�self�dot_idx�_� r �6/usr/local/lib/python3.9/site-packages/sqlparse/sql.py� get_real_name s zNameAliasMixin.get_real_namec C sh | j tjdfd�\}}|dur0| j|d dd�S | j tjd�\}}t| j�dkrd|durd| jdd �S dS ) �2Returns the alias for this identifier or ``None``.ZASr N� T)�keywords��t� ��reverse)r r �Keywordr � Whitespace�lenr )r Zkw_idx�kwr �wsr r r � get_alias s zNameAliasMixin.get_aliasN)�__name__� __module__�__qualname__�__doc__r r# r r r r r s r c @ sf e Zd ZdZdZdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z ddd�Zdd� Zdd� Z dd� ZdS )�Tokenz�Base class for all other classes in this module. It represents a single token and has two instance attributes: ``value`` is the unchanged value of the token and ``ttype`` is the type of the token. )�value�ttype�parent� normalized� is_keyword�is_group� is_whitespace� is_newlinec C s` t |�}|| _|| _d | _d| _|tjv | _| jtjv | _ | jtj v | _| jrV|�� n|| _ d S )NF)�strr) r* r+ r. r r r- r r/ ZNewliner0 �upperr, )r r* r) r r r �__init__2 s zToken.__init__c C s | j S �N�r) �r r r r �__str__= s z Token.__str__c C sF | � � }| �� }|�d�r(|�d�r(dnd}djf dt| �it� ��S )N�'�"z"<{cls} {q}{value}{q} at 0x{id:2X}>�id)�_get_repr_name�_get_repr_value� startswith�endswith�formatr: �locals)r �clsr) �qr r r �__repr__D s ��zToken.__repr__c C s t | j��d�d S )Nr ���)r1 r* �splitr6 r r r r; L s zToken._get_repr_namec C s2 t | �}t|�dkr$|d d� d }t�dd|�S )N� � z...z\s+� )r1 r �re�sub)r �rawr r r r<