Skip to content
Commit 458f6433 authored by Francis Herne's avatar Francis Herne
Browse files

Yet more range fixes.

RangeUpdateVisitor was only run after completion of RangeFixVisitor.

When RangeFixVisitor modified both a node and a non-parent ancestor of
 that node, the ranges of the intermediate nodes weren't updated and so
 the ancestor's fix didn't take the previous fix into account.
Move the functionality of RangeUpdateVisitor into RangeFixVisitor so
 changes are propagated in time.

There was a bug in the `findString` regex that prevented it working for
 empty strings. Switch to QRegularExpression (I should have used it
 originally) and use a better regex.

Correct the ranges of byte and (python36) f-string literals, in addition
 to normal strings.
The 'b'/'f' still isn't coloured, but afaik that's KSyntaxHighlighting.

Hack comprehensions, lists and tuples in a similar way to subscripts;
 far from reliable, but ok for single-line expressions following PEP-8.

CCBUG: 373850
parent ec1284ae
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment