From e4496b77fc153ae99cb74358011a4e7d1f6855a6 Mon Sep 17 00:00:00 2001 From: Joao Azevedo Date: Thu, 21 Mar 2024 16:21:17 +0000 Subject: [PATCH] Unparsing: add confirguration for ExtendedReturnStmt --- extensions/default_unparsing_config.json | 182 +++++++- .../long/doc-baseline.json | 421 ++++++++++++++++++ .../extended_return_stmt/long/input.ada | 5 + .../extended_return_stmt/long/test.out | 6 + .../extended_return_stmt/long/test.yaml | 4 + .../no_stmts/doc-baseline.json | 277 ++++++++++++ .../extended_return_stmt/no_stmts/input.ada | 1 + .../extended_return_stmt/no_stmts/test.out | 1 + .../extended_return_stmt/no_stmts/test.yaml | 4 + .../short/doc-baseline.json | 381 ++++++++++++++++ .../extended_return_stmt/short/input.ada | 4 + .../extended_return_stmt/short/test.out | 5 + .../extended_return_stmt/short/test.yaml | 4 + 13 files changed, 1290 insertions(+), 5 deletions(-) create mode 100644 testsuite/tests/unparsing/extended_return_stmt/long/doc-baseline.json create mode 100644 testsuite/tests/unparsing/extended_return_stmt/long/input.ada create mode 100644 testsuite/tests/unparsing/extended_return_stmt/long/test.out create mode 100644 testsuite/tests/unparsing/extended_return_stmt/long/test.yaml create mode 100644 testsuite/tests/unparsing/extended_return_stmt/no_stmts/doc-baseline.json create mode 100644 testsuite/tests/unparsing/extended_return_stmt/no_stmts/input.ada create mode 100644 testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.out create mode 100644 testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.yaml create mode 100644 testsuite/tests/unparsing/extended_return_stmt/short/doc-baseline.json create mode 100644 testsuite/tests/unparsing/extended_return_stmt/short/input.ada create mode 100644 testsuite/tests/unparsing/extended_return_stmt/short/test.out create mode 100644 testsuite/tests/unparsing/extended_return_stmt/short/test.yaml diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index 797c4ec90..878f84435 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -1133,6 +1133,12 @@ ] } }, + "ElsifExprPartList": { + "sep": [ + "hardline", + "recurse" + ] + }, "ExprFunction": { "node": { "kind": "group", @@ -1190,11 +1196,177 @@ ] } }, - "ElsifExprPartList": { - "sep": [ - "hardline", - "recurse" - ] + "ExtendedReturnStmtObjectDecl": { + "node": { + "kind": "group", + "document": [ + { + "kind": "group", + "document": [ + { + "kind": "group", + "document": { + "kind": "recurse_field", + "field": "f_ids" + } + }, + "whitespace", + { + "kind": "text", + "text": ":" + }, + { + "kind": "align", + "width": 2, + "contents": [ + "line", + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_has_aliased" + }, + { + "kind": "recurse_field", + "field": "f_has_constant" + }, + { + "kind": "recurse_field", + "field": "f_mode" + }, + { + "kind": "recurse_field", + "field": "f_type_expr" + } + ] + } + ] + } + ], + "id": "name_and_type" + }, + { + "kind": "ifBreak", + "breakContents": { + "kind": "align", + "width": 4, + "contents": { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_default_expr" + }, + { + "kind": "recurse_field", + "field": "f_renaming_clause" + }, + { + "kind": "recurse_field", + "field": "f_aspects" + } + ] + } + }, + "flatContents": { + "kind": "align", + "width": 2, + "contents": { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_default_expr" + }, + { + "kind": "recurse_field", + "field": "f_renaming_clause" + }, + { + "kind": "recurse_field", + "field": "f_aspects" + } + ] + } + }, + "groupId": "name_and_type" + } + ] + }, + "fields": { + "f_default_expr": [ + "whitespace", + { + "kind": "text", + "text": ":=" + }, + "line", + "recurse" + ] + } + }, + "ExtendedReturnStmt": { + "node": { + "kind": "group", + "document": [ + { + "kind": "group", + "document": [ + { + "kind": "group", + "document": { + "kind": "indent", + "contents": [ + { + "kind": "text", + "text": "return" + }, + "line", + { + "kind": "recurse_field", + "field": "f_decl" + } + ] + } + }, + { + "kind": "recurse_field", + "field": "f_stmts" + } + ] + }, + { + "kind": "text", + "text": ";" + } + ] + }, + "fields": { + "f_stmts": [ + "hardline", + { + "kind": "group", + "document": [ + { + "kind": "text", + "text": "do" + }, + "recurse", + "hardlineWithoutBreakParent", + { + "kind": "text", + "text": "end" + }, + "whitespace", + { + "kind": "text", + "text": "return" + } + ] + } + ] + } }, "FloatingPointDef": { "node": { diff --git a/testsuite/tests/unparsing/extended_return_stmt/long/doc-baseline.json b/testsuite/tests/unparsing/extended_return_stmt/long/doc-baseline.json new file mode 100644 index 000000000..d12036686 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/long/doc-baseline.json @@ -0,0 +1,421 @@ +{ + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 52, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 51, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 29, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 28, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "return" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 27, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 26, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 3, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 2, + "kind": "text", + "text": "Foo" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 4, + "kind": "text", + "text": " :" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 9, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 25, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 18, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "text", + "text": " :=" + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 15, + "kind": "text", + "text": "Bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 24, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 23, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 22, + "kind": "list", + "list": [ + { + "id": 19, + "kind": "text", + "text": " :=" + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 21, + "kind": "text", + "text": "Bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 33, + "kind": "list", + "list": [ + { + "id": 31, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 49, + "kind": "list", + "list": [ + { + "id": 34, + "kind": "text", + "text": "do" + }, + { + "id": 46, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 45, + "kind": "list", + "list": [ + { + "id": 44, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 43, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "list", + "list": [ + { + "id": 35, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 38, + "kind": "text", + "text": "null;" + }, + { + "id": 41, + "kind": "list", + "list": [ + { + "id": 39, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 40, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 42, + "kind": "text", + "text": "null;" + } + ] + } + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 47, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 48, + "kind": "text", + "text": "end return" + } + ] + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 53, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/extended_return_stmt/long/input.ada b/testsuite/tests/unparsing/extended_return_stmt/long/input.ada new file mode 100644 index 000000000..23749a835 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/long/input.ada @@ -0,0 +1,5 @@ +return Foo : Bar := Bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +do + null; + null; +end return; diff --git a/testsuite/tests/unparsing/extended_return_stmt/long/test.out b/testsuite/tests/unparsing/extended_return_stmt/long/test.out new file mode 100644 index 000000000..d292a0a96 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/long/test.out @@ -0,0 +1,6 @@ +return + Foo : Bar := Bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +do + null; + null; +end return; diff --git a/testsuite/tests/unparsing/extended_return_stmt/long/test.yaml b/testsuite/tests/unparsing/extended_return_stmt/long/test.yaml new file mode 100644 index 000000000..5a7fc7881 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/long/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: stmt +description: | + Test that there is a line break before `f_decl`. diff --git a/testsuite/tests/unparsing/extended_return_stmt/no_stmts/doc-baseline.json b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/doc-baseline.json new file mode 100644 index 000000000..9c601e9cc --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/doc-baseline.json @@ -0,0 +1,277 @@ +{ + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 32, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 31, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 29, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 28, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "return" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 27, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 26, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 3, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 2, + "kind": "text", + "text": "Foo" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 4, + "kind": "text", + "text": " :" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 9, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 25, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 18, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "text", + "text": " :=" + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 15, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 24, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 23, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 22, + "kind": "list", + "list": [ + { + "id": 19, + "kind": "text", + "text": " :=" + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 21, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 33, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/extended_return_stmt/no_stmts/input.ada b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/input.ada new file mode 100644 index 000000000..3f857ec98 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/input.ada @@ -0,0 +1 @@ +return Foo:Bar:=Baz; diff --git a/testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.out b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.out new file mode 100644 index 000000000..a54a089e0 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.out @@ -0,0 +1 @@ +return Foo : Bar := Baz; diff --git a/testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.yaml b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.yaml new file mode 100644 index 000000000..66b26ae9a --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/no_stmts/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: stmt +description: | + Test that there is not line break before `f_decl`. diff --git a/testsuite/tests/unparsing/extended_return_stmt/short/doc-baseline.json b/testsuite/tests/unparsing/extended_return_stmt/short/doc-baseline.json new file mode 100644 index 000000000..67cea7471 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/short/doc-baseline.json @@ -0,0 +1,381 @@ +{ + "id": 49, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 48, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 45, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 23, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 22, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "return" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 3, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 2, + "kind": "text", + "text": "Foo" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 4, + "kind": "text", + "text": " :" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 9, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 15, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 18, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 27, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 26, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 44, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 43, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "text", + "text": "do" + }, + { + "id": 40, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + { + "id": 38, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 37, + "kind": "list", + "list": [ + { + "id": 31, + "kind": "list", + "list": [ + { + "id": 29, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 32, + "kind": "text", + "text": "null;" + }, + { + "id": 35, + "kind": "list", + "list": [ + { + "id": 33, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 36, + "kind": "text", + "text": "null;" + } + ] + } + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 41, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 42, + "kind": "text", + "text": "end return" + } + ] + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 47, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/extended_return_stmt/short/input.ada b/testsuite/tests/unparsing/extended_return_stmt/short/input.ada new file mode 100644 index 000000000..076192eec --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/short/input.ada @@ -0,0 +1,4 @@ +return Foo : Bar do + null; + null; +end return; diff --git a/testsuite/tests/unparsing/extended_return_stmt/short/test.out b/testsuite/tests/unparsing/extended_return_stmt/short/test.out new file mode 100644 index 000000000..b317eff35 --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/short/test.out @@ -0,0 +1,5 @@ +return Foo : Bar +do + null; + null; +end return; diff --git a/testsuite/tests/unparsing/extended_return_stmt/short/test.yaml b/testsuite/tests/unparsing/extended_return_stmt/short/test.yaml new file mode 100644 index 000000000..66b26ae9a --- /dev/null +++ b/testsuite/tests/unparsing/extended_return_stmt/short/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: stmt +description: | + Test that there is not line break before `f_decl`.