diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-22 11:36:41 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-22 11:36:41 +0200 |
commit | 57d62f0cb7346e2a76e7e70c3b3726d0140ec662 (patch) | |
tree | b51589b3c1031d88407ce19e8674a52d97c3acfa /gcc/ada/sprint.adb | |
parent | c3ad80f0001bc349f484f576576997984f7aa1ff (diff) | |
download | gcc-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/sprint.adb')
-rw-r--r-- | gcc/ada/sprint.adb | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index e2bb173..627fb2f 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -1995,11 +1995,36 @@ package body Sprint is Sprint_Node (Condition (Node)); else Write_Str_With_Col_Check_Sloc ("for "); - Sprint_Node (Loop_Parameter_Specification (Node)); + if Present (Iterator_Specification (Node)) then + Sprint_Node (Iterator_Specification (Node)); + else + Sprint_Node (Loop_Parameter_Specification (Node)); + end if; end if; Write_Char (' '); + when N_Iterator_Specification => + Set_Debug_Sloc; + Write_Id (Defining_Identifier (Node)); + + if Present (Subtype_Indication (Node)) then + Write_Str_With_Col_Check (" : "); + Sprint_Node (Subtype_Indication (Node)); + end if; + + if Of_Present (Node) then + Write_Str_With_Col_Check (" of "); + else + Write_Str_With_Col_Check (" in "); + end if; + + if Reverse_Present (Node) then + Write_Str_With_Col_Check ("reverse "); + end if; + + Sprint_Node (Name (Node)); + when N_Itype_Reference => Write_Indent_Str_Sloc ("reference "); Write_Id (Itype (Node)); |