OwlCyberSecurity - MANAGER
Edit File: grouping.cpython-39.pyc
a ���e6 � @ 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 ]�\}}|| }|jr,q|jrHt||�sHt||� q|j|j� r`|�|� q|j|j � rz|� � }W n ty� Y qY n0 |}| �|||� ||| 7 }qdS )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�clsZopens�tidx_offset�idx�token�tidxZopen_idxZ close_idx� r �Y/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/sqlparse/engine/grouping.pyr s&