Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Issue 1061883002: Fix tests broken by r44880. (Closed)

Created:
5 years, 8 months ago by Paul Berry
Modified:
5 years, 8 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -12 lines) Patch
M pkg/analyzer/lib/src/generated/ast.dart View 1 chunk +6 lines, -4 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 1 chunk +64 lines, -0 lines 0 comments Download
M tests/co19/co19-analyzer2.status View 1 chunk +0 lines, -5 lines 0 comments Download
M tests/language/language_analyzer2.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Paul Berry
5 years, 8 months ago (2015-04-06 16:20:08 UTC) #2
Brian Wilkerson
LGTM
5 years, 8 months ago (2015-04-06 16:21:56 UTC) #3
Paul Berry
5 years, 8 months ago (2015-04-06 16:23:03 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 44914 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698