OwlCyberSecurity - MANAGER
Edit File: grouping.cpython-39.pyc
a gH�f 9 � @ 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!eej"�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,�d0d1� �Z-eej �d2d3� �Z.e� d4d5� �Z/d6d7� Z0d8d9� Z1d:d;� d<d;� d=d>d>fd?d@�Z2d=S )A� )�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 �Z/home/gouroczh/virtualenv/test/3.9/lib/python3.9/site-packages/sqlparse/engine/grouping.pyr s&