Skip to content

Commit

Permalink
Fix CallStmt parameters aligment when breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CKMonika committed Jul 15, 2024
1 parent a78dc0f commit 6961814
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 3 deletions.
9 changes: 6 additions & 3 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,11 @@
"text": "("
},
{
"kind": "recurse_field",
"field": "f_suffix"
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_suffix"
}
},
{
"kind": "text",
Expand Down Expand Up @@ -5857,4 +5860,4 @@
}
},
"max_empty_lines": 1
}
}
5 changes: 5 additions & 0 deletions testsuite/tests/unparsing/call_stmt/param_align/input.ada
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Foo
(AAAA => Foo_1,
BB => Foo_2,
CCCCCCC => Foo_3,
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD => 7);
5 changes: 5 additions & 0 deletions testsuite/tests/unparsing/call_stmt/param_align/test.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Foo
(AAAA => Foo_1,
BB => Foo_2,
CCCCCCC => Foo_3,
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD => 7);
6 changes: 6 additions & 0 deletions testsuite/tests/unparsing/call_stmt/param_align/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
driver: unparser
rule: stmt
description: |
Base test for a `CallStmt`. Tests that if the statement is too long, the
underlying `CallExpr` breaks. Additionally, this test checks this behaviour
when the `;` is at the line length limit.

0 comments on commit 6961814

Please sign in to comment.