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

Side by Side Diff: pkg/compiler/lib/src/scanner/string_scanner.dart

Issue 2221893003: pkg/compiler: fix imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 library dart2js.scanner.string; 5 library dart2js.scanner.string;
6 6
7 import '../io/source_file.dart' show SourceFile; 7 import '../io/source_file.dart' show SourceFile;
8 import '../tokens/precedence.dart' show PrecedenceInfo; 8 import '../tokens/precedence.dart' show PrecedenceInfo;
9 import '../tokens/token.dart' show StringToken, Token; 9 import '../tokens/token.dart' show StringToken, Token;
10
11 import 'array_based_scanner.dart' show ArrayBasedScanner; 10 import 'array_based_scanner.dart' show ArrayBasedScanner;
12 11
13 /** 12 /**
14 * Scanner that reads from a String and creates tokens that points to 13 * Scanner that reads from a String and creates tokens that points to
15 * substrings. 14 * substrings.
16 */ 15 */
17 class StringScanner extends ArrayBasedScanner { 16 class StringScanner extends ArrayBasedScanner {
18 /** The file content. */ 17 /** The file content. */
19 String string; 18 String string;
20 19
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly, 53 void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly,
55 [int extraOffset = 0]) { 54 [int extraOffset = 0]) {
56 tail.next = new StringToken.fromSubstring( 55 tail.next = new StringToken.fromSubstring(
57 info, string, start, scanOffset + extraOffset, tokenStart, 56 info, string, start, scanOffset + extraOffset, tokenStart,
58 canonicalize: true); 57 canonicalize: true);
59 tail = tail.next; 58 tail = tail.next;
60 } 59 }
61 60
62 bool atEndOfFile() => scanOffset >= string.length - 1; 61 bool atEndOfFile() => scanOffset >= string.length - 1;
63 } 62 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/scanner/scanner_task.dart ('k') | pkg/compiler/lib/src/scanner/utf8_bytes_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698