AssignMultiExpr.resize constructor
Implementation
factory AssignMultiExpr.resize(
Token op, {
required List<Stmt> lhs,
required List<Stmt> rhs,
}) {
final int len = lhs.length;
final int other = rhs.length;
List<Stmt> newRhs = [];
for (int i = 0; i < len; i++) {
if (i >= other) {
newRhs.add(NilLiteral(Token.synthesized('multires_$i')));
continue;
}
newRhs.add(rhs[i]);
}
return AssignMultiExpr._(op, lhs, rhs);
}