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

Unified Diff: pkg/analyzer/lib/src/generated/ast.dart

Issue 1061883002: Fix tests broken by r44880. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/ast.dart
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 40fd83a45bf4f7ba69491c9f19b7266d3fa30e91..4bb900db81b67f88cc4cc015bf00405a512cfe03 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -16730,11 +16730,13 @@ class StringLexemeHelper {
}
end = lexeme.length;
if (isLast) {
- if (StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) ||
- StringUtilities.endsWith3(lexeme, 0x27, 0x27, 0x27)) {
+ if (start + 3 <= end &&
+ (StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) ||
+ StringUtilities.endsWith3(lexeme, 0x27, 0x27, 0x27))) {
end -= 3;
- } else if (StringUtilities.endsWithChar(lexeme, 0x22) ||
- StringUtilities.endsWithChar(lexeme, 0x27)) {
+ } else if (start + 1 <= end &&
+ (StringUtilities.endsWithChar(lexeme, 0x22) ||
+ StringUtilities.endsWithChar(lexeme, 0x27))) {
end -= 1;
}
}
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698