mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-23 03:52:27 +00:00
refactor PatternAs
This commit is contained in:
parent
e9196f3c0b
commit
aff70bb6bd
6 changed files with 94 additions and 52 deletions
|
@ -766,11 +766,9 @@ impl<'a> RemoveSpaces<'a> for Pattern<'a> {
|
|||
Pattern::OptionalField(a, b) => {
|
||||
Pattern::OptionalField(a, arena.alloc(b.remove_spaces(arena)))
|
||||
}
|
||||
Pattern::As(pattern, spaces, identifier) => Pattern::As(
|
||||
arena.alloc(pattern.remove_spaces(arena)),
|
||||
spaces,
|
||||
identifier,
|
||||
),
|
||||
Pattern::As(pattern, pattern_as) => {
|
||||
Pattern::As(arena.alloc(pattern.remove_spaces(arena)), pattern_as)
|
||||
}
|
||||
Pattern::NumLiteral(a) => Pattern::NumLiteral(a),
|
||||
Pattern::NonBase10Literal {
|
||||
string,
|
||||
|
@ -794,7 +792,7 @@ impl<'a> RemoveSpaces<'a> for Pattern<'a> {
|
|||
Pattern::SingleQuote(a) => Pattern::SingleQuote(a),
|
||||
Pattern::List(pats) => Pattern::List(pats.remove_spaces(arena)),
|
||||
Pattern::Tuple(pats) => Pattern::Tuple(pats.remove_spaces(arena)),
|
||||
Pattern::ListRest => Pattern::ListRest,
|
||||
Pattern::ListRest(opt_pattern_as) => Pattern::ListRest(opt_pattern_as),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue