Chromium Code Reviews
DescriptionFix tests broken by r44880.
Revision 44880 added an assertion to accompany the internal error
message emitted if Parser._computeStringValue computes nonsensical
string start and end positions, so that those internal errors would be
noticed by the buildbots. It fixed most of the circumstances in which
the internal error might occur, but it missed a few: if the analyzer
encounters an unterminated string at the end of a line, or an
unterminated multiline string at the end of a file, or a string ending
with an invalid interpolation expression (e.g. "${var x}" or
"$class"), then a token might be generated which the parser thinks is
a complete string, but which consists solely of 1, 3, 4, or 5
consecutive quotes (and thus is an unterminated string), causing
Parser._computeStringValue to get confused and fire the assertion.
This CL addresses those problems by modifying
Parser._computeStringValue to handle those ill-formed tokens.
In a future CL I plan to modify the parser so that invalid
interpolation expressions like "${var x}" and "$class" are recovered
from more gracefully. But that is a low priority fix, since this CL
is sufficent to prevent the assertion from firing.
BUG=dartbug.com/23100
R=brianwilkerson@google.com
Committed: https://code.google.com/p/dart/source/detail?r=44914
Patch Set 1 #
Messages
Total messages: 4 (1 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||