mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Merge branch 'main' into new-builder-syntax
This commit is contained in:
commit
618b713ecd
70 changed files with 1654 additions and 256 deletions
|
@ -63,9 +63,14 @@ pub fn loc_pattern_help<'a>() -> impl Parser<'a, Loc<Pattern<'a>>, EPattern<'a>>
|
|||
},
|
||||
Ok((_, pattern_as, state)) => {
|
||||
let region = Region::span_across(&pattern.region, &pattern_as.identifier.region);
|
||||
let pattern = arena
|
||||
.alloc(pattern.value)
|
||||
.with_spaces_after(pattern_spaces, pattern.region);
|
||||
|
||||
let mut pattern = pattern;
|
||||
if !pattern_spaces.is_empty() {
|
||||
pattern = arena
|
||||
.alloc(pattern.value)
|
||||
.with_spaces_after(pattern_spaces, pattern.region)
|
||||
}
|
||||
|
||||
let as_pattern = Pattern::As(arena.alloc(pattern), pattern_as);
|
||||
|
||||
Ok((MadeProgress, Loc::at(region, as_pattern), state))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue