diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
commit | 071b4126c613881f4cb25b4e5c39032964827f88 (patch) | |
tree | 7ed805786566918630d1d617b1ed8f7310f5fd8e /gcc/ada/par-util.adb | |
parent | 845d23f3ea08ba873197c275a8857eee7edad996 (diff) | |
parent | caa1c2f42691d68af4d894a5c3e700ecd2dba080 (diff) | |
download | gcc-devel/gfortran-test.zip gcc-devel/gfortran-test.tar.gz gcc-devel/gfortran-test.tar.bz2 |
Merge branch 'master' into gfortran-testdevel/gfortran-test
Diffstat (limited to 'gcc/ada/par-util.adb')
-rw-r--r-- | gcc/ada/par-util.adb | 29 |
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 -- --------------------- |