-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gnatformat-issue_57' into 'master'
Improve TypeAccessDef on SubpSpec nodes Closes eng/ide/gnatformat#57 See merge request eng/libadalang/libadalang!1725
- Loading branch information
Showing
12 changed files
with
49 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
testsuite/tests/unparsing/anonymous_type_decl/access_type/long_not_null_access/input.ada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
procedure Initialize | ||
(Self : in out Default_Message_Handler'Class; | ||
Handler : | ||
not null access LSP.Server_Message_Visitors.Server_Message_Visitor'Classss; | ||
Priority : LSP.Server_Jobs.Job_Priority := LSP.Server_Jobs.Fence); |
6 changes: 6 additions & 0 deletions
6
testsuite/tests/unparsing/anonymous_type_decl/access_type/long_not_null_access/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
procedure Initialize | ||
(Self : in out Default_Message_Handler'Class; | ||
Handler : | ||
not null access | ||
LSP.Server_Message_Visitors.Server_Message_Visitor'Classss; | ||
Priority : LSP.Server_Jobs.Job_Priority := LSP.Server_Jobs.Fence); |
6 changes: 6 additions & 0 deletions
6
testsuite/tests/unparsing/anonymous_type_decl/access_type/long_not_null_access/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
driver: unparser | ||
rule: subp_decl | ||
description: | | ||
This test checks the formatting of a long not null anonymous access type | ||
declaration. It is expected a line break after the `access` token and that | ||
`f_subtype_indication` is continuation line indented. |
1 change: 0 additions & 1 deletion
1
testsuite/tests/unparsing/anonymous_type_decl/access_type/not_null_access/input.ada
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
testsuite/tests/unparsing/anonymous_type_decl/access_type/not_null_access/test.out
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
testsuite/tests/unparsing/anonymous_type_decl/access_type/not_null_access/test.yaml
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
testsuite/tests/unparsing/anonymous_type_decl/access_type/short_not_null_access/input.ada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
procedure Initialize | ||
(Self : in out Default_Message_Handler'Class; | ||
Handler : | ||
not null access LSP.Server_Message_Visitors.Server_Message_Visitor'Class; | ||
Priority : LSP.Server_Jobs.Job_Priority := LSP.Server_Jobs.Fence); | ||
|
5 changes: 5 additions & 0 deletions
5
testsuite/tests/unparsing/anonymous_type_decl/access_type/short_not_null_access/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
procedure Initialize | ||
(Self : in out Default_Message_Handler'Class; | ||
Handler : | ||
not null access LSP.Server_Message_Visitors.Server_Message_Visitor'Class; | ||
Priority : LSP.Server_Jobs.Job_Priority := LSP.Server_Jobs.Fence); |
5 changes: 5 additions & 0 deletions
5
testsuite/tests/unparsing/anonymous_type_decl/access_type/short_not_null_access/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
driver: unparser | ||
rule: subp_decl | ||
description: | | ||
This test checks the formatting of a simple not null anonymous access type | ||
declaration. It is expected the declaration stays on a single line. |
3 changes: 2 additions & 1 deletion
3
testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
type Aaaaaaaa is | ||
access BBBBBBBBBBBbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; | ||
access | ||
BBBBBBBBBBBbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; |
12 changes: 6 additions & 6 deletions
12
testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
description: | | ||
This test checks the formatting of a simple access type declaration | ||
having a long subtype indication. | ||
It is expected the declaration be splitted after `is` keyword and | ||
the new line be indented with a line continuation indentation. | ||
driver: unparser | ||
rule: type_decl | ||
description: | | ||
This test checks the formatting of a simple access type declaration having a | ||
long subtype indication. It is expected the declaration be splitted after | ||
`is` keyword and the new line be indented with a line continuation | ||
indentation. It is also expected a line break before `f_subtype_indication` | ||
and for it to also be continuation line indented. |