]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Ada_2020 AI12-0250 : Implement Iterator filters.
authorEd Schonberg <schonberg@adacore.com>
Mon, 18 May 2020 01:02:59 +0000 (21:02 -0400)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:16:48 +0000 (13:16 -0300)
commit7f509b42754058ce934568b78ea49397712b5f26
tree395b82e3fa2564a97a7caff6c5d9dbbfed91cbf6
parentb4c4895c053c9f911404213f86d0ee5b6b30af91
[Ada] Ada_2020 AI12-0250 : Implement Iterator filters.

gcc/ada/

* par.adb (P_Iterator_Specification): Make public for use in
other parser subprograms.
* par-ch4.adb (P_Iterated_Component_Association): In Ada_2020,
recognize use of Iterator_Specification in an element iterator.
To simplify disambiguation between the two iterator forms, mark
the component association as carrying an Iterator_Specification
only when the element iterator (using "OF") is used.
* par-ch5.adb (P_Loop_Parameter_Specification): In Ada_2020,
parse iterator filter when present.
(P_Iterator_Specification): Ditto.  Remove declaration of
P_Iterator_Specification, now in parent unit.
* exp_ch5.adb (Expand_N_Loop_Statement): Apply Iterator filter
when present.
(Expand_Iterator_Loop_Over_Array): Ditto.
(Expand_Iterator_Loop_Over_Container): Ditto.
* sem_aggr.adb (Resolve_Array_Aggregate): Emit error nessage if
an iterated component association includes a iterator
specificcation with an element iterator, i.e. one that uses the
OF keyword.
* sem_ch5.adb (Analyze_Iterator_Specification): Analyze Iterator
filter when present.
(Analyze_Loop_Parameter_Specification): Ditto.
* sinfo.adb: Suprogram bodies for new syntactic element
Iterator_Filter.
* sinfo.ads: Add Iterator_Filter to relevant nodes.  Structure
of Component_Association and Iteroted_Component_Association
nodes is modified to take into account the possible  presence of
an iterator specification in the latter.
gcc/ada/exp_ch5.adb
gcc/ada/par-ch4.adb
gcc/ada/par-ch5.adb
gcc/ada/par.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_ch5.adb
gcc/ada/sinfo.adb
gcc/ada/sinfo.ads