mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
functional changes
This commit is contained in:
parent
d5db3137a3
commit
3c78b4fb86
6 changed files with 52 additions and 15 deletions
|
@ -795,7 +795,7 @@ pub enum ValueDef<'a> {
|
|||
AnnotatedBody {
|
||||
ann_pattern: &'a Loc<Pattern<'a>>,
|
||||
ann_type: &'a Loc<TypeAnnotation<'a>>,
|
||||
comment: Option<&'a str>,
|
||||
comment: &'a [CommentOrNewline<'a>],
|
||||
body_pattern: &'a Loc<Pattern<'a>>,
|
||||
body_expr: &'a Loc<Expr<'a>>,
|
||||
},
|
||||
|
|
|
@ -1275,9 +1275,7 @@ macro_rules! join_ann_to_body {
|
|||
let value_def = ValueDef::AnnotatedBody {
|
||||
ann_pattern: $arena.alloc(*$ann_pattern),
|
||||
ann_type: $arena.alloc(*$ann_type),
|
||||
comment: $spaces_before_current
|
||||
.first()
|
||||
.and_then($crate::ast::CommentOrNewline::comment_str),
|
||||
comment: $spaces_before_current,
|
||||
body_pattern: $arena.alloc($loc_pattern),
|
||||
body_expr: *$arena.alloc($loc_def_expr),
|
||||
};
|
||||
|
@ -1311,9 +1309,7 @@ macro_rules! join_alias_to_body {
|
|||
let value_def = ValueDef::AnnotatedBody {
|
||||
ann_pattern: $arena.alloc(loc_ann_pattern),
|
||||
ann_type: $arena.alloc(*$ann_type),
|
||||
comment: $spaces_before_current
|
||||
.first()
|
||||
.and_then($crate::ast::CommentOrNewline::comment_str),
|
||||
comment: $spaces_before_current,
|
||||
body_pattern: $arena.alloc($loc_pattern),
|
||||
body_expr: *$arena.alloc($loc_def_expr),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue