[issue21694] IDLE - Test ParenMatch

Tal Einat report at bugs.python.org
Sat Jun 14 09:59:05 CEST 2014


Tal Einat added the comment:

ParenMatch is indeed failing when the cursor is after the first parenthesis of the following code:

(3 +
 4 - 1)

This happens both in Shell and Editor windows.

I've traced the problem down to HyperParser. It doesn't properly support multi-line statements, as can be seen by the following line in HyperParser.__init__():

stopatindex = "%d.end" % lno

(this appears twice, once in each branch of the same if statement)

Fixing this requires looking forward a few lines to find the end of the statement. I'm continuing to look through the code to try to find an efficient way to do this (without parsing the entire file).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21694>
_______________________________________


More information about the Python-bugs-list mailing list