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

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

Issue 2872453004: cleanup TokenType var names (Closed)
Patch Set: Created 3 years, 7 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) 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/token.dart' show TokenType; 9 import '../../scanner/token.dart' show TokenType;
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 int get stringOffset { 192 int get stringOffset {
193 if (stringOffsetSlackOffset == byteOffset) { 193 if (stringOffsetSlackOffset == byteOffset) {
194 return byteOffset - utf8Slack - 1; 194 return byteOffset - utf8Slack - 1;
195 } else { 195 } else {
196 return byteOffset - utf8Slack; 196 return byteOffset - utf8Slack;
197 } 197 }
198 } 198 }
199 199
200 @override 200 @override
201 StringToken createSubstringToken(TokenType info, int start, bool asciiOnly, 201 StringToken createSubstringToken(TokenType type, int start, bool asciiOnly,
202 [int extraOffset = 0]) { 202 [int extraOffset = 0]) {
203 return new StringToken.fromUtf8Bytes( 203 return new StringToken.fromUtf8Bytes(
204 info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart); 204 type, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
205 } 205 }
206 206
207 @override 207 @override
208 CommentToken createCommentToken(TokenType info, int start, bool asciiOnly, 208 CommentToken createCommentToken(TokenType type, int start, bool asciiOnly,
209 [int extraOffset = 0]) { 209 [int extraOffset = 0]) {
210 return new CommentToken.fromUtf8Bytes( 210 return new CommentToken.fromUtf8Bytes(
211 info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart); 211 type, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
212 } 212 }
213 213
214 @override 214 @override
215 DartDocToken createDartDocToken(TokenType info, int start, bool asciiOnly, 215 DartDocToken createDartDocToken(TokenType type, int start, bool asciiOnly,
216 [int extraOffset = 0]) { 216 [int extraOffset = 0]) {
217 return new DartDocToken.fromUtf8Bytes( 217 return new DartDocToken.fromUtf8Bytes(
218 info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart); 218 type, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart);
219 } 219 }
220 220
221 bool atEndOfFile() => byteOffset >= bytes.length - 1; 221 bool atEndOfFile() => byteOffset >= bytes.length - 1;
222 } 222 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | pkg/front_end/lib/src/scanner/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698