summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2019-01-29 00:34:32 +1100
committerJed Barber <jjbarber@y7mail.com>2019-01-29 00:34:32 +1100
commit8e1f7f57bc08b98d95beead0630964baf913cc0d (patch)
tree00a29bf6ee0f7f804c854c380dab03e79ab4b7c9 /src
parent6f15340717a5d2dccdcf8de0a03a161c5abeef70 (diff)
Clarified Cursor details in Packrat.Graphs, added test for Find
Diffstat (limited to 'src')
-rw-r--r--src/packrat-graphs.adb6
-rw-r--r--src/packrat-graphs.ads5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/packrat-graphs.adb b/src/packrat-graphs.adb
index 1206a89..1411259 100644
--- a/src/packrat-graphs.adb
+++ b/src/packrat-graphs.adb
@@ -471,7 +471,7 @@ package body Packrat.Graphs is
begin
return Result : Reversible_Iterator do
Result.My_Container := This'Unrestricted_Access;
- Result.My_Position := No_Position;
+ Result.My_Position := Cursor (No_Position);
end return;
end Iterate;
@@ -483,7 +483,7 @@ package body Packrat.Graphs is
begin
return Result : Reversible_Iterator do
Result.My_Container := This'Unrestricted_Access;
- Result.My_Position := No_Position;
+ Result.My_Position := Cursor (No_Position);
end return;
end Iterate_Subtree;
@@ -495,7 +495,7 @@ package body Packrat.Graphs is
begin
return Result : Forward_Iterator do
Result.My_Container := This'Unrestricted_Access;
- Result.My_Position := No_Position;
+ Result.My_Position := Cursor (No_Position);
end return;
end Iterate_Choice;
diff --git a/src/packrat-graphs.ads b/src/packrat-graphs.ads
index 877be3a..0ef298e 100644
--- a/src/packrat-graphs.ads
+++ b/src/packrat-graphs.ads
@@ -33,7 +33,7 @@ package Packrat.Graphs is
- No_Position : constant Cursor;
+ No_Position : constant My_Interfaces.Cursor'Class;
Empty_Graph : constant Parse_Graph;
@@ -339,7 +339,8 @@ private
No_Node : constant Node := (My_Interfaces.Node with null record);
- No_Position : constant Cursor := (My_Interfaces.Cursor with null record);
+ No_Position_Actual : constant Cursor := (My_Interfaces.Cursor with null record);
+ No_Position : constant My_Interfaces.Cursor'Class := No_Position_Actual;
Empty_Graph : constant Parse_Graph := (My_Interfaces.Graph with null record);