Skip to content

Commit

Permalink
Remove blank line before end keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopsazevedo committed May 2, 2024
1 parent c3690c7 commit 449c0e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pp-formatting.adb
Original file line number Diff line number Diff line change
Expand Up @@ -4239,7 +4239,10 @@ package body Pp.Formatting is
or else (not Insert_Blank_Lines (Cmd)
and then Kind (Src_Tok) /= End_Of_Input)
or else Prev_Prev_Tok_Kind in Comment_Kind
or else Prev_Prev_Tok_Kind in ';'
or else
(Prev_Prev_Tok_Kind in ';'
and then Next_Tok_Kind not in Nil
and then Kind (Src_Tok) not in Res_End)
or else Next_Tok_Kind in Comment_Kind
then
Append_Temp_Line_Break
Expand Down
2 changes: 2 additions & 0 deletions testsuite/tests/pp/U206-003/expected/ramsim.ads
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package RAMSim is
new Bus_Device (Vendor_Id, Device_Id, Port, Native_Endian) with record
Controller : RAMsim_Control;
end record;

-- A comment about RAMsim_Ref before

type RAMsim_Ref is access all RAMsim_Device'Class;
Expand All @@ -24,6 +25,7 @@ package RAMSim is
-- A comment about Device_Setup
overriding procedure Device_Setup
(Self : in out RAMsim_Device);

-- A comment about ..
overriding procedure Device_Init
(Self : in out RAMsim_Device);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package My_Package is
type My_Enum is
(Value_A,
Value_B);

subtype My_Subtype is -- Some comment
Mode range Some_Value_A .. Some_Value_B;
end My_Package;
1 change: 1 addition & 0 deletions testsuite/tests/pp/VC19-020/test.out
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ procedure Main is
Static_Predicate =>
First_Dozen in
1 .. 2 | 3 | 4 | 5 .. 6 | 7 .. 8 | 9 .. 10 | 11 .. 12 | 13 .. 14;

function Valid_Response_Code
(Val : RFLX.RFLX_Types.Base_Integer) return Boolean is
(Val in
Expand Down

0 comments on commit 449c0e7

Please sign in to comment.