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

Side by Side Diff: pkg/front_end/lib/src/fasta/scanner/utf8_bytes_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 | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 fasta.scanner.utf8_bytes_scanner; 5 library fasta.scanner.utf8_bytes_scanner;
6 6
7 import 'dart:convert' show UNICODE_BOM_CHARACTER_RUNE, UTF8; 7 import 'dart:convert' show UNICODE_BOM_CHARACTER_RUNE, UTF8;
8 8
9 import '../scanner.dart' show unicodeReplacementCharacter; 9 import '../scanner.dart' show unicodeReplacementCharacter;
10 10
11 import 'precedence.dart' show PrecedenceInfo; 11 import 'precedence.dart' show PrecedenceInfo;
12 12
13 import 'token.dart' show StringToken, Token; 13 import 'token.dart' show StringToken;
14 14
15 import 'array_based_scanner.dart' show ArrayBasedScanner; 15 import 'array_based_scanner.dart' show ArrayBasedScanner;
16 16
17 /** 17 /**
18 * Scanner that reads from a UTF-8 encoded list of bytes and creates tokens 18 * Scanner that reads from a UTF-8 encoded list of bytes and creates tokens
19 * that points to substrings. 19 * that points to substrings.
20 */ 20 */
21 class Utf8BytesScanner extends ArrayBasedScanner { 21 class Utf8BytesScanner extends ArrayBasedScanner {
22 /** 22 /**
23 * The file content. 23 * The file content.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 @override 198 @override
199 StringToken createSubstringToken( 199 StringToken createSubstringToken(
200 PrecedenceInfo info, int start, bool asciiOnly, 200 PrecedenceInfo info, int start, bool asciiOnly,
201 [int extraOffset = 0]) { 201 [int extraOffset = 0]) {
202 return new StringToken.fromUtf8Bytes( 202 return new StringToken.fromUtf8Bytes(
203 info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart); 203 info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
204 } 204 }
205 205
206 bool atEndOfFile() => byteOffset >= bytes.length - 1; 206 bool atEndOfFile() => byteOffset >= bytes.length - 1;
207 } 207 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698