summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ast_util.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ast_util.ml b/src/ast_util.ml
index 96823b25..d9977d93 100644
--- a/src/ast_util.ml
+++ b/src/ast_util.ml
@@ -312,6 +312,10 @@ let rec string_of_exp (E_aux (exp, _)) =
| E_throw exp -> "throw " ^ string_of_exp exp
| E_cons (x, xs) -> string_of_exp x ^ " :: " ^ string_of_exp xs
| E_list xs -> "[||" ^ string_of_list ", " string_of_exp xs ^ "||]"
+ | E_record_update (exp, FES_aux (FES_Fexps (fexps, _), _)) ->
+ "{ " ^ string_of_exp exp ^ " with " ^ string_of_list "; " string_of_fexp fexps ^ " }"
+ | E_record (FES_aux (FES_Fexps (fexps, _), _)) ->
+ "{ " ^ string_of_list "; " string_of_fexp fexps ^ " }"
| E_internal_cast _ -> "INTERNAL CAST"
| E_internal_exp _ -> "INTERNAL EXP"
| E_sizeof_internal _ -> "INTERNAL SIZEOF"
@@ -320,6 +324,8 @@ let rec string_of_exp (E_aux (exp, _)) =
| E_comment_struc _ -> "INTERNAL COMMENT STRUC"
| E_internal_let _ -> "INTERNAL LET"
| _ -> "INTERNAL"
+and string_of_fexp (FE_aux (FE_Fexp (field, exp), _)) =
+ string_of_id field ^ " = " ^ string_of_exp exp
and string_of_pexp (Pat_aux (pexp, _)) =
match pexp with
| Pat_exp (pat, exp) -> string_of_pat pat ^ " -> " ^ string_of_exp exp