summaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch3.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/par-ch3.adb')
-rw-r--r--gcc/ada/par-ch3.adb19
1 files changed, 2 insertions, 17 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb
index 54dd5621fd8..ddbf716ea6d 100644
--- a/gcc/ada/par-ch3.adb
+++ b/gcc/ada/par-ch3.adb
@@ -4314,6 +4314,8 @@ package body Ch3 is
Scan_State : Saved_Scan_State;
begin
+ Done := False;
+
if Style_Check then
Style.Check_Indentation;
end if;
@@ -4326,7 +4328,6 @@ package body Ch3 is
=>
Check_Bad_Layout;
Append (P_Subprogram (Pf_Decl_Gins_Pbod_Rnam_Stub_Pexp), Decls);
- Done := False;
when Tok_For =>
Check_Bad_Layout;
@@ -4350,12 +4351,10 @@ package body Ch3 is
Restore_Scan_State (Scan_State);
Append (P_Representation_Clause, Decls);
- Done := False;
when Tok_Generic =>
Check_Bad_Layout;
Append (P_Generic, Decls);
- Done := False;
when Tok_Identifier =>
Check_Bad_Layout;
@@ -4370,7 +4369,6 @@ package body Ch3 is
Token := Tok_Overriding;
Append (P_Subprogram (Pf_Decl_Gins_Pbod_Rnam_Stub_Pexp), Decls);
- Done := False;
-- Normal case, no overriding, or overriding followed by colon
@@ -4381,38 +4379,31 @@ package body Ch3 is
when Tok_Package =>
Check_Bad_Layout;
Append (P_Package (Pf_Decl_Gins_Pbod_Rnam_Stub_Pexp), Decls);
- Done := False;
when Tok_Pragma =>
Append (P_Pragma, Decls);
- Done := False;
when Tok_Protected =>
Check_Bad_Layout;
Scan; -- past PROTECTED
Append (P_Protected, Decls);
- Done := False;
when Tok_Subtype =>
Check_Bad_Layout;
Append (P_Subtype_Declaration, Decls);
- Done := False;
when Tok_Task =>
Check_Bad_Layout;
Scan; -- past TASK
Append (P_Task, Decls);
- Done := False;
when Tok_Type =>
Check_Bad_Layout;
Append (P_Type_Declaration, Decls);
- Done := False;
when Tok_Use =>
Check_Bad_Layout;
P_Use_Clause (Decls);
- Done := False;
when Tok_With =>
Check_Bad_Layout;
@@ -4439,8 +4430,6 @@ package body Ch3 is
-- a declarative list. After discarding the misplaced aspects
-- we can continue the scan.
- Done := False;
-
declare
Dummy_Node : constant Node_Id :=
New_Node (N_Package_Specification, Token_Ptr);
@@ -4533,8 +4522,6 @@ package body Ch3 is
End_Statements (Handled_Statement_Sequence (Body_Node));
end;
- Done := False;
-
else
Done := True;
end if;
@@ -4556,7 +4543,6 @@ package body Ch3 is
-- After discarding the misplaced aspects we can continue the
-- scan.
- Done := False;
else
Restore_Scan_State (Scan_State); -- to END
Done := True;
@@ -4671,7 +4657,6 @@ package body Ch3 is
exception
when Error_Resync =>
Resync_Past_Semicolon;
- Done := False;
end P_Declarative_Items;
----------------------------------