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

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

Issue 2795243002: fix fasta/analyzer KeywordToken.value() (Closed)
Patch Set: remove unused import Created 3 years, 8 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 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 8
9 import 'keyword.dart' show Keyword; 9 import 'keyword.dart' show Keyword;
10 10
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 bool get isBuiltInIdentifier => keyword.isBuiltIn; 353 bool get isBuiltInIdentifier => keyword.isBuiltIn;
354 354
355 String toString() => "KeywordToken($lexeme)"; 355 String toString() => "KeywordToken($lexeme)";
356 356
357 @override 357 @override
358 Token copyWithoutComments() => new KeywordToken(keyword, charOffset); 358 Token copyWithoutComments() => new KeywordToken(keyword, charOffset);
359 359
360 @override 360 @override
361 // Analyzer considers pseudo-keywords to have a different value 361 // Analyzer considers pseudo-keywords to have a different value
362 Keyword value() => isPseudo ? lexeme : keyword; 362 Object value() => isPseudo ? lexeme : keyword;
363 363
364 @override 364 @override
365 // Analyzer considers pseudo-keywords to be identifiers 365 // Analyzer considers pseudo-keywords to be identifiers
366 analyzer.TokenType get type => isPseudo ? IDENTIFIER_INFO : KEYWORD_INFO; 366 analyzer.TokenType get type => isPseudo ? IDENTIFIER_INFO : KEYWORD_INFO;
367 } 367 }
368 368
369 /** 369 /**
370 * A synthetic keyword token. 370 * A synthetic keyword token.
371 */ 371 */
372 class SyntheticKeywordToken extends KeywordToken 372 class SyntheticKeywordToken extends KeywordToken
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 identical(value, "<=") || 693 identical(value, "<=") ||
694 identical(value, "<") || 694 identical(value, "<") ||
695 identical(value, "&") || 695 identical(value, "&") ||
696 identical(value, "^") || 696 identical(value, "^") ||
697 identical(value, "|"); 697 identical(value, "|");
698 } 698 }
699 699
700 bool isTernaryOperator(String value) => identical(value, "[]="); 700 bool isTernaryOperator(String value) => identical(value, "[]=");
701 701
702 bool isMinusOperator(String value) => identical(value, "-"); 702 bool isMinusOperator(String value) => identical(value, "-");
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/scanner/scanner.dart ('k') | pkg/front_end/lib/src/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698