diff options
Diffstat (limited to 'src/kompsos-pretty_print.adb')
| -rw-r--r-- | src/kompsos-pretty_print.adb | 22 |
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); |
