Index: pkg/kernel/lib/ast.dart |
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart |
index aa87ce4365967d195807defef4037c6bfd6cce83..2d3099c58100a8f49a1731129cdc2e849461a174 100644 |
--- a/pkg/kernel/lib/ast.dart |
+++ b/pkg/kernel/lib/ast.dart |
@@ -493,6 +493,16 @@ class Typedef extends NamedNode { |
List<Expression> annotations = const <Expression>[]; |
String name; |
final List<TypeParameter> typeParameters; |
+ |
+ @informative |
+ int requiredParameterCount = 0; |
+ |
+ @informative |
+ List<VariableDeclaration> positionalParameters = <VariableDeclaration>[]; |
+ |
+ @informative |
+ List<VariableDeclaration> namedParameters = <VariableDeclaration>[]; |
+ |
DartType type; |
Typedef(this.name, this.type, |
@@ -508,9 +518,22 @@ class Typedef extends NamedNode { |
return v.visitTypedef(this); |
} |
+ void setParameters( |
+ int requiredParameterCount, |
+ List<VariableDeclaration> positionalParameters, |
+ List<VariableDeclaration> namedParameters) { |
+ this.requiredParameterCount = requiredParameterCount; |
+ this.positionalParameters = positionalParameters; |
+ this.namedParameters = namedParameters; |
+ setParents(this.positionalParameters, this); |
+ setParents(this.namedParameters, this); |
+ } |
+ |
transformChildren(Transformer v) { |
transformList(annotations, v, this); |
transformList(typeParameters, v, this); |
+ transformList(positionalParameters, v, this); |
+ transformList(namedParameters, v, this); |
if (type != null) { |
type = v.visitDartType(type); |
} |
@@ -519,6 +542,9 @@ class Typedef extends NamedNode { |
visitChildren(Visitor v) { |
visitList(annotations, v); |
visitList(typeParameters, v); |
+ visitList(typeParameters, v); |
+ visitList(positionalParameters, v); |
+ visitList(namedParameters, v); |
type?.accept(v); |
} |