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

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

Issue 1056103002: Fix interpretation of string contents after interpolation expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/lib/src/generated/parser.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 bbc8076d2c86b4738c13e4b677fdcf7b0dab55c7..c2e2ab20da9135312af011fa4a2a33643f97a5bf 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -16703,28 +16703,30 @@ class StringLexemeHelper {
int end;
StringLexemeHelper(this.lexeme, this.isFirst, this.isLast) {
- isRaw = StringUtilities.startsWithChar(lexeme, 0x72);
- if (isRaw) {
- start++;
- }
- if (StringUtilities.startsWith3(lexeme, start, 0x27, 0x27, 0x27)) {
- isSingleQuoted = true;
- isMultiline = true;
- start += 3;
- start = _trimInitialWhitespace(start);
- } else if (StringUtilities.startsWith3(lexeme, start, 0x22, 0x22, 0x22)) {
- isSingleQuoted = false;
- isMultiline = true;
- start += 3;
- start = _trimInitialWhitespace(start);
- } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x27) {
- isSingleQuoted = true;
- isMultiline = false;
- start++;
- } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x22) {
- isSingleQuoted = false;
- isMultiline = false;
- start++;
+ if (isFirst) {
+ isRaw = StringUtilities.startsWithChar(lexeme, 0x72);
+ if (isRaw) {
+ start++;
+ }
+ if (StringUtilities.startsWith3(lexeme, start, 0x27, 0x27, 0x27)) {
+ isSingleQuoted = true;
+ isMultiline = true;
+ start += 3;
+ start = _trimInitialWhitespace(start);
+ } else if (StringUtilities.startsWith3(lexeme, start, 0x22, 0x22, 0x22)) {
+ isSingleQuoted = false;
+ isMultiline = true;
+ start += 3;
+ start = _trimInitialWhitespace(start);
+ } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x27) {
+ isSingleQuoted = true;
+ isMultiline = false;
+ start++;
+ } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x22) {
+ isSingleQuoted = false;
+ isMultiline = false;
+ start++;
+ }
}
end = lexeme.length;
if (isLast) {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698