`KeywordToken`: Change `keyword` field to a getter over `type` Closes https://github.com/dart-lang/sdk/pull/56435 GitOrigin-RevId: 9d6ae60cf9883402f0874e9b18a89f6fc53daea0 Change-Id: Icaf54681fbc504fa73adee04e0206af423df1fe7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379980 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart b/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart index 0eefce5..375c1f5 100644 --- a/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart +++ b/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart
@@ -476,14 +476,13 @@ */ class KeywordToken extends SimpleToken { @override - final Keyword keyword; + Keyword get keyword => type as Keyword; /** * Initialize a newly created token to represent the given [keyword] at the * given [offset]. */ - KeywordToken(this.keyword, int offset, [CommentToken? precedingComment]) - : super(keyword, offset, precedingComment); + KeywordToken(super.keyword, super.offset, [super.precedingComment]); @override bool get isIdentifier => keyword.isPseudo || keyword.isBuiltIn;