aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-22 11:36:41 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-22 11:36:41 +0200
commit57d62f0cb7346e2a76e7e70c3b3726d0140ec662 (patch)
treeb51589b3c1031d88407ce19e8674a52d97c3acfa /gcc/ada/par-ch4.adb
parentc3ad80f0001bc349f484f576576997984f7aa1ff (diff)
downloadgcc-57d62f0cb7346e2a76e7e70c3b3726d0140ec662.zip
gcc-57d62f0cb7346e2a76e7e70c3b3726d0140ec662.tar.gz
gcc-57d62f0cb7346e2a76e7e70c3b3726d0140ec662.tar.bz2
[multiple changes]
2010-10-22 Robert Dewar <dewar@adacore.com> * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb (Is_Generic_Formal): Moved from Sem_Util to Sem_Aux. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): New subprogram, implements new iterator forms over arrays and containers, in loops and quantified expressions. * exp_util.adb (Insert_Actions): include N_Iterator_Specification. * par-ch4.adb (P_Quantified_Expression): Handle iterator specifications. * par-ch5.adb (P_Iterator_Specification): New subprogram. Modify P_Iteration_Scheme to handle both loop forms. * sem.adb: Handle N_Iterator_Specification. * sem_ch5.adb, sem_ch5.ads (Analyze_Iterator_Specification): New subprogram. * sinfo.adb, sinfo.ads: New node N_Iterator_Specification. N_Iteration_Scheme can now include an Iterator_Specification. Ditto for N_Quantified_Expression. * snames.ads-tmpl: Add names Cursor, Element, Element_Type, No_Element, and Previous, to support iterators over predefined containers. * sprint.adb: Handle N_Iterator_Specification. From-SVN: r165811
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r--gcc/ada/par-ch4.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
index a613e1f..8ab04ef 100644
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -2514,7 +2514,8 @@ package body Ch4 is
-- for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
function P_Quantified_Expression return Node_Id is
- Node1 : Node_Id;
+ I_Spec : Node_Id;
+ Node1 : Node_Id;
begin
Scan; -- past FOR
@@ -2536,7 +2537,13 @@ package body Ch4 is
end if;
Scan;
- Set_Loop_Parameter_Specification (Node1, P_Loop_Parameter_Specification);
+ I_Spec := P_Loop_Parameter_Specification;
+
+ if Nkind (I_Spec) = N_Loop_Parameter_Specification then
+ Set_Loop_Parameter_Specification (Node1, I_Spec);
+ else
+ Set_Iterator_Specification (Node1, I_Spec);
+ end if;
if Token = Tok_Arrow then
Scan;