Current File : //usr/local/apps/python3/lib/python3.11/idlelib/__pycache__/hyperparser.cpython-311.opt-1.pyc |
�
�KeY2 � �* � d Z ddlmZ ddlZddlmZ eej ej z dz � � Z eej dz � � Z
d� ed� � D � � Zd� ed� � D � � Z
G d � d
� � Zedk rddlmZ ed
d�� � dS dS )z�Provide advanced parsing abilities for ParenMatch and other extensions.
HyperParser uses PyParser. PyParser mostly gives information on the
proper indentation of code. HyperParser gives additional information on
the structure of code.
� )� iskeywordN)�pyparse�_c �: � g | ]}t |� � t v ��S � )�chr�_ASCII_ID_CHARS��.0�xs �=/usr/local/apps/python3/lib/python3.11/idlelib/hyperparser.py�
<listcomp>r s# � �E�E�E�Q�c�!�f�f��/�E�E�E� � c �: � g | ]}t |� � t v ��S r )r �_ASCII_ID_FIRST_CHARSr
s r
r r s$ � �;�;�;�1�c�!�f�f�%�%�;�;�;r c �h � e Zd Zd� Zd� Zd� Zd� Zd
d�Z eh d�� � Z e
d � � � Zd
Zd� Z
dS )�HyperParserc �� � � |� _ |j x� _ }t j |j |j � � }d� } ||� |� � � � }|j s�|j D ]�}t ||z
d� � }t |� � dz } d|z }
|� |� | |
� � dz � � |�
|� | � � � � }|�|dk r n��|� |pd� � ni|� d|� � }|r |d } nd } d|z }
|� |� | |
� � dz � � |� d� � |j dd
� � _ |
� _ |� � � � _ � fd�t- t/ � j � � � � D � � � _ � � |� � dS )z;To initialize, analyze the surroundings of the given index.c �: � t t | � � � � S )N)�int�float)�indexs r
�
index2linez(HyperParser.__init__.<locals>.index2line"