From 69514149fb1ddc17be744a883806e8bc3c8ebb7a Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sat, 15 Nov 2025 16:06:40 +1300 Subject: Refactor of Terms that causes GNAT to STORAGE_ERROR --- src/kompsos-pretty_print.adb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/kompsos-pretty_print.adb') diff --git a/src/kompsos-pretty_print.adb b/src/kompsos-pretty_print.adb index 7ecbb75..8739af8 100644 --- a/src/kompsos-pretty_print.adb +++ b/src/kompsos-pretty_print.adb @@ -62,25 +62,25 @@ package body Kompsos.Pretty_Print is (Item : in Term) return String is begin - case Item.Actual.Kind is + case Item.Kind is + when Null_Term => + return "()"; when Atom_Term => - return Element_Image (Item.Actual.Value); + return Element_Image (Item.Atom); when Var_Term => - return Image (Item.Actual.Refer); + return Image (Item.Var); when Pair_Term => - if Item.Actual.Right.Actual = null then - return Image (Item.Actual.Left); - elsif Item.Actual.Right.Actual.Kind /= Pair_Term then - return Image (Item.Actual.Left) & " . " & Bare (Item.Actual.Right); + if Item.Right.Kind = Null_Term then + return Image (Item.Left); + elsif Item.Right.Kind /= Pair_Term then + return Image (Item.Left) & " . " & Bare (Item.Right); else - return Image (Item.Actual.Left) & " " & Bare (Item.Actual.Right); + return Image (Item.Left) & " " & Bare (Item.Right); end if; end case; end Bare; begin - if Item.Actual = null then - return "()"; - elsif Item.Actual.Kind = Pair_Term then + if Item.Kind = Pair_Term then return "(" & Bare (Item) & ")"; else return Bare (Item); -- cgit