aboutsummaryrefslogtreecommitdiff
path: root/src/kompsos-pretty_print.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2026-01-22 16:41:39 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2026-01-22 16:41:39 +1300
commit28d132c2823d7dfa21190bf746f9f39dd59a40d8 (patch)
treeb0d1e26b2fadffa43bca2300dc273d8991c77df4 /src/kompsos-pretty_print.adb
parent42e3c2fa30552a227e38f03b859f03ae51f9000d (diff)
States are now custom linked lists
Diffstat (limited to 'src/kompsos-pretty_print.adb')
-rw-r--r--src/kompsos-pretty_print.adb17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/kompsos-pretty_print.adb b/src/kompsos-pretty_print.adb
index 729b658..216ceec 100644
--- a/src/kompsos-pretty_print.adb
+++ b/src/kompsos-pretty_print.adb
@@ -112,14 +112,19 @@ package body Kompsos.Pretty_Print is
is
Result : SU.Unbounded_String;
begin
- if Item.Actual.Is_Empty then
+ if Item.Ctrl.Actual = null then
SU.Append (Result, Latin.HT & "N/A" & Latin.LF);
else
- for Bind of Item.Actual loop
- SU.Append (Result, Latin.HT &
- Image (Bind.Key) & " => " &
- Image (Bind.Elem) & Latin.LF);
- end loop;
+ declare
+ Marker : State_Component_Access := Item.Ctrl.Actual;
+ begin
+ while Marker /= null loop
+ SU.Append (Result, Latin.HT &
+ Image (Marker.Key) & " => " &
+ Image (Marker.Value) & Latin.LF);
+ Marker := Marker.Next.Ctrl.Actual;
+ end loop;
+ end;
end if;
return SU.To_String (Result);
end Image;