comparison gcc/ada/par-ch12.adb @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
4 -- -- 4 -- --
5 -- P A R . C H 1 2 -- 5 -- P A R . C H 1 2 --
6 -- -- 6 -- --
7 -- B o d y -- 7 -- B o d y --
8 -- -- 8 -- --
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- 9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
300 -- indented from the subprogram token. Otherwise assume missing 300 -- indented from the subprogram token. Otherwise assume missing
301 -- semicolon (which will be diagnosed by caller) and no generic part 301 -- semicolon (which will be diagnosed by caller) and no generic part
302 302
303 elsif Token /= Tok_Left_Paren 303 elsif Token /= Tok_Left_Paren
304 and then Token_Is_At_Start_Of_Line 304 and then Token_Is_At_Start_Of_Line
305 and then Start_Column <= Scope.Table (Scope.Last).Ecol 305 and then Start_Column <= Scopes (Scope.Last).Ecol
306 then 306 then
307 return No_List; 307 return No_List;
308 308
309 -- Otherwise we have a generic actual part (either a left paren is 309 -- Otherwise we have a generic actual part (either a left paren is
310 -- present, or we have decided that there must be a missing left paren) 310 -- present, or we have decided that there must be a missing left paren)
969 Scan; -- past AND 969 Scan; -- past AND
970 end loop; 970 end loop;
971 end if; 971 end if;
972 972
973 if Token = Tok_With then 973 if Token = Tok_With then
974 Scan; -- past WITH 974
975 Set_Private_Present (Def_Node, True); 975 if Ada_Version >= Ada_2020 and Token /= Tok_Private then
976 T_Private; 976 -- Formal type has aspect specifications, parsed later.
977 return Def_Node;
978
979 else
980 Scan; -- past WITH
981 Set_Private_Present (Def_Node, True);
982 T_Private;
983 end if;
977 984
978 elsif Token = Tok_Tagged then 985 elsif Token = Tok_Tagged then
979 Scan; 986 Scan;
980 987
981 if Token = Tok_Private then 988 if Token = Tok_Private then