From 860ad2752ef0544bc6874d895875a78f91db9084 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 17 Jun 2014 09:48:22 +0200 Subject: Add AST for logical formula. --- frontend/ast_printer.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'frontend') 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 -- cgit v1.2.3