Chromium Code Reviews
DescriptionFix incremental scanner's computation of scanEnd.
Previously, if the last token to be replaced (oldLast) was followed by
a lot of whitespace, we ended the scan at the end of oldLast (adjusted
by delta), which meant that we missed tokens inserted into the
whitespace region. The correct place to end the scan is at the start
of the first token to be kept (oldRightToken), since that ensures that
we include the whitespace region.
Also, change the expression for scanStart to use oldLeftToken rather
than oldFirst (the two are equivalent) in order to highlight the
symmetry between the expressions for scanStart and scanEnd.
This bug was discovered by the incremental parse stress tester.
R=brianwilkerson@google.com
Committed: https://code.google.com/p/dart/source/detail?r=42002
Patch Set 1 #
Messages
Total messages: 4 (1 generated)
|
|||||||||||||||||||||||||||||||||||||