Skip to content

Commit

Permalink
Make and/or right associative
Browse files Browse the repository at this point in the history
  • Loading branch information
7h3kk1d committed Jan 14, 2025
1 parent 9d4e25e commit 0c00552
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/haz3lcore/lang/Precedence.re
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ let concat = 29 |> right_associative;
let eqs = 30 |> left_associative;
// _____ == x
// _____ && true
let and_ = 31;
let and_ = 31 |> right_associative;
// true && _____
// _____ || false
let or_ = 32;
let or_ = 32 |> right_associative;
// false || _____
let if_ = 34;
let fun_ = 35;
Expand Down
2 changes: 1 addition & 1 deletion src/haz3lcore/pretty/ExpToSegment.re
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ let rec parenthesize = (~preserve_filters: bool, exp: Exp.t): Exp.t => {
| TyAlias(tp, t, e) =>
TyAlias(
tp,
t |> paren_typ_at(Precedence.min),
parenthesize_typ(t) |> paren_typ_at(Precedence.min),
parenthesize(e) |> paren_assoc_at(Precedence.let_),
)
|> rewrap
Expand Down

0 comments on commit 0c00552

Please sign in to comment.