@@ -3504,20 +3504,71 @@ abstract class MethodReferenceExpression implements Expression {
3504
3504
MethodElement ? get staticElement;
3505
3505
}
3506
3506
3507
+ /// The declaration of a mixin augmentation.
3508
+ ///
3509
+ /// mixinAugmentationDeclaration ::=
3510
+ /// 'augment' 'mixin' name [TypeParameterList]?
3511
+ /// [OnClause]? [ImplementsClause]? '{' [ClassMember]* '}'
3512
+ ///
3513
+ /// Clients may not extend, implement or mix-in this class.
3514
+ @experimental
3515
+ abstract class MixinAugmentationDeclaration
3516
+ implements MixinOrAugmentationDeclaration {
3517
+ /// The token representing the 'augment' keyword.
3518
+ Token get augmentKeyword;
3519
+
3520
+ @override
3521
+ MixinAugmentationElement ? get declaredElement;
3522
+ }
3523
+
3507
3524
/// The declaration of a mixin.
3508
3525
///
3509
3526
/// mixinDeclaration ::=
3510
- /// metadata? 'mixin' name [TypeParameterList]?
3527
+ /// 'mixin' name [TypeParameterList]?
3511
3528
/// [OnClause]? [ImplementsClause]? '{' [ClassMember]* '}'
3512
3529
///
3513
3530
/// Clients may not extend, implement or mix-in this class.
3514
- abstract class MixinDeclaration implements ClassOrMixinDeclaration {
3531
+ abstract class MixinDeclaration
3532
+ implements MixinOrAugmentationDeclaration , ClassOrMixinDeclaration {
3533
+ // TODO(scheglov) Uncomment when removed [ClassOrMixinDeclaration].
3534
+ // @override
3535
+ // MixinElement get declaredElement;
3536
+ }
3537
+
3538
+ /// Shared interface between [MixinDeclaration] and
3539
+ /// [MixinAugmentationDeclaration] .
3540
+ ///
3541
+ /// Clients may not extend, implement or mix-in this class.
3542
+ @experimental
3543
+ abstract class MixinOrAugmentationDeclaration
3544
+ implements NamedCompilationUnitMember {
3545
+ /// Returns the `implements` clause for the mixin, or `null` if the mixin
3546
+ /// does not implement any interfaces.
3547
+ ImplementsClause ? get implementsClause;
3548
+
3549
+ // @override
3550
+ // TODO(scheglov) Uncomment when removed [ClassOrMixinDeclaration].
3551
+ // MixinOrAugmentationElement get declaredElement;
3552
+
3553
+ /// Returns the left curly bracket.
3554
+ Token get leftBracket;
3555
+
3556
+ /// Returns the members defined by the mixin.
3557
+ NodeList <ClassMember > get members;
3558
+
3515
3559
/// Return the token representing the 'mixin' keyword.
3516
3560
Token get mixinKeyword;
3517
3561
3518
3562
/// Return the on clause for the mixin, or `null` if the mixin does not have
3519
3563
/// any superclass constraints.
3520
3564
OnClause ? get onClause;
3565
+
3566
+ /// Returns the right curly bracket.
3567
+ Token get rightBracket;
3568
+
3569
+ /// Returns the type parameters for the mixin, or `null` if the mixin does
3570
+ /// not have any type parameters.
3571
+ TypeParameterList ? get typeParameters;
3521
3572
}
3522
3573
3523
3574
/// A node that declares a single name within the scope of a compilation unit.
0 commit comments