summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/ast_printer.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/ast_printer.ml b/frontend/ast_printer.ml
index 08f4fb4..b6dcdbc 100644
--- a/frontend/ast_printer.ml
+++ b/frontend/ast_printer.ml
@@ -44,6 +44,7 @@ let string_of_binary_bool = function
| AST_OR -> "or"
+let unary_precedence = 99
let binary_op_precedence = function
| AST_MUL| AST_DIV| AST_MOD-> 51
| AST_PLUS | AST_MINUS -> 50
@@ -57,7 +58,7 @@ let arrow_precedence = 20
let if_precedence = 10
let expr_precedence = function
- | AST_unary (_, _) | AST_pre(_, _) | AST_not(_) -> 99
+ | AST_unary (_, _) | AST_pre(_, _) | AST_not(_) -> unary_precedence
| AST_binary(op, _, _) -> binary_op_precedence op
| AST_binary_rel(r, _, _) -> binary_rel_precedence r
| AST_binary_bool(r, _, _) -> binary_bool_precedence r