mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Parse opaque types
This commit is contained in:
parent
ab6019d402
commit
fa24e51593
13 changed files with 201 additions and 113 deletions
|
@ -347,7 +347,8 @@ fn push_op(buf: &mut Buf, op: BinOp) {
|
|||
called_via::BinOp::Or => buf.push_str("||"),
|
||||
called_via::BinOp::Pizza => buf.push_str("|>"),
|
||||
called_via::BinOp::Assignment => unreachable!(),
|
||||
called_via::BinOp::HasType => unreachable!(),
|
||||
called_via::BinOp::IsAliasType => unreachable!(),
|
||||
called_via::BinOp::IsOpaqueType => unreachable!(),
|
||||
called_via::BinOp::Backpassing => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
@ -1067,7 +1068,11 @@ fn sub_expr_requests_parens(expr: &Expr<'_>) -> bool {
|
|||
| BinOp::GreaterThanOrEq
|
||||
| BinOp::And
|
||||
| BinOp::Or => true,
|
||||
BinOp::Pizza | BinOp::Assignment | BinOp::HasType | BinOp::Backpassing => false,
|
||||
BinOp::Pizza
|
||||
| BinOp::Assignment
|
||||
| BinOp::IsAliasType
|
||||
| BinOp::IsOpaqueType
|
||||
| BinOp::Backpassing => false,
|
||||
})
|
||||
}
|
||||
Expr::If(_, _) => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue