From ca6e3499b8d44e123a3740db3f7f597df7fc20ca Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Wed, 1 Mar 2023 19:24:37 +0000 Subject: [PATCH] [analyzer] Expose inlineKeyword through ClassDeclaration This is needed to implement dartfmt support for inline classes, which is needed to unblock enabling them internally for experimentation. Bug: b/271244238 Change-Id: Ic9928aefbd5373f5bb0a0ae7998da54fc1f68b7c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286180 Reviewed-by: Konstantin Shcheglov Commit-Queue: Slava Egorov --- pkg/analyzer/lib/dart/ast/ast.dart | 4 ++++ pkg/analyzer/lib/src/dart/ast/ast.dart | 1 + 2 files changed, 5 insertions(+) diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart index b49b3806d91..cf2b21733dd 100644 --- a/pkg/analyzer/lib/dart/ast/ast.dart +++ b/pkg/analyzer/lib/dart/ast/ast.dart @@ -1011,6 +1011,10 @@ abstract class ClassDeclaration implements ClassOrAugmentationDeclaration { @override ImplementsClause? get implementsClause; + /// Return the 'inline' keyword, or `null` if the keyword was absent. + @experimental + Token? get inlineKeyword; + /// Returns the left curly bracket. @override Token get leftBracket; diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart index 091236bbeef..a29013aaad9 100644 --- a/pkg/analyzer/lib/src/dart/ast/ast.dart +++ b/pkg/analyzer/lib/src/dart/ast/ast.dart @@ -1848,6 +1848,7 @@ class ClassDeclarationImpl extends NamedCompilationUnitMemberImpl final Token? macroKeyword; /// The 'inline' keyword, or `null` if the keyword was absent. + @override final Token? inlineKeyword; /// The 'sealed' keyword, or `null` if the keyword was absent.