File: //usr/lib/python3/dist-packages/sqlparse/engine/__pycache__/grouping.cpython-310.pyc
o
�e}_�4 � @ s� d dl mZ d dl mZ d dlmZmZ ejejjejj fZ
ejejjejj
fZejejjfZdd� Zdd� Zdd � Zd
d� Zdd
� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zeej �d d!� �Z!d"d#� Z"d$d%� Z#d&d'� Z$eej%�d(d)� �Z&eej'�d*d+� �Z(e� d,d-� �Z)eej*�d.d/� �Z+d0d1� Z,e� d2d3� �Z-d4d5� Z.d6d7� Z/d8d9� d:d9� d;d<d<fd=d>�Z0d;S )?� )�sql)�tokens)�recurse�imtc C s� g }d}t t| ��D ]K\}}|| }|jrq
|jr$t||�s$t||� q
|j|j� r0|�|� q
|j|j � rUz|�
� }W n tyE Y q
w |}| �|||� ||| 7 }q
dS )z*Groups Tokens that have beginning and end.r N)
� enumerate�list�
is_whitespace�is_group�
isinstance�_group_matching�match�M_OPEN�append�M_CLOSE�pop�
IndexError�group_tokens) �tlist�cls�opens�tidx_offset�idx�token�tidx�open_idx� close_idx� r �:/usr/lib/python3/dist-packages/sqlparse/engine/grouping.pyr s,
���r c C � t | tj� d S �N)r r �SquareBrackets�r r r r �group_brackets4 � r"