Skip to content

Commit

Permalink
Improve TypeAccessDef on SubpSpec nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopsazevedo committed Aug 2, 2024
1 parent 6983f44 commit 21fbaa5
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 18 deletions.
10 changes: 8 additions & 2 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5833,8 +5833,14 @@
"field": "f_has_constant"
},
{
"kind": "recurse_field",
"field": "f_subtype_indication"
"kind": "continuationLineIndent",
"contents": [
"line",
{
"kind": "recurse_field",
"field": "f_subtype_indication"
}
]
}
]
}
Expand Down
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);
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);
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.

This file was deleted.

This file was deleted.

This file was deleted.

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);

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);
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.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
type Aaaaaaaa is
access BBBBBBBBBBBbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
access
BBBBBBBBBBBbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
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.

0 comments on commit 21fbaa5

Please sign in to comment.