mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Canonicalization of list patterns
This commit is contained in:
parent
55ea3bbea2
commit
b0a8b85de3
13 changed files with 189 additions and 4 deletions
|
@ -472,6 +472,12 @@ pub fn walk_pattern<V: Visitor>(visitor: &mut V, pattern: &Pattern) {
|
|||
RecordDestructure { destructs, .. } => destructs
|
||||
.iter()
|
||||
.for_each(|d| visitor.visit_record_destruct(&d.value, d.region)),
|
||||
List {
|
||||
patterns, elem_var, ..
|
||||
} => patterns
|
||||
.patterns
|
||||
.iter()
|
||||
.for_each(|p| visitor.visit_pattern(&p.value, p.region, Some(*elem_var))),
|
||||
NumLiteral(..) => { /* terminal */ }
|
||||
IntLiteral(..) => { /* terminal */ }
|
||||
FloatLiteral(..) => { /* terminal */ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue