e$SrSSKJr SSKJr SSSS.rSr"S S 5r\R5 \ S :XaSS K J r \ "S SS9 gg)zParenMatch -- for parenthesis matching. When you hit a right paren, the cursor should move briefly to the left paren. Paren here is used generically; the matching applies to parentheses, square brackets, and curly braces. ) HyperParser)idleConf([{)]}dc\rSrSrSrSrSrSr\S5r Sr Sr S r S r S rSS jrSrSrSrSr\\\\S.rSrSrSrg ) ParenMatch aHighlight matching openers and closers, (), [], and {}. There are three supported styles of paren matching. When a right paren (opener) is typed: opener -- highlight the matching left paren (closer); parens -- highlight the left and right parens (opener and closer); expression -- highlight the entire expression from opener to closer. (For back compatibility, 'default' is a synonym for 'opener'). Flash-delay is the maximum milliseconds the highlighting remains. Any cursor movement (key press or click) before that removes the highlight. If flash-delay is 0, there is no maximum. TODO: - Augment bell() with mismatch warning in status window. - Highlight when cursor is moved to the right of a closer. This might be too expensive to check. z<>)z z z zcXlURUlURRURUR5 SUlSUlg)Nr)editwintextbindRESTORE_VIRTUAL_EVENT_NAME restore_eventcounteris_restore_active)selfrs 8/opt/imh/python3.13/lib/python3.13/idlelib/parenmatch.py__init__ParenMatch.__init__(sF LL   $99,, . !"c[R"SSSSS9Ul[R"SSSSSS 9Ul[R"SSS S S S 9Ul[R "[R "5S 5Ulg)N extensionsrstyleopener)defaultz flash-delayinti)typer!bellboolhilite)r GetOptionSTYLE FLASH_DELAYBELL GetHighlight CurrentTheme HILITE_CONFIG)clss rreloadParenMatch.reload3s{&& gxA ",,\-eCQ%%\&vqJ$11(2G2G2I2:<rcUR(dAURH)nURRURU5 M+ SUlgg)z5Activate mechanism to restore text from highlighting.TN)rRESTORE_SEQUENCESr event_addrrseqs ractivate_restoreParenMatch.activate_restore>sB%%-- ##D$C$CSI.%)D "&rcUR(aAURH)nURRURU5 M+ SUlgg)zRemove restore event bindings.FN)rr3r event_deleterr5s rdeactivate_restoreParenMatch.deactivate_restoreEsB  ! !-- &&t'F'FL.%*D " "rcn[URS5R5nURU5 g)zAHandle editor 'show surrounding parens' event (menu or shortcut).insertbreak)rrget_surrounding_bracketsfinish_paren_event)reventindicess rflash_paren_eventParenMatch.flash_paren_eventLs/t||X6,,.  (rcURRS5nU[;ag[URS5nUR 5(dgUR [US5nURU5 g)zHandle user input of closer.z insert-1cNT)rget_openersrr is_in_coder@rA)rrBcloserhprCs rparen_closed_eventParenMatch.paren_closed_eventSsg{+  !  { 3}} --hv.>E (rcJUc,UR(aURR5 gUR5 URR UR UR5"X5 UR(a URO UR"5 gN) r+rr$r7tagfuncsrGr)create_tag_expressionr*set_timeout_lastset_timeout_nonerrCs rrAParenMatch.finish_paren_event`sq ?tyy IINN    $**d&@&@A$P"&"2"2   11 2 5rNcURRS5 UR5 U=RS- slg)zRemove effect of doing match.parenr&N)r tag_deleter;r)rrBs rrParenMatch.restore_eventks. W% !  rcDXR:XaUR5 ggrO)rr)r timer_counts rhandle_restore_timerParenMatch.handle_restore_timerqs ,, &     'rcURRSUS5 URRSUR5 g)z'Highlight the single paren that matchesrWrN)rtag_add tag_configr.rTs rcreate_tag_openerParenMatch.create_tag_openerxs4 '71:. Wd&8&89rcURRUS5S;a USS-nOUSnURRSUSUSS-US-U5 URRSUR5 g)z#Highlight the left and right parensr&r+1crWrz-1cNrrGr_r`r.rrC rightindexs rcreate_tag_parensParenMatch.create_tag_parens}sy 99== $ 7 E)J J '71:wqz%/?EAQS]^ Wd&8&89rcURRUS5S;a USS-nOUSnURRSUSU5 URRSUR5 g)zHighlight the entire expressionr&rrdrWrNrerfs rrQ ParenMatch.create_tag_expressionsf 99== $ 7 E)J J '71:z: Wd&8&89r)r r!parens expressioncU=RS- slXRURRS54SjnURRR [ X5 g)zKHighlight will remain until user input turns it off or the insert has movedr&r>cX1RRS5:waURU5 gURRR [ X5 g)Nr>)rindexr\r text_frameafter CHECK_DELAY)callmercrps rrt+ParenMatch.set_timeout_none..callmes= 11))!, ''--k6JrN)rrrprrqrrrs)rrts rrSParenMatch.set_timeout_nonesK  $ 2 K %%k6BrcU=RS- slURRRURXR4Sj5 g)zFThe last highlight created will be removed after FLASH_DELAY millisecsr&c$URU5$rO)r\)rrus r-ParenMatch.set_timeout_last..sd.G.G.JrN)rrrqrrr*)rs rrRParenMatch.set_timeout_lasts>   %%    J Lr)rrrrrO)__name__ __module__ __qualname____firstlineno____doc__rr3r classmethodr0r7r;rDrLrArr\rarhrQrPrSrR__static_attributes__rrrr s("@< #<<*+  5 !: ::$$#+  H CLrr__main__)mainz!idlelib.idle_test.test_parenmatch) verbosityN) ridlelib.hyperparserridlelib.configrrHrsrr0r}unittestrrrrrs] ,# $ bLbLJ  z ,:r