summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2020-12-05 10:42:42 +1100
committerJed Barber <jjbarber@y7mail.com>2020-12-05 10:42:42 +1100
commite57fd65cfd740f992324e7b7c23b0d6656e8cb77 (patch)
tree420ada1eca6a22e72fb936fa08af25e2b8ea55c1
parent01862116fefc0fb241beca2fb5402195dc933f7e (diff)
Fixed bug in debug string for empty graph
-rw-r--r--src/packrat-parse_graphs.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/packrat-parse_graphs.adb b/src/packrat-parse_graphs.adb
index 2d5c2a5..99ce360 100644
--- a/src/packrat-parse_graphs.adb
+++ b/src/packrat-parse_graphs.adb
@@ -206,6 +206,9 @@ package body Packrat.Parse_Graphs is
Current : Traits.Tokens.Token_Type;
Result : SU.Unbounded_String;
begin
+ if Container.Is_Empty then
+ return "";
+ end if;
for Iter in Mapping.Iterate loop
SU.Append (Result, Traits.Label_Enum'Image (Enum_Node_Maps.Key (Iter)) & Latin.LF);
for Node of Enum_Node_Maps.Element (Iter) loop