/opt/imh/python3.13/lib/python3.13/idlelib/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/idlelib/__pycache__/parenmatch.cpython-313.pyc (9572B)
e$ S r SSKJr SSKJr SSSS.rSr " S S
5 r\R 5 \ S:X a SSK
Jr \" 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([{)]}d c \ rS rSrSrSrSrS r\S 5 r S r
S rS rS
r
S rSS
jrS rS rS rS r\\\\S.rS rS rSrg)
ParenMatch
a Highlight 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
zzc Xl UR U l UR R U R U R 5 SU l SU l g )Nr )editwintextbindRESTORE_VIRTUAL_EVENT_NAME
restore_eventcounteris_restore_active)selfr s 8/opt/imh/python3.13/lib/python3.13/idlelib/parenmatch.py__init__ParenMatch.__init__( sF LL $99,, .!" c [ R " SSSSS9U l [ R " SSSSSS 9U l [ R " SSS
SSS 9U l [ R
" [ R " 5 S
5 U l g )N
extensionsr styleopener)defaultzflash-delayinti )typer! bellbool hilite)r GetOptionSTYLEFLASH_DELAYBELLGetHighlightCurrentTheme
HILITE_CONFIG)clss r reloadParenMatch.reload3 s{ &&gxA ",,\-eCQ%%\&vqJ$11(2G2G2I2:<r c U R ( dA U R H) nU R R U R U5 M+ SU l gg)z5Activate mechanism to restore text from highlighting.TN)r RESTORE_SEQUENCESr event_addr r seqs r activate_restoreParenMatch.activate_restore> sB %%-- ##D$C$CSI .%)D" &r c U R ( aA U R H) nU R R U R U5 M+ SU l gg)zRemove restore event bindings.FN)r r3 r event_deleter r5 s r deactivate_restoreParenMatch.deactivate_restoreE sB !!-- &&t'F'FL .%*D" "r c n [ U R S5 R 5 nU R U5 g)zAHandle editor 'show surrounding parens' event (menu or shortcut).insertbreak)r r get_surrounding_bracketsfinish_paren_event)r eventindicess r flash_paren_eventParenMatch.flash_paren_eventL s/ t||X6,,. (r c U R R S5 nU[ ; a g[ U R S5 nUR 5 ( d gUR
[ U S5 nU R U5 g)zHandle user input of closer.z insert-1cNT)r get_openersr r
is_in_coder@ rA )r rB closerhprC s r paren_closed_eventParenMatch.paren_closed_eventS sg {+!
{
3}}--hv.>E(r c J Uc, U R ( a U R R 5 g U R 5 U R R U R U R 5 " X5 U R ( a U R OU R " 5 g N)r+ r r$ r7 tagfuncsrG r) create_tag_expressionr* set_timeout_lastset_timeout_noner rC s r rA ParenMatch.finish_paren_event` sq ?tyyIINN
$**d&@&@A$P"&"2"2 11
2 5r Nc U R R S5 U R 5 U =R S-
sl g)zRemove effect of doing match.parenr&