eY2nSrSSKJr SSKrSSKJr \"\R\R-S-5r \"\RS-5r \ "S5Vs/sHn\ "U5\ ;PM snr \ "S5Vs/sHn\ "U5\ ;PM snr"SS5r\S :XaSS KJr \"S S S 9 ggs snfs snf)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_cd\rSrSrSrSrSrSrS Sjr\ "1Sk5r \ S5r S r S rS rg ) HyperParserc(XlUR=Uln[R"URUR 5nSnU"UR U55nUR(dURHrn[Xg- S5n[U5S-n SU-n URURX5S-5 URURU 55n U cUS:XdMr O URW =(d S5 OZUR!SU5n U (aU Sn OS n SU-n URURX5S-5 URS5 UR"SS UlW UlUR)5Ul[-[/UR*55V s/sH7n U S:=(a( UR*U SUR*U S- S:PM9 sn UlUR3U5 gs sn f) z;To initialize, analyze the surroundings of the given index.c*[[U55$)N)intfloat)indexs 9/opt/imh/python3.13/lib/python3.13/idlelib/hyperparser.py index2line(HyperParser.__init__..index2line"suU|$ $z.0z%d.endz Nrconsolez1.0)editwintextrParser indentwidthtabwidthrprompt_last_linenum_context_linesmaxreprset_codegetfind_good_parse_start_build_char_in_string_funcset_lo tag_prevrangecoderawtext stopatindexget_last_stmt_bracketing bracketingrangelenisopener set_index)selfrrrparserrlnocontextstartat startatindexr'bodris r__init__HyperParser.__init__s "<<' D 3 3W5E5EF %E*+''"44cmQ/#G}t3 &n  CE IJ22!<<\JL?gl5 MM#( #""9e4A t $ "S.K OODHH\?E F MM! {{3B' ' 99; #(DOO(<"=?"=Q11!3A!61-a0"11"=?  u ?s7>Hc`[UR5[URRXR55- nUS:a[ SU-5eX lSUlUR[UR5S- :aURURS-SUR :ajU=RS- slUR[UR5S- :a/URURS-SUR :aMjUR[UR5S- :afURURS-SUR :Xa8URURS-(dU=RS- slgggg)zWSet the index to which the functions relate. The index must be in the same statement. rz(Index %s precedes the analyzed statementrN) r+r&rr r' ValueErrorindexinrawtext indexbracketr)r,)r.rr;s rr-HyperParser.set_indexQsu dll+diimmE3C3CDEF A G$%& &,  3t#7#99t0023A69L9LL    "   3t#7#99t0023A69L9LL   DOO 4Q 6 6 OOD--a/ 0 3t7J7J J}}T..q01    " 2 K 7rcURUR=(a, URURURSS;$)z2Is the index given to the HyperParser in a string?r)"'r,r<r&r)r.s r is_in_stringHyperParser.is_in_stringfsH d//0 T__T->->?BC rcURUR(+=(d, URURURSS;$)z5Is the index given to the HyperParser in normal code?r)#r?r@rArBs r is_in_codeHyperParser.is_in_codensIMM$"3"344' T__T->->?BC&' (rcURURSnURnURU(a9URURUSU;dURUSU:azUS-nUS:ag[ X0RUS5nURU(dM=URURUSU;aMbURUSU:aMzURS-nU[ UR5:aLURUSU:a6US- nU[ UR5:aURUSU:aM6UR RSUR[ UR5URUS- 4-5nU[ UR5:d)URUS[ UR5:aU(agURnXg4$UR RSUR[ UR5URUSS- - 4-5nXg4$)aReturn bracket indexes or None. If the index given to the HyperParser is surrounded by a bracket defined in openers (or at least has one before it), return the indices of the opening bracket and the closing bracket (or the end of line, whichever comes first). If it is not surrounded by brackets, or the end of line comes before the closing bracket and mustclose is True, returns None. rrNz%s-%dc) r)r<r,r&minr+rrr')r.openers mustclosebracketinglevelbeforeafter beforeindex afterindexs rget_surrounding_brackets$HyperParser.get_surrounding_bracketsts3//$*;*;NoneTrueFalsec4[nUnXR:ad[XS- 5S:aPU[XS- 5(a8US-nXR:a.[XS- 5S:aU[XS- 5(aM8XR:a[XS- 5S:aUS- U:aJSXS- U-R5(a-US-nUS- U:aSXS- U-R5(aM-US- U:a"SXS- U-R5(aUS-nUS- U:a"SXS- U-R5(aUS-nXUR5(dgOXS:a[[X5(dgXS:a%[ XU5(aXUUR ;agX5- $)zGiven a string and pos, return the number of chars in the identifier which ends at pos, or 0 if there is no such one. This ignores non-identifier eywords are not identifiers. rrar)_IS_ASCII_ID_CHARord isidentifier_IS_ASCII_ID_FIRST_CHARr _ID_KEYWORDS)clsstrlimitposis_ascii_id_charr6s r_eat_identifierHyperParser._eat_identifiers-  iCAJ#% SQZ1 FA iCAJ#% SQZ11 9SQZC/a%5.cCAcN&:%H%H%J%JQa%5.cCAcN&:%H%H%J%J1u~3U3#7"E"E"G"GQ1u~3U3#7"E"E"G"GQ :**,,- W+3sv;7 7#*%%c #"2"22wrz \cPUR5(d [S5eURnURnURnX#SnUR nUnSnXT:aXS- UR ;aUS-nOSU(dXT:aXS- S:XaUS-nSnO4XT:Xa.US:a(XUS- SS:XaUS-nX#SnX#S-SnOOMuU(dOURXU5nU(a XX- nUnSnOXT:XaX#Sn US:a)X#S- SU :aUS-nUS:aX#S- SU :aMX#SU:XaOVX#SnUS-nX#SnUnXS ;aO5XS ;a+US:a#XS- S ;aUS-nUS:a XS- S ;aMUnOOGM=XUR $) zrReturn a string with the Python expression which ends at the given index, which is empty if there is no real one. z?get_expression should only be called if index is inside a code.rTr.rFrZFz([z'"rRbBuU)rGr:r&r)r<r;_whitespace_charsre) r.r&r) brck_index brck_limitrclast_identifier_pos postdot_phaseretlevels rget_expressionHyperParser.get_expressionsC  :; ;,,__ && +A. !!! >g!en8N8N&N1HC'&7q5>S+@1HC$(M'JNA6q9:cA!OJ!+!7!:J$\215C'*!&&wC@Ci&)# % "#.q1 1nqL)A!)Du)L!OJ!1nqL)A!)Du)L)!, : ,Q/a '3A6 &)#<4'|u,!Ag''*:h*F1HC"Ag''*:h*F.1+CF4+>+>??r)r)rr<r;r,r&r'rN)z([{F)__name__ __module__ __qualname____firstlineno__r7r-rCrGrR frozensetr_ classmethodrerjrq__static_attributes__rrrrsL5n#*( ('X67L66r"U@rr__main__)mainz"idlelib.idle_test.test_hyperparserrZ) verbosity)__doc__keywordrstringidlelibrrw ascii_lettersdigits_ASCII_ID_CHARS_ASCII_ID_FIRST_CHARSr*chrr[r^rrsunittestr|)xs0rrs  F006==@3FG!&"6"6"<=;@*E*Qc!f/*E16c ; 1c!f%% ;Z@Z@z z -;I F