aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-util.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/par-util.adb')
-rw-r--r--gcc/ada/par-util.adb29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb
index 78a76b3..6a6afd0 100644
--- a/gcc/ada/par-util.adb
+++ b/gcc/ada/par-util.adb
@@ -34,6 +34,22 @@ with GNAT.Spelling_Checker; use GNAT.Spelling_Checker;
separate (Par)
package body Util is
+ ------------
+ -- Append --
+ ------------
+
+ procedure Append
+ (Def_Ids : in out Defining_Identifiers; Def_Id : Entity_Id)
+ is
+ begin
+ if Def_Ids.Num_Idents >= Defining_Identifiers_Array'Last then
+ raise Program_Error;
+ end if;
+
+ Def_Ids.Num_Idents := Def_Ids.Num_Idents + 1;
+ Def_Ids.Idents (Def_Ids.Num_Idents) := Def_Id;
+ end Append;
+
---------------------
-- Bad_Spelling_Of --
---------------------
@@ -691,6 +707,19 @@ package body Util is
end if;
end No_Constraint;
+ ---------------
+ -- P_Def_Ids --
+ ---------------
+
+ procedure P_Def_Ids (Def_Ids : out Defining_Identifiers) is
+ pragma Assert (Def_Ids.Num_Idents = 0);
+ begin
+ loop
+ Append (Def_Ids, P_Defining_Identifier (C_Comma_Colon));
+ exit when not Comma_Present;
+ end loop;
+ end P_Def_Ids;
+
---------------------
-- Pop_Scope_Stack --
---------------------