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

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

Issue 2915593004: update fasta StringToken.toString to make formatter happy (Closed)
Patch Set: rebase Created 3 years, 6 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 | 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) 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 fasta.scanner.token; 5 library fasta.scanner.token;
6 6
7 import '../../scanner/token.dart' as analyzer; 7 import '../../scanner/token.dart' as analyzer;
8 import '../../scanner/token.dart' show Token, TokenType; 8 import '../../scanner/token.dart' show Token, TokenType;
9 9
10 import 'token_constants.dart' show IDENTIFIER_TOKEN; 10 import 'token_constants.dart' show IDENTIFIER_TOKEN;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 decodeUtf8(data, start, end, valueOrLazySubstring.boolValue); 95 decodeUtf8(data, start, end, valueOrLazySubstring.boolValue);
96 } 96 }
97 return valueOrLazySubstring; 97 return valueOrLazySubstring;
98 } 98 }
99 } 99 }
100 100
101 @override 101 @override
102 bool get isIdentifier => identical(kind, IDENTIFIER_TOKEN); 102 bool get isIdentifier => identical(kind, IDENTIFIER_TOKEN);
103 103
104 @override 104 @override
105 String toString() => "StringToken($lexeme)"; 105 String toString() => lexeme;
106 106
107 static final StringCanonicalizer canonicalizer = new StringCanonicalizer(); 107 static final StringCanonicalizer canonicalizer = new StringCanonicalizer();
108 108
109 static String canonicalizedString( 109 static String canonicalizedString(
110 String s, int start, int end, bool canonicalize) { 110 String s, int start, int end, bool canonicalize) {
111 if (!canonicalize) return s; 111 if (!canonicalize) return s;
112 return canonicalizer.canonicalize(s, start, end, false); 112 return canonicalizer.canonicalize(s, start, end, false);
113 } 113 }
114 114
115 static String decodeUtf8(List<int> data, int start, int end, bool asciiOnly) { 115 static String decodeUtf8(List<int> data, int start, int end, bool asciiOnly) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 identical(value, "<=") || 312 identical(value, "<=") ||
313 identical(value, "<") || 313 identical(value, "<") ||
314 identical(value, "&") || 314 identical(value, "&") ||
315 identical(value, "^") || 315 identical(value, "^") ||
316 identical(value, "|"); 316 identical(value, "|");
317 } 317 }
318 318
319 bool isTernaryOperator(String value) => identical(value, "[]="); 319 bool isTernaryOperator(String value) => identical(value, "[]=");
320 320
321 bool isMinusOperator(String value) => identical(value, "-"); 321 bool isMinusOperator(String value) => identical(value, "-");
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698