mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
add dedicated RecordUpdate tag to parse ast
This commit is contained in:
parent
0e7106280c
commit
60265b5d2a
5 changed files with 97 additions and 0 deletions
|
@ -98,6 +98,12 @@ pub enum Expr<'a> {
|
|||
final_comments: &'a [CommentOrNewline<'a>],
|
||||
},
|
||||
|
||||
RecordUpdate {
|
||||
update: &'a Loc<Expr<'a>>,
|
||||
fields: &'a [Loc<AssignedField<'a, Expr<'a>>>],
|
||||
final_comments: &'a [CommentOrNewline<'a>],
|
||||
},
|
||||
|
||||
Record {
|
||||
update: Option<&'a Loc<Expr<'a>>>,
|
||||
fields: &'a [Loc<AssignedField<'a, Expr<'a>>>],
|
||||
|
|
|
@ -1393,6 +1393,7 @@ fn expr_to_pattern_help<'a>(arena: &'a Bump, expr: &Expr<'a>) -> Result<Pattern<
|
|||
| Expr::Record {
|
||||
update: Some(_), ..
|
||||
}
|
||||
| Expr::RecordUpdate { .. }
|
||||
| Expr::UnaryOp(_, _) => Err(()),
|
||||
|
||||
Expr::Str(string) => Ok(Pattern::StrLiteral(string.clone())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue