@@ -165,11 +165,10 @@ class _DivisionMigrationVisitor extends MigrationVisitor {
165165 return '$namespace .' ;
166166 }
167167
168- /// Allows division within this argument invocation .
168+ /// Allows division within this argument list .
169169 @override
170- void visitArgumentInvocation (ArgumentInvocation invocation,
171- {bool inCalcContext = false }) {
172- _withContext (() => super .visitArgumentInvocation (invocation),
170+ void visitArgumentList (ArgumentList arguments, {bool inCalcContext = false }) {
171+ _withContext (() => super .visitArgumentList (arguments),
173172 isDivisionAllowed: true , inCalcContext: inCalcContext);
174173 }
175174
@@ -195,7 +194,7 @@ class _DivisionMigrationVisitor extends MigrationVisitor {
195194 void visitFunctionExpression (FunctionExpression node) {
196195 if (_tryColorFunction (node)) return ;
197196 var validCalcs = _calcFunctions.difference (currentScope.allFunctionNames);
198- visitArgumentInvocation (node.arguments,
197+ visitArgumentList (node.arguments,
199198 inCalcContext:
200199 node.namespace == null && validCalcs.contains (node.name));
201200 }
@@ -274,15 +273,12 @@ class _DivisionMigrationVisitor extends MigrationVisitor {
274273 }
275274
276275 var channels = switch (node.arguments) {
277- ArgumentInvocation (
276+ ArgumentList (
278277 positional: [ListExpression arg],
279278 named: Map (isEmpty: true )
280279 ) =>
281280 arg,
282- ArgumentInvocation (
283- positional: [],
284- named: {r'$channels' : ListExpression arg}
285- ) =>
281+ ArgumentList (positional: [], named: {r'$channels' : ListExpression arg}) =>
286282 arg,
287283 _ => null ,
288284 };
0 commit comments