@@ -4966,7 +4966,8 @@ class InternalRecordLiteral extends InternalExpression {
4966
4966
4967
4967
@override
4968
4968
void transformChildren (Transformer v) {
4969
- unsupported ("${transformChildren }.accept on ${v .runtimeType }" , - 1 , null );
4969
+ unsupported (
4970
+ "${runtimeType }.transformChildren on ${v .runtimeType }" , - 1 , null );
4970
4971
}
4971
4972
4972
4973
@override
@@ -5006,3 +5007,115 @@ class InternalRecordLiteral extends InternalExpression {
5006
5007
printer.write (')' );
5007
5008
}
5008
5009
}
5010
+
5011
+ abstract class Binder extends TreeNode {}
5012
+
5013
+ class ListBinder extends Binder {
5014
+ final DartType typeBinderArgument;
5015
+ final List <Binder > binders;
5016
+
5017
+ ListBinder (this .typeBinderArgument, this .binders);
5018
+
5019
+ @override
5020
+ R accept <R >(TreeVisitor <R > visitor) {
5021
+ if (visitor is Printer || visitor is Precedence || visitor is Transformer ) {
5022
+ // Allow visitors needed for toString and replaceWith.
5023
+ return visitor.defaultTreeNode (this );
5024
+ }
5025
+ return unsupported (
5026
+ "${runtimeType }.accept on ${visitor .runtimeType }" , - 1 , null );
5027
+ }
5028
+
5029
+ @override
5030
+ R accept1 <R , A >(TreeVisitor1 <R , A > visitor, A arg) {
5031
+ return unsupported (
5032
+ "${runtimeType }.accept1 on ${visitor .runtimeType }" , - 1 , null );
5033
+ }
5034
+
5035
+ @override
5036
+ void toTextInternal (AstPrinter printer) {
5037
+ printer.write ('[' );
5038
+ String comma = '' ;
5039
+ for (Binder binder in binders) {
5040
+ printer.write (comma);
5041
+ binder.toTextInternal (printer);
5042
+ comma = ', ' ;
5043
+ }
5044
+ printer.write (']' );
5045
+ }
5046
+
5047
+ @override
5048
+ void transformChildren (Transformer v) {
5049
+ unsupported (
5050
+ "${runtimeType }.transformChildren on ${v .runtimeType }" , - 1 , null );
5051
+ }
5052
+
5053
+ @override
5054
+ void transformOrRemoveChildren (RemovingTransformer v) {
5055
+ unsupported ("${runtimeType }.transformOrRemoveChildren on ${v .runtimeType }" ,
5056
+ - 1 , null );
5057
+ }
5058
+
5059
+ @override
5060
+ void visitChildren (Visitor v) {
5061
+ unsupported ("${runtimeType }.visitChildren on ${v .runtimeType }" , - 1 , null );
5062
+ }
5063
+
5064
+ @override
5065
+ String toString () {
5066
+ return "ListBinder(${toStringInternal ()})" ;
5067
+ }
5068
+ }
5069
+
5070
+ class WildcardBinder extends Binder {
5071
+ final DartType ? type;
5072
+
5073
+ WildcardBinder (this .type);
5074
+
5075
+ @override
5076
+ R accept <R >(TreeVisitor <R > visitor) {
5077
+ if (visitor is Printer || visitor is Precedence || visitor is Transformer ) {
5078
+ // Allow visitors needed for toString and replaceWith.
5079
+ return visitor.defaultTreeNode (this );
5080
+ }
5081
+ return unsupported (
5082
+ "${runtimeType }.accept on ${visitor .runtimeType }" , - 1 , null );
5083
+ }
5084
+
5085
+ @override
5086
+ R accept1 <R , A >(TreeVisitor1 <R , A > visitor, A arg) {
5087
+ return unsupported (
5088
+ "${runtimeType }.accept1 on ${visitor .runtimeType }" , - 1 , null );
5089
+ }
5090
+
5091
+ @override
5092
+ void toTextInternal (AstPrinter printer) {
5093
+ if (type != null ) {
5094
+ type! .toTextInternal (printer);
5095
+ printer.write (" " );
5096
+ }
5097
+ printer.write ("_" );
5098
+ }
5099
+
5100
+ @override
5101
+ void transformChildren (Transformer v) {
5102
+ unsupported (
5103
+ "${runtimeType }.transformChildren on ${v .runtimeType }" , - 1 , null );
5104
+ }
5105
+
5106
+ @override
5107
+ void transformOrRemoveChildren (RemovingTransformer v) {
5108
+ unsupported ("${runtimeType }.transformOrRemoveChildren on ${v .runtimeType }" ,
5109
+ - 1 , null );
5110
+ }
5111
+
5112
+ @override
5113
+ void visitChildren (Visitor v) {
5114
+ unsupported ("${runtimeType }.visitChildren on ${v .runtimeType }" , - 1 , null );
5115
+ }
5116
+
5117
+ @override
5118
+ String toString () {
5119
+ return "WildcardBinder(${toStringInternal ()})" ;
5120
+ }
5121
+ }
0 commit comments