@@ -2731,7 +2731,7 @@ class ChildEntity {
27312731/// | 'abstract'? ('base' | 'interface' | 'final')?
27322732/// | 'abstract'? 'base'? 'mixin'
27332733abstract final class ClassDeclaration
2734- implements NamedCompilationUnitMember, _FragmentDeclaration {
2734+ implements NamedCompilationUnitMember, FragmentDeclaration {
27352735 /// The `abstract` keyword, or `null` if the keyword was absent.
27362736 Token? get abstractKeyword;
27372737
@@ -2967,7 +2967,7 @@ sealed class ClassMemberImpl extends DeclarationImpl implements ClassMember {
29672967///
29682968/// mixinApplication ::=
29692969/// [NamedType] [WithClause] [ImplementsClause]? ';'
2970- abstract final class ClassTypeAlias implements TypeAlias, _FragmentDeclaration {
2970+ abstract final class ClassTypeAlias implements TypeAlias, FragmentDeclaration {
29712971 /// The token for the `abstract` keyword, or `null` if this isn't defining an
29722972 /// abstract class.
29732973 Token? get abstractKeyword;
@@ -4128,7 +4128,7 @@ final class ConstantPatternImpl extends DartPatternImpl
41284128/// initializerList ::=
41294129/// ':' [ConstructorInitializer] (',' [ConstructorInitializer])*
41304130abstract final class ConstructorDeclaration
4131- implements ClassMember, _FragmentDeclaration {
4131+ implements ClassMember, FragmentDeclaration {
41324132 /// The `augment` keyword, or `null` if the keyword was absent.
41334133 Token? get augmentKeyword;
41344134
@@ -5604,7 +5604,7 @@ final class EnumConstantArgumentsImpl extends AstNodeImpl
56045604}
56055605
56065606/// The declaration of an enum constant.
5607- abstract final class EnumConstantDeclaration implements _FragmentDeclaration {
5607+ abstract final class EnumConstantDeclaration implements FragmentDeclaration {
56085608 /// The explicit arguments (there are always implicit `index` and `name`
56095609 /// leading arguments) to the invoked constructor, or `null` if this constant
56105610 /// doesn't provide any explicit arguments.
@@ -5707,7 +5707,7 @@ final class EnumConstantDeclarationImpl extends DeclarationImpl
57075707/// [WithClause]? [ImplementsClause]? '{' [SimpleIdentifier]
57085708/// (',' [SimpleIdentifier])* (';' [ClassMember]+)? '}'
57095709abstract final class EnumDeclaration
5710- implements NamedCompilationUnitMember, _FragmentDeclaration {
5710+ implements NamedCompilationUnitMember, FragmentDeclaration {
57115711 /// The `augment` keyword, or `null` if the keyword was absent.
57125712 @experimental
57135713 Token? get augmentKeyword;
@@ -6427,7 +6427,7 @@ final class ExtendsClauseImpl extends AstNodeImpl implements ExtendsClause {
64276427/// 'on' [TypeAnnotation] [ShowClause]? [HideClause]?
64286428/// '{' [ClassMember]* '}'
64296429abstract final class ExtensionDeclaration
6430- implements CompilationUnitMember, _FragmentDeclaration {
6430+ implements CompilationUnitMember, FragmentDeclaration {
64316431 /// The `augment` keyword, or `null` if the keyword was absent.
64326432 @experimental
64336433 Token? get augmentKeyword;
@@ -6774,7 +6774,7 @@ final class ExtensionOverrideImpl extends ExpressionImpl
67746774/// '}'
67756775@experimental
67766776abstract final class ExtensionTypeDeclaration
6777- implements NamedCompilationUnitMember, _FragmentDeclaration {
6777+ implements NamedCompilationUnitMember, FragmentDeclaration {
67786778 /// The `augment` keyword, or `null` if the keyword was absent.
67796779 @experimental
67806780 Token? get augmentKeyword;
@@ -8157,6 +8157,16 @@ final class ForStatementImpl extends StatementImpl
81578157 }
81588158}
81598159
8160+ /// A declaration of a fragment of an element.
8161+ @experimental
8162+ abstract final class FragmentDeclaration implements Declaration {
8163+ /// The fragment declared by this declaration.
8164+ ///
8165+ /// Returns `null` if the AST structure hasn't been resolved.
8166+ @experimental
8167+ Fragment? get declaredFragment;
8168+ }
8169+
81608170/// A node representing the body of a function or method.
81618171///
81628172/// functionBody ::=
@@ -8274,7 +8284,7 @@ sealed class FunctionBodyImpl extends AstNodeImpl implements FunctionBody {
82748284// that are only sometimes applicable. Consider changing the class hierarchy so
82758285// that these two kinds of variables can be distinguished.
82768286abstract final class FunctionDeclaration
8277- implements NamedCompilationUnitMember, _FragmentDeclaration {
8287+ implements NamedCompilationUnitMember, FragmentDeclaration {
82788288 /// The `augment` keyword, or `null` if there is no `augment` keyword.
82798289 @experimental
82808290 Token? get augmentKeyword;
@@ -8821,7 +8831,7 @@ final class FunctionReferenceImpl extends CommentReferableExpressionImpl
88218831/// functionPrefix ::=
88228832/// [TypeAnnotation]? [SimpleIdentifier]
88238833abstract final class FunctionTypeAlias
8824- implements TypeAlias, _FragmentDeclaration {
8834+ implements TypeAlias, FragmentDeclaration {
88258835 @override
88268836 TypeAliasElement? get declaredElement;
88278837
@@ -9183,7 +9193,7 @@ final class GenericFunctionTypeImpl extends TypeAnnotationImpl
91839193/// 'typedef' [SimpleIdentifier] [TypeParameterList]? =
91849194/// [FunctionType] ';'
91859195abstract final class GenericTypeAlias
9186- implements TypeAlias, _FragmentDeclaration {
9196+ implements TypeAlias, FragmentDeclaration {
91879197 /// The equal sign separating the name being defined from the function type.
91889198 Token get equals;
91899199
@@ -11891,7 +11901,7 @@ final class MapPatternImpl extends DartPatternImpl implements MapPattern {
1189111901/// children of a class declaration. When the experiment is enabled, these nodes
1189211902/// can also be children of an extension declaration.
1189311903abstract final class MethodDeclaration
11894- implements ClassMember, _FragmentDeclaration {
11904+ implements ClassMember, FragmentDeclaration {
1189511905 /// The token for the `augment` keyword.
1189611906 Token? get augmentKeyword;
1189711907
@@ -12288,7 +12298,7 @@ abstract final class MethodReferenceExpression implements Expression {
1228812298/// 'base'? 'mixin' name [TypeParameterList]?
1228912299/// [OnClause]? [ImplementsClause]? '{' [ClassMember]* '}'
1229012300abstract final class MixinDeclaration
12291- implements NamedCompilationUnitMember, _FragmentDeclaration {
12301+ implements NamedCompilationUnitMember, FragmentDeclaration {
1229212302 /// The `augment` keyword, or `null` if the keyword was absent.
1229312303 Token? get augmentKeyword;
1229412304
@@ -18157,8 +18167,7 @@ final class TypeLiteralImpl extends CommentReferableExpressionImpl
1815718167///
1815818168/// typeParameter ::=
1815918169/// name ('extends' [TypeAnnotation])?
18160- abstract final class TypeParameter
18161- implements Declaration, _FragmentDeclaration {
18170+ abstract final class TypeParameter implements Declaration, FragmentDeclaration {
1816218171 /// The upper bound for legal arguments, or `null` if there's no explicit
1816318172 /// upper bound.
1816418173 TypeAnnotation? get bound;
@@ -18409,7 +18418,7 @@ class UriValidationCode {
1840918418// that are only sometimes applicable. Consider changing the class hierarchy so
1841018419// that these two kinds of variables can be distinguished.
1841118420abstract final class VariableDeclaration
18412- implements Declaration, _FragmentDeclaration {
18421+ implements Declaration, FragmentDeclaration {
1841318422 /// The element declared by this declaration.
1841418423 ///
1841518424 /// Returns `null` if the AST structure hasn't been resolved or if this node
@@ -19216,15 +19225,6 @@ base mixin _AnnotatedNodeMixin on AstNodeImpl implements AnnotatedNode {
1921619225 }
1921719226}
1921819227
19219- /// A declaration of a fragment of an element.
19220- abstract final class _FragmentDeclaration implements Declaration {
19221- /// The fragment declared by this declaration.
19222- ///
19223- /// Returns `null` if the AST structure hasn't been resolved.
19224- @experimental
19225- Fragment? get declaredFragment;
19226- }
19227-
1922819228/// An indication of the resolved kind of a [SetOrMapLiteral].
1922919229enum _SetOrMapKind {
1923019230 /// Indicates that the literal represents a map.
0 commit comments