B
NjS2 @ s d Z ddlmZ ddlZddlmZ eejej d Z eejd Z
dd edD Zd d edD Z
G d
d dZedkrdd
lmZ eddd dS )zProvide 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 C s g | ]}t |tkqS )chr_ASCII_ID_CHARS).0xr r 8/opt/alt/python37/lib64/python3.7/idlelib/hyperparser.py
<listcomp> s r c C s g | ]}t |tkqS r )r _ASCII_ID_FIRST_CHARS)r r r r r
r s c @ s\ e Zd Zdd Zdd Zdd Zdd ZdddZed
ddhZ e
dd ZdZdd Z
dS )HyperParserc
sJ | _ |j _}t|j|j}dd }|||}|jsxh|jD ]^}t || d}t
|d } d| }
||| |
d |
|| }|dk s|dkrFP qFW ||pd nF|d |}|r|d } nd
} d| }
||| |
d |d |jdd _|
_| _ fdd
tt jD _ | dS )z;To initialize, analyze the surroundings of the given index.c S s t t| S )N)intfloat)indexr r r
index2line"