summaryrefslogtreecommitdiff
path: root/src/kompsos-pretty_print.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-11-15 16:06:40 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-11-15 16:06:40 +1300
commit69514149fb1ddc17be744a883806e8bc3c8ebb7a (patch)
tree52ae7a59f4673145413e74b05fa80e9aafb6851b /src/kompsos-pretty_print.adb
parent72faae829a789664eedbda930cf815663c41c591 (diff)
Refactor of Terms that causes GNAT to STORAGE_ERROR
Diffstat (limited to 'src/kompsos-pretty_print.adb')
-rw-r--r--src/kompsos-pretty_print.adb22
1 files changed, 11 insertions, 11 deletions
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);