Refactor Destructure to handle assignments
Renames `DefDestructure` to `Destructure` to better reflect its use in both definitions and assignments. Introduces `bind_assign_pattern` to handle assignment destructuring in the binder. Adds `test_assign_destructuring` to verify assignment destructuring functionality.
This commit is contained in:
@@ -178,11 +178,11 @@ impl<'a> Analyzer<'a> {
|
||||
)
|
||||
}
|
||||
|
||||
BoundKind::DefDestructure { pattern, value } => {
|
||||
BoundKind::Destructure { pattern, value } => {
|
||||
let pat_m = self.visit(Rc::new((**pattern).clone()));
|
||||
let val_m = self.visit(Rc::new((**value).clone()));
|
||||
(
|
||||
BoundKind::DefDestructure {
|
||||
BoundKind::Destructure {
|
||||
pattern: Box::new(pat_m),
|
||||
value: Box::new(val_m),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user