From 94f73a280d00fb26d7d2b59de87f972d4f3a38d7 Mon Sep 17 00:00:00 2001 From: Michael McLoughlin Date: Sun, 10 Mar 2024 21:14:31 -0700 Subject: [PATCH] match raw pretty printing of optional_else and indented_block (#51) * pp-raw for optional_else uses same format as indented_block * call pp_raw_indented_block from optional_else --- libASL/asl.ott | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libASL/asl.ott b/libASL/asl.ott index 77984705..9de121ef 100644 --- a/libASL/asl.ott +++ b/libASL/asl.ott @@ -630,8 +630,7 @@ s_elsif :: 'S_Elsif_' ::= optional_else :: 'S_Else' ::= {{ phantom }} {{ ocaml stmt list }} - {{ pp-raw x = match x with [] -> string "" - | ys -> string "(else " ^^ separate (string "\n") (List.map pp_raw_stmt ys) ^^ string ")" }} + {{ pp-raw x = pp_raw_indented_block x }} {{ pp x = match x with [] -> string "" | ys -> string "else {" ^^ hardline ^^ (nest 4 (separate (string "\n") (List.map pp_stmt ys @ [string "}"])))