Spread operator for list literals (#11006)

This commit is contained in:
ysthakur
2023-11-22 16:10:08 -05:00
committed by GitHub
parent 95a745e622
commit 823e578c46
12 changed files with 149 additions and 13 deletions

View File

@ -289,6 +289,7 @@ impl Expression {
Expr::ValueWithUnit(expr, _) => expr.has_in_variable(working_set),
Expr::Var(var_id) => *var_id == IN_VARIABLE_ID,
Expr::VarDecl(_) => false,
Expr::Spread(expr) => expr.has_in_variable(working_set),
}
}
@ -480,6 +481,7 @@ impl Expression {
}
}
Expr::VarDecl(_) => {}
Expr::Spread(expr) => expr.replace_in_variable(working_set, new_var_id),
}
}
@ -618,6 +620,7 @@ impl Expression {
Expr::ValueWithUnit(expr, _) => expr.replace_span(working_set, replaced, new_span),
Expr::Var(_) => {}
Expr::VarDecl(_) => {}
Expr::Spread(expr) => expr.replace_span(working_set, replaced, new_span),
}
}
}