@@ -37605,6 +37605,8 @@ final class MethodInvocationImpl extends InvocationExpressionImpl
3760537605 };
3760637606 var methodNameType = switch (origin) {
3760737607 CascadeMethodInvocationImpl() => origin.staticInvokeType,
37608+ ReceiverMethodInvocationImpl(staticInvokeType: InvalidTypeImpl()) =>
37609+ origin.staticInvokeType,
3760837610 _ => switch (origin.resolution) {
3760937611 ExecutableInvocationResolutionImpl(:var element) => element.type,
3761037612 InvalidInvocationResolutionImpl(
@@ -38037,7 +38039,7 @@ final class MethodInvocationImpl extends InvocationExpressionImpl
3803738039 SimpleIdentifierImpl.v1Projection(token: importPrefix.name)
3803838040 ..element = importPrefix.element,
3803938041 ReceiverMethodInvocationImpl(:var receiver) =>
38040- V1Projection.toV1Expression (receiver),
38042+ V1Projection.toV1NamedReceiver (receiver),
3804138043 DotShorthandMethodInvocationImpl() => throw StateError(
3804238044 'DotShorthandMethodInvocation projects to DotShorthandInvocation.',
3804338045 ),
@@ -41899,7 +41901,7 @@ sealed class ParsedAssignmentTargetImpl extends AssignmentTargetImpl
4189941901 WriteResolutionImpl? get write => null;
4190041902}
4190141903
41902- /// A parser-only expression whose names have not yet been assigned receiver roles .
41904+ /// A syntactic expression whose final semantic role has not yet been selected .
4190341905@experimental
4190441906@AnalyzerPublicApi(message: 'exported by lib/dart/ast/ast.dart')
4190541907sealed class ParsedExpression implements Expression {}
@@ -42620,6 +42622,10 @@ final class ParsedUnqualifiedNameImpl extends ParsedExpressionImpl
4262042622 @override
4262142623 final Token name;
4262242624
42625+ /// Lexical binding retained when a call's qualifier stays in parsed form
42626+ /// until type-based member lookup.
42627+ ScopeLookupResult? scopeLookupResult;
42628+
4262342629 @generated
4262442630 ParsedUnqualifiedNameImpl({required this.name});
4262542631
@@ -42763,6 +42769,19 @@ final class ParsedValueArgumentsImpl extends ParsedExpressionImpl
4276342769 return argumentList.endToken;
4276442770 }
4276542771
42772+ /// The final selector and optional invocation type arguments of a named call.
42773+ @DoNotGenerate(reason: 'Groups nested invocation syntax without lowering it')
42774+ ({ParsedNameAccessImpl selector, TypeArgumentListImpl? typeArguments})?
42775+ get namedInvocationParts => switch (operand) {
42776+ ParsedNameAccessImpl selector => (selector: selector, typeArguments: null),
42777+ ParsedTypeArgumentsImpl(
42778+ operand: ParsedNameAccessImpl selector,
42779+ :var typeArguments,
42780+ ) =>
42781+ (selector: selector, typeArguments: typeArguments),
42782+ _ => null,
42783+ };
42784+
4276642785 @generated
4276742786 @override
4276842787 ParsedExpressionImpl get operand => _operand;
@@ -42834,10 +42853,10 @@ final class ParsedValueArgumentsImpl extends ParsedExpressionImpl
4283442853 super.replaceChild(oldNode, newNode);
4283542854 }
4283642855
42837- @DoNotGenerate(reason: 'Parser-only nodes are lowered before type inference')
42856+ @generated
4283842857 @override
4283942858 void resolveExpression(ResolverVisitor resolver, TypeImpl contextType) {
42840- throw StateError('Parsed expressions must be lowered before resolution.' );
42859+ resolver.visitParsedValueArguments(this, contextType: contextType );
4284142860 }
4284242861
4284342862 @generated
@@ -46698,20 +46717,16 @@ final class ReceiverIndexExpressionImpl extends IndexExpression2Impl
4669846717 }
4669946718}
4670046719
46701- /// A direct method invocation on an explicitly written expression receiver.
46702- ///
46703- /// This migration slice supports receivers whose value-producing role is
46704- /// structurally unambiguous. Other receiver forms remain on their existing AST
46705- /// shapes until named receivers and parser-only chains are implemented.
46720+ /// A direct method invocation on an explicitly written receiver or qualifier.
4670646721@experimental
4670746722@AnalyzerPublicApi(message: 'exported by lib/dart/ast/ast.dart')
4670846723abstract final class ReceiverMethodInvocation
4670946724 implements NamedFunctionInvocation {
4671046725 /// The operator separating the receiver from the method name.
4671146726 Token get operator;
4671246727
46713- /// The expression whose value receives the method invocation .
46714- Expression get receiver;
46728+ /// The value receiver or static namespace selecting the method.
46729+ NamedReceiver get receiver;
4671546730}
4671646731
4671746732@GenerateNodeImpl(
@@ -46727,7 +46742,7 @@ abstract final class ReceiverMethodInvocation
4672746742final class ReceiverMethodInvocationImpl extends NamedFunctionInvocationImpl
4672846743 implements ReceiverMethodInvocation {
4672946744 @generated
46730- ExpressionImpl _receiver;
46745+ NamedReceiverImpl _receiver;
4673146746
4673246747 @generated
4673346748 @override
@@ -46737,7 +46752,7 @@ final class ReceiverMethodInvocationImpl extends NamedFunctionInvocationImpl
4673746752
4673846753 @generated
4673946754 ReceiverMethodInvocationImpl({
46740- required ExpressionImpl receiver,
46755+ required NamedReceiverImpl receiver,
4674146756 required this.operator,
4674246757 required super.name,
4674346758 required super.typeArguments,
@@ -46764,10 +46779,10 @@ final class ReceiverMethodInvocationImpl extends NamedFunctionInvocationImpl
4676446779
4676546780 @generated
4676646781 @override
46767- ExpressionImpl get receiver => _receiver;
46782+ NamedReceiverImpl get receiver => _receiver;
4676846783
4676946784 @DoNotGenerate(reason: 'Keeps the cached V1 projection synchronized')
46770- set receiver(ExpressionImpl receiver) {
46785+ set receiver(NamedReceiverImpl receiver) {
4677146786 _receiver = _becomeParentOf2(receiver);
4677246787 _methodInvocation?._attachV1Children();
4677346788 }
@@ -46831,7 +46846,7 @@ final class ReceiverMethodInvocationImpl extends NamedFunctionInvocationImpl
4683146846 @override
4683246847 void replaceChild(AstNodeImpl oldNode, AstNodeImpl newNode) {
4683346848 if (identical(receiver, oldNode)) {
46834- receiver = newNode as ExpressionImpl ;
46849+ receiver = newNode as NamedReceiverImpl ;
4683546850 return;
4683646851 }
4683746852 if (identical(typeArguments, oldNode)) {
@@ -46876,7 +46891,7 @@ final class ReceiverMethodInvocationImpl extends NamedFunctionInvocationImpl
4687646891 @experimental
4687746892 void visitChildrenWithHooks(
4687846893 AstVisitor2 visitor, {
46879- void Function(ExpressionImpl )? visitReceiver,
46894+ void Function(NamedReceiverImpl )? visitReceiver,
4688046895 void Function(TypeArgumentListImpl)? visitTypeArguments,
4688146896 void Function(ArgumentListImpl)? visitArgumentList,
4688246897 }) {
0 commit comments