summaryrefslogtreecommitdiff
path: root/frontend/ast_printer.ml
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/ast_printer.ml')
-rw-r--r--frontend/ast_printer.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/frontend/ast_printer.ml b/frontend/ast_printer.ml
index 9a4d62d..3ca2ff6 100644
--- a/frontend/ast_printer.ml
+++ b/frontend/ast_printer.ml
@@ -103,6 +103,9 @@ let rec print_expr fmt e =
if expr_precedence e1 <= expr_precedence e
then Format.fprintf fmt "(%a)" print_expr e1
else Format.fprintf fmt "%a" print_expr e1
+ | AST_cast ((e1,_), ty) ->
+ Format.fprintf fmt "%s (%a)"
+ (string_of_typ ty) print_expr e1;
| AST_binary (op,(e1,_),(e2,_)) ->
if expr_precedence e1 < expr_precedence e