Skip to content

Commit

Permalink
Add AbstractSubpDecl configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
CKMonika committed Jul 15, 2024
1 parent b4e3091 commit a0b7d4b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
38 changes: 38 additions & 0 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,44 @@
}
}
},
"AbstractSubpDecl": {
"node": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_overriding"
},
{
"kind": "recurse_field",
"field": "f_subp_spec"
},
"line",
{
"kind": "text",
"text": "is"
},
{
"kind": "text",
"text": "abstract"
},
{
"kind": "recurse_field",
"field": "f_aspects"
},
{
"kind": "text",
"text": ";"
}
]
},
"fields": {
"f_aspects": [
"hardlineWithoutBreakParent",
"recurse"
]
}
},
"AcceptStmt": {
"node": {
"kind": "group",
Expand Down
3 changes: 3 additions & 0 deletions testsuite/tests/unparsing/subp_decl/abstract/input.ada
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
procedure Take(Element : out Element_Type;
From : in out Set) is abstract;

1 change: 1 addition & 0 deletions testsuite/tests/unparsing/subp_decl/abstract/test.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
procedure Take (Element : out Element_Type; From : in out Set) is abstract;
5 changes: 5 additions & 0 deletions testsuite/tests/unparsing/subp_decl/abstract/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
driver: unparser
rule: subp_decl
description: |
Test that no line break is added after the `f_overriding` fields when the
declaration fits in one line.

0 comments on commit a0b7d4b

Please sign in to comment.