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

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

Issue 2754793002: Fix a few hints. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner/token.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) 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_scanner; 5 library dart2js.scanner.string_scanner;
6 6
7 import 'array_based_scanner.dart' show ArrayBasedScanner; 7 import 'array_based_scanner.dart' show ArrayBasedScanner;
8 8
9 import 'precedence.dart' show PrecedenceInfo; 9 import 'precedence.dart' show PrecedenceInfo;
10 10
11 import 'token.dart' show StringToken, Token; 11 import 'token.dart' show StringToken;
12 12
13 /** 13 /**
14 * Scanner that reads from a String and creates tokens that points to 14 * Scanner that reads from a String and creates tokens that points to
15 * substrings. 15 * substrings.
16 */ 16 */
17 class StringScanner extends ArrayBasedScanner { 17 class StringScanner extends ArrayBasedScanner {
18 /** The file content. */ 18 /** The file content. */
19 String string; 19 String string;
20 20
21 /** The current offset in [string]. */ 21 /** The current offset in [string]. */
(...skipping 23 matching lines...) Expand all
45 StringToken createSubstringToken( 45 StringToken createSubstringToken(
46 PrecedenceInfo info, int start, bool asciiOnly, 46 PrecedenceInfo info, int start, bool asciiOnly,
47 [int extraOffset = 0]) { 47 [int extraOffset = 0]) {
48 return new StringToken.fromSubstring( 48 return new StringToken.fromSubstring(
49 info, string, start, scanOffset + extraOffset, tokenStart, 49 info, string, start, scanOffset + extraOffset, tokenStart,
50 canonicalize: true); 50 canonicalize: true);
51 } 51 }
52 52
53 bool atEndOfFile() => scanOffset >= string.length - 1; 53 bool atEndOfFile() => scanOffset >= string.length - 1;
54 } 54 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698