Skip to content

Commit c9cb779

Browse files
gmpassosCommit Queue
authored and
Commit Queue
committed
KeywordToken: Change keyword field to a getter over type
Closes #56435 GitOrigin-RevId: 9d6ae60 Change-Id: Icaf54681fbc504fa73adee04e0206af423df1fe7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379980 Reviewed-by: Johnni Winther <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent a97ef31 commit c9cb779

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/_fe_analyzer_shared/lib/src/scanner/token.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,14 +476,13 @@ class Keyword extends TokenType {
476476
*/
477477
class KeywordToken extends SimpleToken {
478478
@override
479-
final Keyword keyword;
479+
Keyword get keyword => type as Keyword;
480480

481481
/**
482482
* Initialize a newly created token to represent the given [keyword] at the
483483
* given [offset].
484484
*/
485-
KeywordToken(this.keyword, int offset, [CommentToken? precedingComment])
486-
: super(keyword, offset, precedingComment);
485+
KeywordToken(super.keyword, super.offset, [super.precedingComment]);
487486

488487
@override
489488
bool get isIdentifier => keyword.isPseudo || keyword.isBuiltIn;

0 commit comments

Comments
 (0)