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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/scanner/scanner.dart

Issue 97043002: Fix bad reference in string interpolation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | dart/tests/co19/co19-dart2dart.status » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of scanner; 5 part of scanner;
6 6
7 abstract class Scanner { 7 abstract class Scanner {
8 Token tokenize(); 8 Token tokenize();
9 9
10 factory Scanner(SourceFile file, {bool includeComments: false}) { 10 factory Scanner(SourceFile file, {bool includeComments: false}) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 Token tokenize() { 194 Token tokenize() {
195 while (!atEndOfFile()) { 195 while (!atEndOfFile()) {
196 int next = advance(); 196 int next = advance();
197 while (!identical(next, $EOF)) { 197 while (!identical(next, $EOF)) {
198 next = bigSwitch(next); 198 next = bigSwitch(next);
199 } 199 }
200 if (atEndOfFile()) { 200 if (atEndOfFile()) {
201 appendEofToken(); 201 appendEofToken();
202 } else { 202 } else {
203 error('Unexpected $EOF byte in input.'); 203 error('Unexpected ${$EOF} byte in input.');
204 } 204 }
205 } 205 }
206 206
207 if (file != null) { 207 if (file != null) {
208 file.length = stringOffset; 208 file.length = stringOffset;
209 // One additional line start at the end, see [SourceFile.lineStarts]. 209 // One additional line start at the end, see [SourceFile.lineStarts].
210 lineStarts.add(stringOffset + 1); 210 lineStarts.add(stringOffset + 1);
211 file.lineStarts = lineStarts; 211 file.lineStarts = lineStarts;
212 } 212 }
213 213
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 // ignore the [close] token (assuming it's correct), then the error will be 1081 // ignore the [close] token (assuming it's correct), then the error will be
1082 // reported when parsing the [next] token. 1082 // reported when parsing the [next] token.
1083 1083
1084 Token next = new StringToken.fromString( 1084 Token next = new StringToken.fromString(
1085 BAD_INPUT_INFO, error, begin.charOffset, canonicalize: true); 1085 BAD_INPUT_INFO, error, begin.charOffset, canonicalize: true);
1086 begin.endGroup = close; 1086 begin.endGroup = close;
1087 close.next = next; 1087 close.next = next;
1088 next.next = begin.next; 1088 next.next = begin.next;
1089 } 1089 }
1090 } 1090 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698