Skip to content

Commit

Permalink
fix precedence for |> and comparisions
Browse files Browse the repository at this point in the history
  • Loading branch information
disconcision committed Nov 4, 2024
1 parent 0607480 commit d239a24
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/hazel/Grammar.re
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ module Exp = {
//let
p(let_),
p(type_def),
//Reverse-ap
p(~a=L, seq([exp, c("|>"), exp])),
//fun
p(
seq([kw(~space=(false, true), "fun"), nt(Pat.sort), op("->"), exp]),
Expand All @@ -152,17 +154,15 @@ module Exp = {
exp,
]),
),
//Comparison
p(~a=L, seq([exp, comp_op_int, exp])),
p(~a=L, seq([exp, comp_op_float, exp])),
//Math operations
p(~a=L, seq([exp, add_op, exp])),
p(~a=L, seq([exp, mult_op, exp])),
p(seq([neg_op, exp])),
//Comparison
p(~a=L, seq([exp, comp_op_int, exp])),
p(~a=L, seq([exp, comp_op_float, exp])),
//ap
p(fn_ap),
//Reverse-ap
p(~a=L, seq([exp, c("|>"), exp])),
p(operand),
];
};
Expand Down

0 comments on commit d239a24

Please sign in to comment.