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

Side by Side 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, 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.ast; 8 library engine.ast;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 16685 matching lines...) Expand 10 before | Expand all | Expand 10 after
16696 final bool isFirst; 16696 final bool isFirst;
16697 final bool isLast; 16697 final bool isLast;
16698 16698
16699 bool isRaw = false; 16699 bool isRaw = false;
16700 bool isSingleQuoted = false; 16700 bool isSingleQuoted = false;
16701 bool isMultiline = false; 16701 bool isMultiline = false;
16702 int start = 0; 16702 int start = 0;
16703 int end; 16703 int end;
16704 16704
16705 StringLexemeHelper(this.lexeme, this.isFirst, this.isLast) { 16705 StringLexemeHelper(this.lexeme, this.isFirst, this.isLast) {
16706 isRaw = StringUtilities.startsWithChar(lexeme, 0x72); 16706 if (isFirst) {
16707 if (isRaw) { 16707 isRaw = StringUtilities.startsWithChar(lexeme, 0x72);
16708 start++; 16708 if (isRaw) {
16709 } 16709 start++;
16710 if (StringUtilities.startsWith3(lexeme, start, 0x27, 0x27, 0x27)) { 16710 }
16711 isSingleQuoted = true; 16711 if (StringUtilities.startsWith3(lexeme, start, 0x27, 0x27, 0x27)) {
16712 isMultiline = true; 16712 isSingleQuoted = true;
16713 start += 3; 16713 isMultiline = true;
16714 start = _trimInitialWhitespace(start); 16714 start += 3;
16715 } else if (StringUtilities.startsWith3(lexeme, start, 0x22, 0x22, 0x22)) { 16715 start = _trimInitialWhitespace(start);
16716 isSingleQuoted = false; 16716 } else if (StringUtilities.startsWith3(lexeme, start, 0x22, 0x22, 0x22)) {
16717 isMultiline = true; 16717 isSingleQuoted = false;
16718 start += 3; 16718 isMultiline = true;
16719 start = _trimInitialWhitespace(start); 16719 start += 3;
16720 } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x27) { 16720 start = _trimInitialWhitespace(start);
16721 isSingleQuoted = true; 16721 } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x27) {
16722 isMultiline = false; 16722 isSingleQuoted = true;
16723 start++; 16723 isMultiline = false;
16724 } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x22) { 16724 start++;
16725 isSingleQuoted = false; 16725 } else if (start < lexeme.length && lexeme.codeUnitAt(start) == 0x22) {
16726 isMultiline = false; 16726 isSingleQuoted = false;
16727 start++; 16727 isMultiline = false;
16728 start++;
16729 }
16728 } 16730 }
16729 end = lexeme.length; 16731 end = lexeme.length;
16730 if (isLast) { 16732 if (isLast) {
16731 if (StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) || 16733 if (StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) ||
16732 StringUtilities.endsWith3(lexeme, 0x27, 0x27, 0x27)) { 16734 StringUtilities.endsWith3(lexeme, 0x27, 0x27, 0x27)) {
16733 end -= 3; 16735 end -= 3;
16734 } else if (StringUtilities.endsWithChar(lexeme, 0x22) || 16736 } else if (StringUtilities.endsWithChar(lexeme, 0x22) ||
16735 StringUtilities.endsWithChar(lexeme, 0x27)) { 16737 StringUtilities.endsWithChar(lexeme, 0x27)) {
16736 end -= 1; 16738 end -= 1;
16737 } 16739 }
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after
20145 } 20147 }
20146 20148
20147 @override 20149 @override
20148 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); 20150 accept(AstVisitor visitor) => visitor.visitYieldStatement(this);
20149 20151
20150 @override 20152 @override
20151 void visitChildren(AstVisitor visitor) { 20153 void visitChildren(AstVisitor visitor) {
20152 _safelyVisitChild(_expression, visitor); 20154 _safelyVisitChild(_expression, visitor);
20153 } 20155 }
20154 } 20156 }
OLDNEW
« 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