From 00546ee8b48aa283c4856c67d9397c156379f6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Azevedo?= Date: Thu, 29 Feb 2024 13:14:31 +0000 Subject: [PATCH] Unparsing: add config for ExprFunction --- extensions/default_unparsing_config.json | 237 +- .../multiple_long_aspects/doc-baseline.json | 348 +- .../multiple_short_aspects/doc-baseline.json | 305 +- .../multiple_short_aspects/test.out | 4 +- .../everything_long/doc-baseline.json | 626 ++++ .../expr_function/everything_long/input.ada | 3 + .../expr_function/everything_long/test.out | 5 + .../expr_function/everything_long/test.yaml | 6 + .../expr_function/long_spec/doc-baseline.json | 540 +++ .../expr_function/long_spec/input.ada | 1 + .../expr_function/long_spec/test.out | 2 + .../expr_function/long_spec/test.yaml | 4 + .../long_spec_with_aspect/doc-baseline.json | 626 ++++ .../long_spec_with_aspect/input.ada | 3 + .../long_spec_with_aspect/test.out | 3 + .../long_spec_with_aspect/test.yaml | 4 + .../expr_function/short/doc-baseline.json | 540 +++ .../unparsing/expr_function/short/input.ada | 2 + .../unparsing/expr_function/short/test.out | 1 + .../unparsing/expr_function/short/test.yaml | 4 + .../short_with_aspect/doc-baseline.json | 626 ++++ .../expr_function/short_with_aspect/input.ada | 1 + .../expr_function/short_with_aspect/test.out | 2 + .../expr_function/short_with_aspect/test.yaml | 4 + .../empty_formal_part/doc-baseline.json | 393 ++- .../non_empty_formal_part/doc-baseline.json | 2889 ++++++++--------- .../non_empty_formal_part/doc-baseline.json | 2736 ++++++++-------- .../short_names_w_stmts/doc-baseline.json | 286 +- .../package_body/short_names_w_stmts/test.out | 4 +- .../short_names_wo_stmts/doc-baseline.json | 266 +- .../short_names_wo_stmts/test.out | 4 +- .../long_aspect/doc-baseline.json | 288 +- .../package_decl/long_aspect/test.out | 4 +- .../package_decl/long_aspect/test.yaml | 2 +- .../package_decl/long_name/doc-baseline.json | 288 +- .../long_name_and_aspect/doc-baseline.json | 288 +- .../long_name_and_aspect/input.ada | 2 +- .../long_name_and_aspect/test.out | 2 +- .../no_end_name/doc-baseline.json | 286 +- .../package_decl/no_end_name/test.out | 4 +- .../no_private_part/doc-baseline.json | 266 +- .../package_decl/no_private_part/test.out | 4 +- .../short_names/doc-baseline.json | 288 +- .../package_decl/short_names/test.out | 4 +- .../subp_body/no_end_name/doc-baseline.json | 49 +- .../subp_body/with_decls/doc-baseline.json | 49 +- .../subp_body/without_decls/doc-baseline.json | 958 ++++++ .../long_not_overriding/doc-baseline.json | 1227 ++++--- .../long_with_long_aspects/doc-baseline.json | 1353 ++++---- .../long_with_long_aspects/input.ada | 3 +- .../subp_decl/long_with_long_aspects/test.out | 4 +- .../long_with_short_aspects/doc-baseline.json | 1351 ++++---- .../long_with_short_aspects/input.ada | 2 +- .../long_with_short_aspects/test.out | 4 +- .../short_overriding/doc-baseline.json | 1227 ++++--- .../short_with_long_aspects/doc-baseline.json | 1353 ++++---- .../short_with_long_aspects/input.ada | 2 +- .../short_with_long_aspects/test.out | 4 +- 58 files changed, 11464 insertions(+), 8323 deletions(-) create mode 100644 testsuite/tests/unparsing/expr_function/everything_long/doc-baseline.json create mode 100644 testsuite/tests/unparsing/expr_function/everything_long/input.ada create mode 100644 testsuite/tests/unparsing/expr_function/everything_long/test.out create mode 100644 testsuite/tests/unparsing/expr_function/everything_long/test.yaml create mode 100644 testsuite/tests/unparsing/expr_function/long_spec/doc-baseline.json create mode 100644 testsuite/tests/unparsing/expr_function/long_spec/input.ada create mode 100644 testsuite/tests/unparsing/expr_function/long_spec/test.out create mode 100644 testsuite/tests/unparsing/expr_function/long_spec/test.yaml create mode 100644 testsuite/tests/unparsing/expr_function/long_spec_with_aspect/doc-baseline.json create mode 100644 testsuite/tests/unparsing/expr_function/long_spec_with_aspect/input.ada create mode 100644 testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.out create mode 100644 testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.yaml create mode 100644 testsuite/tests/unparsing/expr_function/short/doc-baseline.json create mode 100644 testsuite/tests/unparsing/expr_function/short/input.ada create mode 100644 testsuite/tests/unparsing/expr_function/short/test.out create mode 100644 testsuite/tests/unparsing/expr_function/short/test.yaml create mode 100644 testsuite/tests/unparsing/expr_function/short_with_aspect/doc-baseline.json create mode 100644 testsuite/tests/unparsing/expr_function/short_with_aspect/input.ada create mode 100644 testsuite/tests/unparsing/expr_function/short_with_aspect/test.out create mode 100644 testsuite/tests/unparsing/expr_function/short_with_aspect/test.yaml diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index e260fe49b..d211f0f39 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -57,33 +57,13 @@ "kind": "group", "document": [ { - "kind": "group", - "document": [ - "line", - { - "kind": "text", - "text": "with" - } - ], - "id": "with_keyword" + "kind": "text", + "text": "with" }, { - "kind": "ifBreak", - "breakContents": { - "kind": "align", - "width": 2, - "contents": { - "kind": "group", - "document": [ - "line", - { - "kind": "recurse_field", - "field": "f_aspect_assocs" - } - ] - } - }, - "flatContents": { + "kind": "align", + "width": 2, + "contents": { "kind": "group", "document": [ "line", @@ -92,8 +72,7 @@ "field": "f_aspect_assocs" } ] - }, - "groupId": "with_keyword" + } } ] } @@ -511,12 +490,8 @@ "field": "f_default_expr" }, { - "kind": "align", - "width": 2, - "contents": { - "kind": "recurse_field", - "field": "f_aspects" - } + "kind": "recurse_field", + "field": "f_aspects" }, { "kind": "text", @@ -526,6 +501,10 @@ } }, "fields": { + "f_aspects": [ + "hardline", + "recurse" + ], "f_default_expr": [ "whitespace", "recurse" @@ -823,6 +802,63 @@ ] } }, + "ExprFunction": { + "node": { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_overriding" + }, + { + "kind": "group", + "document": [ + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_subp_spec" + }, + "line", + { + "kind": "group", + "document": [ + { + "kind": "text", + "text": "is" + }, + "whitespace", + { + "kind": "indent", + "contents": { + "kind": "recurse_field", + "field": "f_expr" + } + } + ] + } + ] + }, + { + "kind": "recurse_field", + "field": "f_aspects" + }, + { + "kind": "text", + "text": ";" + } + ] + } + ] + }, + "fields": { + "f_aspects": [ + "hardline", + "recurse" + ] + } + }, "ElsifExprPartList": { "sep": [ "recurse", @@ -1547,34 +1583,22 @@ "kind": "group", "document": [ { - "kind": "group", - "document": { - "kind": "group", - "document": [ - { - "kind": "text", - "text": "package" - }, - "whitespace", - { - "kind": "text", - "text": "body" - }, - "whitespace", - { - "kind": "recurse_field", - "field": "f_package_name" - }, - { - "kind": "align", - "width": 2, - "contents": { - "kind": "recurse_field", - "field": "f_aspects" - } - } - ] - } + "kind": "text", + "text": "package" + }, + "whitespace", + { + "kind": "text", + "text": "body" + }, + "whitespace", + { + "kind": "recurse_field", + "field": "f_package_name" + }, + { + "kind": "recurse_field", + "field": "f_aspects" }, "line", { @@ -1612,6 +1636,14 @@ } ], "fields": { + "f_aspects": { + "kind": "align", + "width": 2, + "contents": [ + "hardline", + "recurse" + ] + }, "f_stmts": [ { "kind": "indent", @@ -1630,29 +1662,17 @@ "kind": "group", "document": [ { - "kind": "group", - "document": { - "kind": "group", - "document": [ - { - "kind": "text", - "text": "package" - }, - "whitespace", - { - "kind": "recurse_field", - "field": "f_package_name" - }, - { - "kind": "align", - "width": 2, - "contents": { - "kind": "recurse_field", - "field": "f_aspects" - } - } - ] - } + "kind": "text", + "text": "package" + }, + "whitespace", + { + "kind": "recurse_field", + "field": "f_package_name" + }, + { + "kind": "recurse_field", + "field": "f_aspects" }, "line", { @@ -1690,6 +1710,16 @@ } ], "fields": { + "f_aspects": [ + { + "kind": "align", + "width": 2, + "contents": [ + "hardline", + "recurse" + ] + } + ], "f_private_part": [ { "kind": "indent", @@ -2109,12 +2139,8 @@ "field": "f_subp_spec" }, { - "kind": "align", - "width": 2, - "contents": { - "kind": "recurse_field", - "field": "f_aspects" - } + "kind": "recurse_field", + "field": "f_aspects" }, "hardlineWithoutBreakParent", { @@ -2155,6 +2181,10 @@ ] }, "fields": { + "f_aspects": [ + "hardline", + "recurse" + ], "f_decls": [ { "kind": "indent", @@ -2176,22 +2206,29 @@ "field": "f_overriding" }, { - "kind": "recurse_field", - "field": "f_subp_spec" - }, - { - "kind": "align", - "width": 2, - "contents": { - "kind": "recurse_field", - "field": "f_aspects" - } + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_subp_spec" + }, + { + "kind": "recurse_field", + "field": "f_aspects" + } + ] }, { "kind": "text", "text": ";" } ] + }, + "fields": { + "f_aspects": [ + "hardline", + "recurse" + ] } }, "SubpSpec": { diff --git a/testsuite/tests/unparsing/aspect_spec/multiple_long_aspects/doc-baseline.json b/testsuite/tests/unparsing/aspect_spec/multiple_long_aspects/doc-baseline.json index 90ecec18f..af37593a0 100644 --- a/testsuite/tests/unparsing/aspect_spec/multiple_long_aspects/doc-baseline.json +++ b/testsuite/tests/unparsing/aspect_spec/multiple_long_aspects/doc-baseline.json @@ -1,249 +1,157 @@ { - "id": 43, + "id": 32, "kind": "list", "list": [ { - "id": 32, + "id": 21, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 31, + "id": 20, "kind": "list", "list": [ { - "id": 28, + "id": 0, + "kind": "text", + "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + }, + { + "id": 17, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 27, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 26, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 25, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 24, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 23, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } }, - "break": false, - "expandedStates": null - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 21, + { + "id": 6, + "kind": "text", + "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar," + }, + { + "id": 7, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 13, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 14, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar," - }, - { - "id": 15, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 16, - "kind": "text", - "text": "Baz," - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "Quuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuux" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 12, + { + "id": 8, + "kind": "text", + "text": "Baz," + }, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar," - }, - { - "id": 7, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 8, - "kind": "text", - "text": "Baz," - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Quuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuux" - } - ] - }, - "break": false, - "expandedStates": null + "command": "line", + "literal": false, + "soft": false, + "hard": false } + }, + { + "id": 10, + "kind": "text", + "text": "Quuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuux" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 29, + "id": 18, "kind": "command", "command": { "command": "line", @@ -253,31 +161,31 @@ } }, { - "id": 30, + "id": 19, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 38, + "id": 27, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 37, + "id": 26, "kind": "list", "list": [ { - "id": 35, + "id": 24, "kind": "list", "list": [ { - "id": 33, + "id": 22, "kind": "command", "command": { "command": "line", @@ -287,7 +195,7 @@ } }, { - "id": 34, + "id": 23, "kind": "command", "command": { "command": "breakParent" @@ -296,7 +204,7 @@ ] }, { - "id": 36, + "id": 25, "kind": "text", "text": "type Corge;" } @@ -305,11 +213,11 @@ } }, { - "id": 41, + "id": 30, "kind": "list", "list": [ { - "id": 39, + "id": 28, "kind": "command", "command": { "command": "line", @@ -319,7 +227,7 @@ } }, { - "id": 40, + "id": 29, "kind": "command", "command": { "command": "breakParent" @@ -328,7 +236,7 @@ ] }, { - "id": 42, + "id": 31, "kind": "text", "text": "end Foo;" } diff --git a/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/doc-baseline.json b/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/doc-baseline.json index 49115e95b..666516723 100644 --- a/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/doc-baseline.json +++ b/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/doc-baseline.json @@ -1,219 +1,142 @@ { - "id": 39, + "id": 30, "kind": "list", "list": [ { - "id": 28, + "id": 19, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 27, + "id": 18, "kind": "list", "list": [ { - "id": 24, + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 15, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 23, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 22, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 21, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 20, + { + "id": 11, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 18, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 17, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 9, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 16, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 11, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 12, - "kind": "text", - "text": "Bar," - }, - { - "id": 13, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 14, - "kind": "text", - "text": "Baz" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 10, + { + "id": 6, + "kind": "text", + "text": "Bar," + }, + { + "id": 7, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 9, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Bar," - }, - { - "id": 7, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 8, - "kind": "text", - "text": "Baz" - } - ] - }, - "break": false, - "expandedStates": null + "command": "line", + "literal": false, + "soft": false, + "hard": false } + }, + { + "id": 8, + "kind": "text", + "text": "Baz" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 25, + "id": 16, "kind": "command", "command": { "command": "line", @@ -223,31 +146,31 @@ } }, { - "id": 26, + "id": 17, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 34, + "id": 25, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 33, + "id": 24, "kind": "list", "list": [ { - "id": 31, + "id": 22, "kind": "list", "list": [ { - "id": 29, + "id": 20, "kind": "command", "command": { "command": "line", @@ -257,7 +180,7 @@ } }, { - "id": 30, + "id": 21, "kind": "command", "command": { "command": "breakParent" @@ -266,7 +189,7 @@ ] }, { - "id": 32, + "id": 23, "kind": "text", "text": "type Qux;" } @@ -275,11 +198,11 @@ } }, { - "id": 37, + "id": 28, "kind": "list", "list": [ { - "id": 35, + "id": 26, "kind": "command", "command": { "command": "line", @@ -289,7 +212,7 @@ } }, { - "id": 36, + "id": 27, "kind": "command", "command": { "command": "breakParent" @@ -298,7 +221,7 @@ ] }, { - "id": 38, + "id": 29, "kind": "text", "text": "end Foo;" } diff --git a/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/test.out b/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/test.out index 88c42d313..36df46905 100644 --- a/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/test.out +++ b/testsuite/tests/unparsing/aspect_spec/multiple_short_aspects/test.out @@ -1,3 +1,5 @@ -package Foo with Bar, Baz is +package Foo + with Bar, Baz +is type Qux; end Foo; diff --git a/testsuite/tests/unparsing/expr_function/everything_long/doc-baseline.json b/testsuite/tests/unparsing/expr_function/everything_long/doc-baseline.json new file mode 100644 index 000000000..86a7f1f18 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/everything_long/doc-baseline.json @@ -0,0 +1,626 @@ +{ + "id": 78, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 77, + "kind": "list", + "list": [ + { + "id": 76, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 75, + "kind": "list", + "list": [ + { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 36, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 35, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "function Foooooooooooooooooooooooooo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 33, + "kind": "list", + "list": [ + { + "id": 27, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 26, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 25, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 23, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 24, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 29, + "kind": "text", + "text": "return Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 60, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 59, + "kind": "list", + "list": [ + { + "id": 39, + "kind": "text", + "text": "is " + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 57, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 56, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 55, + "kind": "list", + "list": [ + { + "id": 40, + "kind": "text", + "text": "(" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 46, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "text", + "text": "B" + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 43, + "kind": "text", + "text": ".Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 49, + "kind": "text", + "text": "/= " + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 50, + "kind": "text", + "text": "nulllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll" + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 54, + "kind": "text", + "text": ")" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 65, + "kind": "list", + "list": [ + { + "id": 63, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 64, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 73, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 72, + "kind": "list", + "list": [ + { + "id": 66, + "kind": "text", + "text": "with" + }, + { + "id": 71, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "list", + "list": [ + { + "id": 67, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 68, + "kind": "text", + "text": "Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 74, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/expr_function/everything_long/input.ada b/testsuite/tests/unparsing/expr_function/everything_long/input.ada new file mode 100644 index 000000000..7979a6150 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/everything_long/input.ada @@ -0,0 +1,3 @@ +function Foooooooooooooooooooooooooo (B : Bar) return Baz +is (B.Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy /= nulllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll) +with Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed; diff --git a/testsuite/tests/unparsing/expr_function/everything_long/test.out b/testsuite/tests/unparsing/expr_function/everything_long/test.out new file mode 100644 index 000000000..4740dc94a --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/everything_long/test.out @@ -0,0 +1,5 @@ +function Foooooooooooooooooooooooooo (B : Bar) return Baz +is (B.Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy + /= nulllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll) +with + Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed; diff --git a/testsuite/tests/unparsing/expr_function/everything_long/test.yaml b/testsuite/tests/unparsing/expr_function/everything_long/test.yaml new file mode 100644 index 000000000..000a1ace9 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/everything_long/test.yaml @@ -0,0 +1,6 @@ +driver: unparser +rule: expr_fn +description: | + Test all line breaks: before `is`, before and after `with` and before `/=`. + Test the continuation line indentation on the aspect. + Test the indentation of `f_expr`. diff --git a/testsuite/tests/unparsing/expr_function/long_spec/doc-baseline.json b/testsuite/tests/unparsing/expr_function/long_spec/doc-baseline.json new file mode 100644 index 000000000..4cd319d32 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec/doc-baseline.json @@ -0,0 +1,540 @@ +{ + "id": 67, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 66, + "kind": "list", + "list": [ + { + "id": 65, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 64, + "kind": "list", + "list": [ + { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 36, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 35, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "function Foooooooooooooooooooooooooo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 33, + "kind": "list", + "list": [ + { + "id": 27, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 26, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 25, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 23, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 24, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 29, + "kind": "text", + "text": "return Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 60, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 59, + "kind": "list", + "list": [ + { + "id": 39, + "kind": "text", + "text": "is " + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 57, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 56, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 55, + "kind": "list", + "list": [ + { + "id": 40, + "kind": "text", + "text": "(" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 46, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "text", + "text": "B" + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 43, + "kind": "text", + "text": ".Garply" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 49, + "kind": "text", + "text": "/= " + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 50, + "kind": "text", + "text": "null" + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 54, + "kind": "text", + "text": ")" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 63, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/expr_function/long_spec/input.ada b/testsuite/tests/unparsing/expr_function/long_spec/input.ada new file mode 100644 index 000000000..70ab2c915 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec/input.ada @@ -0,0 +1 @@ +function Foooooooooooooooooooooooooo (B : Bar) return Baz is (B.Garply /= null); diff --git a/testsuite/tests/unparsing/expr_function/long_spec/test.out b/testsuite/tests/unparsing/expr_function/long_spec/test.out new file mode 100644 index 000000000..cf20a69fd --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec/test.out @@ -0,0 +1,2 @@ +function Foooooooooooooooooooooooooo (B : Bar) return Baz +is (B.Garply /= null); diff --git a/testsuite/tests/unparsing/expr_function/long_spec/test.yaml b/testsuite/tests/unparsing/expr_function/long_spec/test.yaml new file mode 100644 index 000000000..8120c88e8 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: expr_fn +description: | + Test the linebreak before the `is` keyword. diff --git a/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/doc-baseline.json b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/doc-baseline.json new file mode 100644 index 000000000..13d517dbc --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/doc-baseline.json @@ -0,0 +1,626 @@ +{ + "id": 78, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 77, + "kind": "list", + "list": [ + { + "id": 76, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 75, + "kind": "list", + "list": [ + { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 36, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 35, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "function Foooooooooooooooooooooooooo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 33, + "kind": "list", + "list": [ + { + "id": 27, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 26, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 25, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 23, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 24, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 29, + "kind": "text", + "text": "return Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 60, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 59, + "kind": "list", + "list": [ + { + "id": 39, + "kind": "text", + "text": "is " + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 57, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 56, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 55, + "kind": "list", + "list": [ + { + "id": 40, + "kind": "text", + "text": "(" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 46, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "text", + "text": "B" + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 43, + "kind": "text", + "text": ".Garplyy" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 49, + "kind": "text", + "text": "/= " + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 50, + "kind": "text", + "text": "null" + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 54, + "kind": "text", + "text": ")" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 65, + "kind": "list", + "list": [ + { + "id": 63, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 64, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 73, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 72, + "kind": "list", + "list": [ + { + "id": 66, + "kind": "text", + "text": "with" + }, + { + "id": 71, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "list", + "list": [ + { + "id": 67, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 68, + "kind": "text", + "text": "Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 74, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/input.ada b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/input.ada new file mode 100644 index 000000000..0193e9530 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/input.ada @@ -0,0 +1,3 @@ +function Foooooooooooooooooooooooooo (B : Bar) return Baz +is (B.Garplyy /= null) +with Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed; diff --git a/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.out b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.out new file mode 100644 index 000000000..0193e9530 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.out @@ -0,0 +1,3 @@ +function Foooooooooooooooooooooooooo (B : Bar) return Baz +is (B.Garplyy /= null) +with Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed; diff --git a/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.yaml b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.yaml new file mode 100644 index 000000000..0f7adb7c2 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/long_spec_with_aspect/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: expr_fn +description: | + Test the line break before the `is` keyword and not after the `with` keyword. diff --git a/testsuite/tests/unparsing/expr_function/short/doc-baseline.json b/testsuite/tests/unparsing/expr_function/short/doc-baseline.json new file mode 100644 index 000000000..33d5d9792 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short/doc-baseline.json @@ -0,0 +1,540 @@ +{ + "id": 67, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 66, + "kind": "list", + "list": [ + { + "id": 65, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 64, + "kind": "list", + "list": [ + { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 36, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 35, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "function Foo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 33, + "kind": "list", + "list": [ + { + "id": 27, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 26, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 25, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 23, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 24, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 29, + "kind": "text", + "text": "return Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 60, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 59, + "kind": "list", + "list": [ + { + "id": 39, + "kind": "text", + "text": "is " + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 57, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 56, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 55, + "kind": "list", + "list": [ + { + "id": 40, + "kind": "text", + "text": "(" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 46, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "text", + "text": "B" + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 43, + "kind": "text", + "text": ".Garply" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 49, + "kind": "text", + "text": "/= " + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 50, + "kind": "text", + "text": "null" + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 54, + "kind": "text", + "text": ")" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 63, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/expr_function/short/input.ada b/testsuite/tests/unparsing/expr_function/short/input.ada new file mode 100644 index 000000000..f2b00edcd --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short/input.ada @@ -0,0 +1,2 @@ +function Foo (B : Bar) return Baz +is (B.Garply /= null); diff --git a/testsuite/tests/unparsing/expr_function/short/test.out b/testsuite/tests/unparsing/expr_function/short/test.out new file mode 100644 index 000000000..654cfb5c1 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short/test.out @@ -0,0 +1 @@ +function Foo (B : Bar) return Baz is (B.Garply /= null); diff --git a/testsuite/tests/unparsing/expr_function/short/test.yaml b/testsuite/tests/unparsing/expr_function/short/test.yaml new file mode 100644 index 000000000..7dbd03f7d --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: expr_fn +description: | + Test that there are no line breaks. diff --git a/testsuite/tests/unparsing/expr_function/short_with_aspect/doc-baseline.json b/testsuite/tests/unparsing/expr_function/short_with_aspect/doc-baseline.json new file mode 100644 index 000000000..5e8007042 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short_with_aspect/doc-baseline.json @@ -0,0 +1,626 @@ +{ + "id": 78, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 77, + "kind": "list", + "list": [ + { + "id": 76, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 75, + "kind": "list", + "list": [ + { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 36, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 35, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "function Foo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 33, + "kind": "list", + "list": [ + { + "id": 27, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 26, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 25, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 23, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 24, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 29, + "kind": "text", + "text": "return Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 60, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 59, + "kind": "list", + "list": [ + { + "id": 39, + "kind": "text", + "text": "is " + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 57, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 56, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 55, + "kind": "list", + "list": [ + { + "id": 40, + "kind": "text", + "text": "(" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 46, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "text", + "text": "B" + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 43, + "kind": "text", + "text": ".Garply" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 49, + "kind": "text", + "text": "/= " + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 50, + "kind": "text", + "text": "null" + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 54, + "kind": "text", + "text": ")" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 65, + "kind": "list", + "list": [ + { + "id": 63, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 64, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 73, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 72, + "kind": "list", + "list": [ + { + "id": 66, + "kind": "text", + "text": "with" + }, + { + "id": 71, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "list", + "list": [ + { + "id": 67, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 68, + "kind": "text", + "text": "Freeeeeeeeeeeeeed" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 74, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/expr_function/short_with_aspect/input.ada b/testsuite/tests/unparsing/expr_function/short_with_aspect/input.ada new file mode 100644 index 000000000..e8ed5a495 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short_with_aspect/input.ada @@ -0,0 +1 @@ +function Foo (B : Bar) return Baz is (B.Garply /= null) with Freeeeeeeeeeeeeed; diff --git a/testsuite/tests/unparsing/expr_function/short_with_aspect/test.out b/testsuite/tests/unparsing/expr_function/short_with_aspect/test.out new file mode 100644 index 000000000..071084665 --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short_with_aspect/test.out @@ -0,0 +1,2 @@ +function Foo (B : Bar) return Baz is (B.Garply /= null) +with Freeeeeeeeeeeeeed; diff --git a/testsuite/tests/unparsing/expr_function/short_with_aspect/test.yaml b/testsuite/tests/unparsing/expr_function/short_with_aspect/test.yaml new file mode 100644 index 000000000..7dbd03f7d --- /dev/null +++ b/testsuite/tests/unparsing/expr_function/short_with_aspect/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: expr_fn +description: | + Test that there are no line breaks. diff --git a/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/doc-baseline.json b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/doc-baseline.json index 34e7452ed..35421d56e 100644 --- a/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/doc-baseline.json +++ b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/doc-baseline.json @@ -247,166 +247,244 @@ "kind": "list", "list": [ { - "id": 60, + "id": 62, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 59, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 58, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "text", - "text": "procedure Garply" - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + { + "id": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 57, + "alignContents": { + "id": 59, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 56, + "id": 58, "kind": "list", "list": [ { - "id": 55, + "id": 28, + "kind": "text", + "text": "procedure Garply" + }, + { + "id": 29, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 57, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 54, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 53, - "kind": "list", - "list": [ - { - "id": 30, - "kind": "text", - "text": "(" - }, - { - "id": 51, + "id": 56, + "kind": "list", + "list": [ + { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, "kind": "command", "command": { "command": "align", "alignData": { - "kind": "innerRoot" + "kind": "width", + "n": 1 }, "alignContents": { - "id": 50, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 49, - "kind": "list", - "list": [ - { - "id": 41, + "id": 53, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "text", + "text": "(" + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 50, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 40, + "id": 49, "kind": "list", "list": [ { - "id": 32, + "id": 41, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 31, - "kind": "text", - "text": "G" + "id": 40, + "kind": "list", + "list": [ + { + "id": 32, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 31, + "kind": "text", + "text": "G" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 33, + "kind": "text", + "text": " :" + }, + { + "id": 39, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 38, + "kind": "list", + "list": [ + { + "id": 34, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 37, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 36, + "kind": "list", + "list": [ + { + "id": 35, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 33, - "kind": "text", - "text": " :" - }, - { - "id": 39, + "id": 48, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 38, - "kind": "list", - "list": [ - { - "id": 34, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 46, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 45, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 44, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 37, + "alignContents": { + "id": 43, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 36, + "id": 42, "kind": "list", "list": [ - { - "id": 35, - "kind": "text", - "text": "Foo" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -415,85 +493,23 @@ "break": false, "expandedStates": null } - }, - { - "id": 48, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 47, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 46, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 45, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 44, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 43, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 42, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } } - ] + } }, - "break": false, - "expandedStates": null - } + { + "id": 52, + "kind": "text", + "text": ")" + } + ] } } }, - { - "id": 52, - "kind": "text", - "text": ")" - } - ] + "break": false, + "expandedStates": null + } } - } + ] }, "break": false, "expandedStates": null @@ -505,29 +521,12 @@ "expandedStates": null } } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 62, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 61, - "kind": "list", - "list": [ + } + } ] - } + }, + "break": false, + "expandedStates": null } }, { diff --git a/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/doc-baseline.json b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/doc-baseline.json index b7c723fe5..e81e21d96 100644 --- a/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/doc-baseline.json +++ b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/doc-baseline.json @@ -1,1462 +1,1427 @@ -{ - "id": 182, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 181, - "kind": "list", - "list": [ - { - "id": 105, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 104, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "generic" - }, - { - "id": 103, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 102, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 101, - "kind": "list", - "list": [ - { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 2, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 50, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 49, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 48, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 47, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 43, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 42, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 41, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "function Bar" - }, - { - "id": 7, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 40, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 39, - "kind": "list", - "list": [ - { - "id": 33, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 32, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 31, - "kind": "list", - "list": [ - { - "id": 8, - "kind": "text", - "text": "(" - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 28, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 27, - "kind": "list", - "list": [ - { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 18, - "kind": "list", - "list": [ - { - "id": 10, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 9, - "kind": "text", - "text": "Baz" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 11, - "kind": "text", - "text": " :" - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 16, - "kind": "list", - "list": [ - { - "id": 12, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "list", - "list": [ - { - "id": 13, - "kind": "text", - "text": "Foo" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 26, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 25, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 24, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 23, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 22, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 21, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 20, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "text", - "text": ")" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 38, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 35, - "kind": "text", - "text": "return Boolean" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 45, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 44, - "kind": "list", - "list": [ - ] - } - } - }, - { - "id": 46, - "kind": "text", - "text": ";" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 53, - "kind": "list", - "list": [ - { - "id": 51, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 52, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 100, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 99, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 98, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 97, - "kind": "list", - "list": [ - { - "id": 54, - "kind": "text", - "text": "with" - }, - { - "id": 55, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 93, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 92, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 91, - "kind": "list", - "list": [ - { - "id": 56, - "kind": "text", - "text": "function Baz" - }, - { - "id": 57, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 90, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 89, - "kind": "list", - "list": [ - { - "id": 83, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 82, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 81, - "kind": "list", - "list": [ - { - "id": 58, - "kind": "text", - "text": "(" - }, - { - "id": 79, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 78, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 77, - "kind": "list", - "list": [ - { - "id": 69, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 68, - "kind": "list", - "list": [ - { - "id": 60, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 59, - "kind": "text", - "text": "Qux" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 61, - "kind": "text", - "text": " :" - }, - { - "id": 67, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 66, - "kind": "list", - "list": [ - { - "id": 62, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 65, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 64, - "kind": "list", - "list": [ - { - "id": 63, - "kind": "text", - "text": "Foo" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 76, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 75, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 74, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 73, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 72, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 71, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 70, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 80, - "kind": "text", - "text": ")" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 88, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 87, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 86, - "kind": "list", - "list": [ - { - "id": 84, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 85, - "kind": "text", - "text": "return Boolean" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 95, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 94, - "kind": "list", - "list": [ - ] - } - } - }, - { - "id": 96, - "kind": "text", - "text": ";" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - "break": true, - "expandedStates": null - } - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 108, - "kind": "list", - "list": [ - { - "id": 106, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 107, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 125, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 124, - "kind": "list", - "list": [ - { - "id": 121, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 120, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 119, - "kind": "list", - "list": [ - { - "id": 109, - "kind": "text", - "text": "package " - }, - { - "id": 116, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 115, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 114, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 113, - "kind": "list", - "list": [ - { - "id": 110, - "kind": "text", - "text": "Corge" - }, - { - "id": 111, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": true, - "hard": false - } - }, - { - "id": 112, - "kind": "text", - "text": ".Fred" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - }, - { - "id": 118, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 117, - "kind": "list", - "list": [ - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 122, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 123, - "kind": "text", - "text": "is" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 168, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 167, - "kind": "list", - "list": [ - { - "id": 128, - "kind": "list", - "list": [ - { - "id": 126, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 127, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 166, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 165, - "kind": "list", - "list": [ - { - "id": 161, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 160, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 159, - "kind": "list", - "list": [ - { - "id": 129, - "kind": "text", - "text": "procedure Garply" - }, - { - "id": 130, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 158, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 157, - "kind": "list", - "list": [ - { - "id": 156, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 155, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 154, - "kind": "list", - "list": [ - { - "id": 131, - "kind": "text", - "text": "(" - }, - { - "id": 152, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 151, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 150, - "kind": "list", - "list": [ - { - "id": 142, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 141, - "kind": "list", - "list": [ - { - "id": 133, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 132, - "kind": "text", - "text": "G" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 134, - "kind": "text", - "text": " :" - }, - { - "id": 140, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 139, - "kind": "list", - "list": [ - { - "id": 135, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 138, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 137, - "kind": "list", - "list": [ - { - "id": 136, - "kind": "text", - "text": "Foo" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 149, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 148, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 147, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 146, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 145, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 144, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 143, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 153, - "kind": "text", - "text": ")" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 163, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 162, - "kind": "list", - "list": [ - ] - } - } - }, - { - "id": 164, - "kind": "text", - "text": ";" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 171, - "kind": "list", - "list": [ - { - "id": 169, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 170, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 172, - "kind": "text", - "text": "end" - }, - { - "id": 179, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 178, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 177, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 176, - "kind": "list", - "list": [ - { - "id": 173, - "kind": "text", - "text": " GNATfuzz" - }, - { - "id": 174, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": true, - "hard": false - } - }, - { - "id": 175, - "kind": "text", - "text": ".AFL_Seed_Data_Chunks" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - }, - { - "id": 180, - "kind": "text", - "text": ";" - } - ] - }, - "break": true, - "expandedStates": null - } -} +{ + "id": 178, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 177, + "kind": "list", + "list": [ + { + "id": 101, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 100, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "generic" + }, + { + "id": 99, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 98, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 97, + "kind": "list", + "list": [ + { + "id": 3, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 2, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 46, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 45, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 43, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 42, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 41, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "function Bar" + }, + { + "id": 7, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 40, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 31, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "text", + "text": "(" + }, + { + "id": 29, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 9, + "kind": "text", + "text": "Baz" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 11, + "kind": "text", + "text": " :" + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 26, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 25, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 24, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 23, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 22, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 30, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 37, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 36, + "kind": "list", + "list": [ + { + "id": 34, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 35, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 44, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 51, + "kind": "list", + "list": [ + { + "id": 49, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 96, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 95, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 94, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 93, + "kind": "list", + "list": [ + { + "id": 52, + "kind": "text", + "text": "with" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 91, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 90, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 89, + "kind": "list", + "list": [ + { + "id": 54, + "kind": "text", + "text": "function Baz" + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 88, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 87, + "kind": "list", + "list": [ + { + "id": 81, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 80, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 79, + "kind": "list", + "list": [ + { + "id": 56, + "kind": "text", + "text": "(" + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 76, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 75, + "kind": "list", + "list": [ + { + "id": 67, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 66, + "kind": "list", + "list": [ + { + "id": 58, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 57, + "kind": "text", + "text": "Qux" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 59, + "kind": "text", + "text": " :" + }, + { + "id": 65, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 64, + "kind": "list", + "list": [ + { + "id": 60, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 63, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 62, + "kind": "list", + "list": [ + { + "id": 61, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 74, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 73, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 72, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 71, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 70, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 69, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 68, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 78, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 86, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 85, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 84, + "kind": "list", + "list": [ + { + "id": 82, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 83, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 92, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 104, + "kind": "list", + "list": [ + { + "id": 102, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 103, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 121, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 120, + "kind": "list", + "list": [ + { + "id": 117, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 116, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 115, + "kind": "list", + "list": [ + { + "id": 105, + "kind": "text", + "text": "package " + }, + { + "id": 112, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 111, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 110, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 109, + "kind": "list", + "list": [ + { + "id": 106, + "kind": "text", + "text": "Corge" + }, + { + "id": 107, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 108, + "kind": "text", + "text": ".Fred" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 114, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 113, + "kind": "list", + "list": [ + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 118, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 119, + "kind": "text", + "text": "is" + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 164, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 163, + "kind": "list", + "list": [ + { + "id": 124, + "kind": "list", + "list": [ + { + "id": 122, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 123, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 162, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 161, + "kind": "list", + "list": [ + { + "id": 159, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 158, + "kind": "list", + "list": [ + { + "id": 157, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 156, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 155, + "kind": "list", + "list": [ + { + "id": 125, + "kind": "text", + "text": "procedure Garply" + }, + { + "id": 126, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 154, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 153, + "kind": "list", + "list": [ + { + "id": 152, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 151, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 150, + "kind": "list", + "list": [ + { + "id": 127, + "kind": "text", + "text": "(" + }, + { + "id": 148, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 147, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 146, + "kind": "list", + "list": [ + { + "id": 138, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 137, + "kind": "list", + "list": [ + { + "id": 129, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 128, + "kind": "text", + "text": "G" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 130, + "kind": "text", + "text": " :" + }, + { + "id": 136, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 135, + "kind": "list", + "list": [ + { + "id": 131, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 134, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 133, + "kind": "list", + "list": [ + { + "id": 132, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 145, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 144, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 143, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 142, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 141, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 140, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 139, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 149, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 160, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 167, + "kind": "list", + "list": [ + { + "id": 165, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 166, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 168, + "kind": "text", + "text": "end" + }, + { + "id": 175, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 174, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 173, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 172, + "kind": "list", + "list": [ + { + "id": 169, + "kind": "text", + "text": " GNATfuzz" + }, + { + "id": 170, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 171, + "kind": "text", + "text": ".AFL_Seed_Data_Chunks" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 176, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json b/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json index 436b1fc31..b95dedaec 100644 --- a/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json +++ b/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json @@ -1,1379 +1,1357 @@ -{ - "id": 172, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 171, - "kind": "list", - "list": [ - { - "id": 83, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 82, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "generic" - }, - { - "id": 81, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 80, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 79, - "kind": "list", - "list": [ - { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 2, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 4, - "kind": "text", - "text": "type Foo_Bar_Baz is private;" - }, - { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 6, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 78, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 77, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 76, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 75, - "kind": "list", - "list": [ - { - "id": 8, - "kind": "text", - "text": "with" - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 70, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 69, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 68, - "kind": "list", - "list": [ - { - "id": 10, - "kind": "text", - "text": "function \">\"" - }, - { - "id": 11, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 67, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 66, - "kind": "list", - "list": [ - { - "id": 60, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 59, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 58, - "kind": "list", - "list": [ - { - "id": 12, - "kind": "text", - "text": "(" - }, - { - "id": 56, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 55, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 31, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 22, - "kind": "list", - "list": [ - { - "id": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "text", - "text": "Left_Left_Left_Left_Left" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 15, - "kind": "text", - "text": " :" - }, - { - "id": 21, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 20, - "kind": "list", - "list": [ - { - "id": 16, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, - "kind": "list", - "list": [ - { - "id": 17, - "kind": "text", - "text": "Foo_Bar_Baz" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 30, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 29, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 28, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 27, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 26, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 25, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 24, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 33, - "kind": "text", - "text": ";" - }, - { - "id": 34, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 54, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 53, - "kind": "list", - "list": [ - { - "id": 45, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 44, - "kind": "list", - "list": [ - { - "id": 36, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 35, - "kind": "text", - "text": "Right_Right_Right_Right_Right" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 37, - "kind": "text", - "text": " :" - }, - { - "id": 43, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 42, - "kind": "list", - "list": [ - { - "id": 38, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 41, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 40, - "kind": "list", - "list": [ - { - "id": 39, - "kind": "text", - "text": "Foo_Bar_Baz" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 52, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 51, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 50, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 49, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 48, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 47, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 46, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 57, - "kind": "text", - "text": ")" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 65, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 64, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 63, - "kind": "list", - "list": [ - { - "id": 61, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 62, - "kind": "text", - "text": "return Boolean" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 71, - "kind": "text", - "text": " is <>" - }, - { - "id": 73, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 72, - "kind": "list", - "list": [ - ] - } - } - }, - { - "id": 74, - "kind": "text", - "text": ";" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - "break": true, - "expandedStates": null - } - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 86, - "kind": "list", - "list": [ - { - "id": 84, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 85, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 169, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 168, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 167, - "kind": "list", - "list": [ - { - "id": 87, - "kind": "text", - "text": "function Perform_Comparison_Check" - }, - { - "id": 88, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 166, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 165, - "kind": "list", - "list": [ - { - "id": 159, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 158, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 157, - "kind": "list", - "list": [ - { - "id": 89, - "kind": "text", - "text": "(" - }, - { - "id": 155, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 154, - "kind": "list", - "list": [ - { - "id": 109, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 108, - "kind": "list", - "list": [ - { - "id": 100, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 99, - "kind": "list", - "list": [ - { - "id": 91, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 90, - "kind": "text", - "text": "Comparing_Value" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 92, - "kind": "text", - "text": " :" - }, - { - "id": 98, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 97, - "kind": "list", - "list": [ - { - "id": 93, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 96, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 95, - "kind": "list", - "list": [ - { - "id": 94, - "kind": "text", - "text": "Foo_Bar_Baz" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 107, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 106, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 105, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 104, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 103, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 102, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 101, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 110, - "kind": "text", - "text": ";" - }, - { - "id": 111, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 131, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 130, - "kind": "list", - "list": [ - { - "id": 122, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 121, - "kind": "list", - "list": [ - { - "id": 113, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 112, - "kind": "text", - "text": "Rule_Value" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 114, - "kind": "text", - "text": " :" - }, - { - "id": 120, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 119, - "kind": "list", - "list": [ - { - "id": 115, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 118, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 117, - "kind": "list", - "list": [ - { - "id": 116, - "kind": "text", - "text": "Foo_Bar_Baz" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 129, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 128, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 127, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 126, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 125, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 124, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 123, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 132, - "kind": "text", - "text": ";" - }, - { - "id": 133, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 153, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 152, - "kind": "list", - "list": [ - { - "id": 144, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 143, - "kind": "list", - "list": [ - { - "id": 135, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 134, - "kind": "text", - "text": "Logic_Operator" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 136, - "kind": "text", - "text": " :" - }, - { - "id": 142, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 141, - "kind": "list", - "list": [ - { - "id": 137, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 140, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 139, - "kind": "list", - "list": [ - { - "id": 138, - "kind": "text", - "text": "Unbounded_String" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 151, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 150, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 149, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 148, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 147, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 146, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 145, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 156, - "kind": "text", - "text": ")" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 164, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 163, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 162, - "kind": "list", - "list": [ - { - "id": 160, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 161, - "kind": "text", - "text": "return Boolean" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 170, - "kind": "text", - "text": ";" - } - ] - }, - "break": true, - "expandedStates": null - } -} +{ + "id": 169, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 168, + "kind": "list", + "list": [ + { + "id": 80, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 79, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "generic" + }, + { + "id": 78, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 77, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 76, + "kind": "list", + "list": [ + { + "id": 3, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 2, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 4, + "kind": "text", + "text": "type Foo_Bar_Baz is private;" + }, + { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 75, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 74, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 73, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 72, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "text", + "text": "with" + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 70, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 69, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 68, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "function \">\"" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 67, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 66, + "kind": "list", + "list": [ + { + "id": 60, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 59, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 58, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "text", + "text": "(" + }, + { + "id": 56, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 55, + "kind": "list", + "list": [ + { + "id": 32, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 31, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 22, + "kind": "list", + "list": [ + { + "id": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "text", + "text": "Left_Left_Left_Left_Left" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 15, + "kind": "text", + "text": " :" + }, + { + "id": 21, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 16, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 17, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 29, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 26, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 25, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 24, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 33, + "kind": "text", + "text": ";" + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 54, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 53, + "kind": "list", + "list": [ + { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + { + "id": 36, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 35, + "kind": "text", + "text": "Right_Right_Right_Right_Right" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 37, + "kind": "text", + "text": " :" + }, + { + "id": 43, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 42, + "kind": "list", + "list": [ + { + "id": 38, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 41, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 40, + "kind": "list", + "list": [ + { + "id": 39, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 52, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 50, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 49, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 48, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 47, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 46, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 57, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 65, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 64, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 63, + "kind": "list", + "list": [ + { + "id": 61, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 62, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 71, + "kind": "text", + "text": " is <>;" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 83, + "kind": "list", + "list": [ + { + "id": 81, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 82, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 166, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 165, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 164, + "kind": "list", + "list": [ + { + "id": 84, + "kind": "text", + "text": "function Perform_Comparison_Check" + }, + { + "id": 85, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 163, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 162, + "kind": "list", + "list": [ + { + "id": 156, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 155, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 154, + "kind": "list", + "list": [ + { + "id": 86, + "kind": "text", + "text": "(" + }, + { + "id": 152, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 151, + "kind": "list", + "list": [ + { + "id": 106, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 105, + "kind": "list", + "list": [ + { + "id": 97, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 96, + "kind": "list", + "list": [ + { + "id": 88, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 87, + "kind": "text", + "text": "Comparing_Value" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 89, + "kind": "text", + "text": " :" + }, + { + "id": 95, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 94, + "kind": "list", + "list": [ + { + "id": 90, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 93, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 92, + "kind": "list", + "list": [ + { + "id": 91, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 104, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 103, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 102, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 101, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 100, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 99, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 98, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 107, + "kind": "text", + "text": ";" + }, + { + "id": 108, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 128, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 127, + "kind": "list", + "list": [ + { + "id": 119, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 118, + "kind": "list", + "list": [ + { + "id": 110, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 109, + "kind": "text", + "text": "Rule_Value" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 111, + "kind": "text", + "text": " :" + }, + { + "id": 117, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 116, + "kind": "list", + "list": [ + { + "id": 112, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 115, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 114, + "kind": "list", + "list": [ + { + "id": 113, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 126, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 125, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 124, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 123, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 122, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 121, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 120, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 129, + "kind": "text", + "text": ";" + }, + { + "id": 130, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 150, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 149, + "kind": "list", + "list": [ + { + "id": 141, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 140, + "kind": "list", + "list": [ + { + "id": 132, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 131, + "kind": "text", + "text": "Logic_Operator" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 133, + "kind": "text", + "text": " :" + }, + { + "id": 139, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 138, + "kind": "list", + "list": [ + { + "id": 134, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 137, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 136, + "kind": "list", + "list": [ + { + "id": 135, + "kind": "text", + "text": "Unbounded_String" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 148, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 147, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 146, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 145, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 144, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 143, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 142, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 153, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 161, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 160, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 159, + "kind": "list", + "list": [ + { + "id": 157, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 158, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 167, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/package_body/short_names_w_stmts/doc-baseline.json b/testsuite/tests/unparsing/package_body/short_names_w_stmts/doc-baseline.json index 1570d047f..31bc2ddab 100644 --- a/testsuite/tests/unparsing/package_body/short_names_w_stmts/doc-baseline.json +++ b/testsuite/tests/unparsing/package_body/short_names_w_stmts/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 45, + "id": 38, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package body Foo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package body Foo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Bar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,25 +206,25 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "begin" }, { - "id": 40, + "id": 33, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 39, + "id": 32, "kind": "list", "list": [ { - "id": 37, + "id": 30, "kind": "list", "list": [ { - "id": 35, + "id": 28, "kind": "command", "command": { "command": "line", @@ -296,7 +234,7 @@ } }, { - "id": 36, + "id": 29, "kind": "command", "command": { "command": "breakParent" @@ -305,7 +243,7 @@ ] }, { - "id": 38, + "id": 31, "kind": "text", "text": "null;" } @@ -314,11 +252,11 @@ } }, { - "id": 43, + "id": 36, "kind": "list", "list": [ { - "id": 41, + "id": 34, "kind": "command", "command": { "command": "line", @@ -328,7 +266,7 @@ } }, { - "id": 42, + "id": 35, "kind": "command", "command": { "command": "breakParent" @@ -337,7 +275,7 @@ ] }, { - "id": 44, + "id": 37, "kind": "text", "text": "end Foo;" } diff --git a/testsuite/tests/unparsing/package_body/short_names_w_stmts/test.out b/testsuite/tests/unparsing/package_body/short_names_w_stmts/test.out index ee2e350d5..7fc8c2a7a 100644 --- a/testsuite/tests/unparsing/package_body/short_names_w_stmts/test.out +++ b/testsuite/tests/unparsing/package_body/short_names_w_stmts/test.out @@ -1,4 +1,6 @@ -package body Foo with Bar is +package body Foo + with Bar +is type Baz; begin null; diff --git a/testsuite/tests/unparsing/package_body/short_names_wo_stmts/doc-baseline.json b/testsuite/tests/unparsing/package_body/short_names_wo_stmts/doc-baseline.json index 1e82cd0a6..d8d2a9dd0 100644 --- a/testsuite/tests/unparsing/package_body/short_names_wo_stmts/doc-baseline.json +++ b/testsuite/tests/unparsing/package_body/short_names_wo_stmts/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 35, + "id": 28, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package body Foo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package body Foo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Bar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,7 +206,7 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "end Foo;" } diff --git a/testsuite/tests/unparsing/package_body/short_names_wo_stmts/test.out b/testsuite/tests/unparsing/package_body/short_names_wo_stmts/test.out index 6169299b2..42c9d1c67 100644 --- a/testsuite/tests/unparsing/package_body/short_names_wo_stmts/test.out +++ b/testsuite/tests/unparsing/package_body/short_names_wo_stmts/test.out @@ -1,3 +1,5 @@ -package body Foo with Bar is +package body Foo + with Bar +is type Baz; end Foo; diff --git a/testsuite/tests/unparsing/package_decl/long_aspect/doc-baseline.json b/testsuite/tests/unparsing/package_decl/long_aspect/doc-baseline.json index 8f0497d86..34ea363c6 100644 --- a/testsuite/tests/unparsing/package_decl/long_aspect/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/long_aspect/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 45, + "id": 38, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,25 +206,25 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "private" }, { - "id": 40, + "id": 33, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 39, + "id": 32, "kind": "list", "list": [ { - "id": 37, + "id": 30, "kind": "list", "list": [ { - "id": 35, + "id": 28, "kind": "command", "command": { "command": "line", @@ -296,7 +234,7 @@ } }, { - "id": 36, + "id": 29, "kind": "command", "command": { "command": "breakParent" @@ -305,7 +243,7 @@ ] }, { - "id": 38, + "id": 31, "kind": "text", "text": "type Qux;" } @@ -314,11 +252,11 @@ } }, { - "id": 43, + "id": 36, "kind": "list", "list": [ { - "id": 41, + "id": 34, "kind": "command", "command": { "command": "line", @@ -328,7 +266,7 @@ } }, { - "id": 42, + "id": 35, "kind": "command", "command": { "command": "breakParent" @@ -337,9 +275,9 @@ ] }, { - "id": 44, + "id": 37, "kind": "text", "text": "end Foo;" } ] -} \ No newline at end of file +} diff --git a/testsuite/tests/unparsing/package_decl/long_aspect/test.out b/testsuite/tests/unparsing/package_decl/long_aspect/test.out index cdb565f95..cc29b0ba3 100644 --- a/testsuite/tests/unparsing/package_decl/long_aspect/test.out +++ b/testsuite/tests/unparsing/package_decl/long_aspect/test.out @@ -1,5 +1,5 @@ -package Foo with - Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar +package Foo + with Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar is type Baz; private diff --git a/testsuite/tests/unparsing/package_decl/long_aspect/test.yaml b/testsuite/tests/unparsing/package_decl/long_aspect/test.yaml index 24572ccb3..d98b8d05d 100644 --- a/testsuite/tests/unparsing/package_decl/long_aspect/test.yaml +++ b/testsuite/tests/unparsing/package_decl/long_aspect/test.yaml @@ -2,4 +2,4 @@ driver: unparser rule: package_decl descrition: | For a long single line `F_Aspects`, test that a line break is added - after the `with` keyword. + before the `with` keyword. diff --git a/testsuite/tests/unparsing/package_decl/long_name/doc-baseline.json b/testsuite/tests/unparsing/package_decl/long_name/doc-baseline.json index 563d2d1b0..844455c6a 100644 --- a/testsuite/tests/unparsing/package_decl/long_name/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/long_name/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 45, + "id": 38, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Bar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,25 +206,25 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "private" }, { - "id": 40, + "id": 33, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 39, + "id": 32, "kind": "list", "list": [ { - "id": 37, + "id": 30, "kind": "list", "list": [ { - "id": 35, + "id": 28, "kind": "command", "command": { "command": "line", @@ -296,7 +234,7 @@ } }, { - "id": 36, + "id": 29, "kind": "command", "command": { "command": "breakParent" @@ -305,7 +243,7 @@ ] }, { - "id": 38, + "id": 31, "kind": "text", "text": "type Qux;" } @@ -314,11 +252,11 @@ } }, { - "id": 43, + "id": 36, "kind": "list", "list": [ { - "id": 41, + "id": 34, "kind": "command", "command": { "command": "line", @@ -328,7 +266,7 @@ } }, { - "id": 42, + "id": 35, "kind": "command", "command": { "command": "breakParent" @@ -337,9 +275,9 @@ ] }, { - "id": 44, + "id": 37, "kind": "text", "text": "end Foo;" } ] -} \ No newline at end of file +} diff --git a/testsuite/tests/unparsing/package_decl/long_name_and_aspect/doc-baseline.json b/testsuite/tests/unparsing/package_decl/long_name_and_aspect/doc-baseline.json index 0e81116bf..6bbd42636 100644 --- a/testsuite/tests/unparsing/package_decl/long_name_and_aspect/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/long_name_and_aspect/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 45, + "id": 38, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,25 +206,25 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "private" }, { - "id": 40, + "id": 33, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 39, + "id": 32, "kind": "list", "list": [ { - "id": 37, + "id": 30, "kind": "list", "list": [ { - "id": 35, + "id": 28, "kind": "command", "command": { "command": "line", @@ -296,7 +234,7 @@ } }, { - "id": 36, + "id": 29, "kind": "command", "command": { "command": "breakParent" @@ -305,7 +243,7 @@ ] }, { - "id": 38, + "id": 31, "kind": "text", "text": "type Qux;" } @@ -314,11 +252,11 @@ } }, { - "id": 43, + "id": 36, "kind": "list", "list": [ { - "id": 41, + "id": 34, "kind": "command", "command": { "command": "line", @@ -328,7 +266,7 @@ } }, { - "id": 42, + "id": 35, "kind": "command", "command": { "command": "breakParent" @@ -337,9 +275,9 @@ ] }, { - "id": 44, + "id": 37, "kind": "text", "text": "end Foo;" } ] -} \ No newline at end of file +} diff --git a/testsuite/tests/unparsing/package_decl/long_name_and_aspect/input.ada b/testsuite/tests/unparsing/package_decl/long_name_and_aspect/input.ada index fcbcadc5d..6b86b5792 100644 --- a/testsuite/tests/unparsing/package_decl/long_name_and_aspect/input.ada +++ b/testsuite/tests/unparsing/package_decl/long_name_and_aspect/input.ada @@ -1 +1 @@ -package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo with Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar is type Baz; private type Qux; end Foo; +package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo with Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar is type Baz; private type Qux; end Foo; diff --git a/testsuite/tests/unparsing/package_decl/long_name_and_aspect/test.out b/testsuite/tests/unparsing/package_decl/long_name_and_aspect/test.out index 3d6c303f7..bc7c47d66 100644 --- a/testsuite/tests/unparsing/package_decl/long_name_and_aspect/test.out +++ b/testsuite/tests/unparsing/package_decl/long_name_and_aspect/test.out @@ -1,6 +1,6 @@ package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo with - Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar + Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar is type Baz; private diff --git a/testsuite/tests/unparsing/package_decl/no_end_name/doc-baseline.json b/testsuite/tests/unparsing/package_decl/no_end_name/doc-baseline.json index e08be097c..e7e5a1b15 100644 --- a/testsuite/tests/unparsing/package_decl/no_end_name/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/no_end_name/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 45, + "id": 38, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Bar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,25 +206,25 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "private" }, { - "id": 40, + "id": 33, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 39, + "id": 32, "kind": "list", "list": [ { - "id": 37, + "id": 30, "kind": "list", "list": [ { - "id": 35, + "id": 28, "kind": "command", "command": { "command": "line", @@ -296,7 +234,7 @@ } }, { - "id": 36, + "id": 29, "kind": "command", "command": { "command": "breakParent" @@ -305,7 +243,7 @@ ] }, { - "id": 38, + "id": 31, "kind": "text", "text": "type Qux;" } @@ -314,11 +252,11 @@ } }, { - "id": 43, + "id": 36, "kind": "list", "list": [ { - "id": 41, + "id": 34, "kind": "command", "command": { "command": "line", @@ -328,7 +266,7 @@ } }, { - "id": 42, + "id": 35, "kind": "command", "command": { "command": "breakParent" @@ -337,7 +275,7 @@ ] }, { - "id": 44, + "id": 37, "kind": "text", "text": "end;" } diff --git a/testsuite/tests/unparsing/package_decl/no_end_name/test.out b/testsuite/tests/unparsing/package_decl/no_end_name/test.out index 1138bd6c9..bdb263c93 100644 --- a/testsuite/tests/unparsing/package_decl/no_end_name/test.out +++ b/testsuite/tests/unparsing/package_decl/no_end_name/test.out @@ -1,4 +1,6 @@ -package Foo with Bar is +package Foo + with Bar +is type Baz; private type Qux; diff --git a/testsuite/tests/unparsing/package_decl/no_private_part/doc-baseline.json b/testsuite/tests/unparsing/package_decl/no_private_part/doc-baseline.json index cbd1d0a13..91dac9be5 100644 --- a/testsuite/tests/unparsing/package_decl/no_private_part/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/no_private_part/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 35, + "id": 28, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Bar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,7 +206,7 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "end Foo;" } diff --git a/testsuite/tests/unparsing/package_decl/no_private_part/test.out b/testsuite/tests/unparsing/package_decl/no_private_part/test.out index cc3314388..e6c332a3e 100644 --- a/testsuite/tests/unparsing/package_decl/no_private_part/test.out +++ b/testsuite/tests/unparsing/package_decl/no_private_part/test.out @@ -1,3 +1,5 @@ -package Foo with Bar is +package Foo + with Bar +is type Baz; end Foo; diff --git a/testsuite/tests/unparsing/package_decl/short_names/doc-baseline.json b/testsuite/tests/unparsing/package_decl/short_names/doc-baseline.json index a8908c44c..6ad89b0ff 100644 --- a/testsuite/tests/unparsing/package_decl/short_names/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/short_names/doc-baseline.json @@ -1,189 +1,127 @@ { - "id": 45, + "id": 38, "kind": "list", "list": [ { - "id": 24, + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 23, + "id": 16, "kind": "list", "list": [ { - "id": 20, + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 13, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 18, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 3, "kind": "list", "list": [ { - "id": 0, - "kind": "text", - "text": "package Foo" + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } }, { - "id": 17, + "id": 2, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 + "command": "breakParent" + } + } + ] + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" }, - "alignContents": { - "id": 16, + { + "id": 9, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 15, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 13, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 5, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 10, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } }, - "flatContents": { - "id": 8, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - }, - "break": false, - "expandedStates": null - } + { + "id": 6, + "kind": "text", + "text": "Bar" } - } - } - ] - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - "break": false, - "expandedStates": null + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } } }, { - "id": 21, + "id": 14, "kind": "command", "command": { "command": "line", @@ -193,31 +131,31 @@ } }, { - "id": 22, + "id": 15, "kind": "text", "text": "is" } ] }, - "break": false, + "break": true, "expandedStates": null } }, { - "id": 30, + "id": 23, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 29, + "id": 22, "kind": "list", "list": [ { - "id": 27, + "id": 20, "kind": "list", "list": [ { - "id": 25, + "id": 18, "kind": "command", "command": { "command": "line", @@ -227,7 +165,7 @@ } }, { - "id": 26, + "id": 19, "kind": "command", "command": { "command": "breakParent" @@ -236,7 +174,7 @@ ] }, { - "id": 28, + "id": 21, "kind": "text", "text": "type Baz;" } @@ -245,11 +183,11 @@ } }, { - "id": 33, + "id": 26, "kind": "list", "list": [ { - "id": 31, + "id": 24, "kind": "command", "command": { "command": "line", @@ -259,7 +197,7 @@ } }, { - "id": 32, + "id": 25, "kind": "command", "command": { "command": "breakParent" @@ -268,25 +206,25 @@ ] }, { - "id": 34, + "id": 27, "kind": "text", "text": "private" }, { - "id": 40, + "id": 33, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 39, + "id": 32, "kind": "list", "list": [ { - "id": 37, + "id": 30, "kind": "list", "list": [ { - "id": 35, + "id": 28, "kind": "command", "command": { "command": "line", @@ -296,7 +234,7 @@ } }, { - "id": 36, + "id": 29, "kind": "command", "command": { "command": "breakParent" @@ -305,7 +243,7 @@ ] }, { - "id": 38, + "id": 31, "kind": "text", "text": "type Qux;" } @@ -314,11 +252,11 @@ } }, { - "id": 43, + "id": 36, "kind": "list", "list": [ { - "id": 41, + "id": 34, "kind": "command", "command": { "command": "line", @@ -328,7 +266,7 @@ } }, { - "id": 42, + "id": 35, "kind": "command", "command": { "command": "breakParent" @@ -337,9 +275,9 @@ ] }, { - "id": 44, + "id": 37, "kind": "text", "text": "end Foo;" } ] -} \ No newline at end of file +} diff --git a/testsuite/tests/unparsing/package_decl/short_names/test.out b/testsuite/tests/unparsing/package_decl/short_names/test.out index 7431dc912..1352c1113 100644 --- a/testsuite/tests/unparsing/package_decl/short_names/test.out +++ b/testsuite/tests/unparsing/package_decl/short_names/test.out @@ -1,4 +1,6 @@ -package Foo with Bar is +package Foo + with Bar +is type Baz; private type Qux; diff --git a/testsuite/tests/unparsing/subp_body/no_end_name/doc-baseline.json b/testsuite/tests/unparsing/subp_body/no_end_name/doc-baseline.json index 8e3908add..4eade099a 100644 --- a/testsuite/tests/unparsing/subp_body/no_end_name/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_body/no_end_name/doc-baseline.json @@ -1,11 +1,11 @@ { - "id": 122, + "id": 120, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 121, + "id": 119, "kind": "list", "list": [ { @@ -855,24 +855,7 @@ } }, { - "id": 106, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 105, - "kind": "list", - "list": [ - ] - } - } - }, - { - "id": 107, + "id": 105, "kind": "command", "command": { "command": "line", @@ -882,21 +865,21 @@ } }, { - "id": 108, + "id": 106, "kind": "text", "text": "is" }, { - "id": 112, + "id": 110, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 111, + "id": 109, "kind": "list", "list": [ { - "id": 109, + "id": 107, "kind": "command", "command": { "command": "line", @@ -906,7 +889,7 @@ } }, { - "id": 110, + "id": 108, "kind": "text", "text": "type Garply;" } @@ -915,7 +898,7 @@ } }, { - "id": 113, + "id": 111, "kind": "command", "command": { "command": "line", @@ -925,21 +908,21 @@ } }, { - "id": 114, + "id": 112, "kind": "text", "text": "begin" }, { - "id": 118, + "id": 116, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 117, + "id": 115, "kind": "list", "list": [ { - "id": 115, + "id": 113, "kind": "command", "command": { "command": "line", @@ -949,7 +932,7 @@ } }, { - "id": 116, + "id": 114, "kind": "text", "text": "null;" } @@ -958,7 +941,7 @@ } }, { - "id": 119, + "id": 117, "kind": "command", "command": { "command": "line", @@ -968,7 +951,7 @@ } }, { - "id": 120, + "id": 118, "kind": "text", "text": "end;" } diff --git a/testsuite/tests/unparsing/subp_body/with_decls/doc-baseline.json b/testsuite/tests/unparsing/subp_body/with_decls/doc-baseline.json index 82d1d7d6b..3293de806 100644 --- a/testsuite/tests/unparsing/subp_body/with_decls/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_body/with_decls/doc-baseline.json @@ -1,11 +1,11 @@ { - "id": 122, + "id": 120, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 121, + "id": 119, "kind": "list", "list": [ { @@ -855,24 +855,7 @@ } }, { - "id": 106, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 105, - "kind": "list", - "list": [ - ] - } - } - }, - { - "id": 107, + "id": 105, "kind": "command", "command": { "command": "line", @@ -882,21 +865,21 @@ } }, { - "id": 108, + "id": 106, "kind": "text", "text": "is" }, { - "id": 112, + "id": 110, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 111, + "id": 109, "kind": "list", "list": [ { - "id": 109, + "id": 107, "kind": "command", "command": { "command": "line", @@ -906,7 +889,7 @@ } }, { - "id": 110, + "id": 108, "kind": "text", "text": "type Garply;" } @@ -915,7 +898,7 @@ } }, { - "id": 113, + "id": 111, "kind": "command", "command": { "command": "line", @@ -925,21 +908,21 @@ } }, { - "id": 114, + "id": 112, "kind": "text", "text": "begin" }, { - "id": 118, + "id": 116, "kind": "command", "command": { "command": "indent", "indentContents": { - "id": 117, + "id": 115, "kind": "list", "list": [ { - "id": 115, + "id": 113, "kind": "command", "command": { "command": "line", @@ -949,7 +932,7 @@ } }, { - "id": 116, + "id": 114, "kind": "text", "text": "null;" } @@ -958,7 +941,7 @@ } }, { - "id": 119, + "id": 117, "kind": "command", "command": { "command": "line", @@ -968,7 +951,7 @@ } }, { - "id": 120, + "id": 118, "kind": "text", "text": "end Foo;" } diff --git a/testsuite/tests/unparsing/subp_body/without_decls/doc-baseline.json b/testsuite/tests/unparsing/subp_body/without_decls/doc-baseline.json index e69de29bb..daf9e4533 100644 --- a/testsuite/tests/unparsing/subp_body/without_decls/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_body/without_decls/doc-baseline.json @@ -0,0 +1,958 @@ +{ + "id": 119, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 118, + "kind": "list", + "list": [ + { + "id": 104, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 103, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 102, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "function Foo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 101, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 100, + "kind": "list", + "list": [ + { + "id": 94, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 93, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 92, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 90, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 89, + "kind": "list", + "list": [ + { + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "A" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 23, + "kind": "text", + "text": ";" + }, + { + "id": 24, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 44, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 43, + "kind": "list", + "list": [ + { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 27, + "kind": "text", + "text": " :" + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 29, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 41, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 40, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 37, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 36, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 45, + "kind": "text", + "text": ";" + }, + { + "id": 46, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 66, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 65, + "kind": "list", + "list": [ + { + "id": 57, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 56, + "kind": "list", + "list": [ + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "text", + "text": "C" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 49, + "kind": "text", + "text": " :" + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 50, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 51, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 64, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 59, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 58, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 67, + "kind": "text", + "text": ";" + }, + { + "id": 68, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 88, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 87, + "kind": "list", + "list": [ + { + "id": 79, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 78, + "kind": "list", + "list": [ + { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "text", + "text": "D" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 71, + "kind": "text", + "text": " :" + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 76, + "kind": "list", + "list": [ + { + "id": 72, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 75, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 74, + "kind": "list", + "list": [ + { + "id": 73, + "kind": "text", + "text": "Corge" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 86, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 85, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 84, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 83, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 82, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 81, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 80, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 91, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 99, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 98, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 97, + "kind": "list", + "list": [ + { + "id": 95, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 96, + "kind": "text", + "text": "return Fred" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 105, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 106, + "kind": "text", + "text": "is" + }, + { + "id": 109, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 108, + "kind": "list", + "list": [ + { + "id": 107, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + } + ] + } + } + }, + { + "id": 110, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 111, + "kind": "text", + "text": "begin" + }, + { + "id": 115, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 114, + "kind": "list", + "list": [ + { + "id": 112, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 113, + "kind": "text", + "text": "null;" + } + ] + } + } + }, + { + "id": 116, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 117, + "kind": "text", + "text": "end Foo;" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/subp_decl/long_not_overriding/doc-baseline.json b/testsuite/tests/unparsing/subp_decl/long_not_overriding/doc-baseline.json index 3d93b0815..ddd7a8778 100644 --- a/testsuite/tests/unparsing/subp_decl/long_not_overriding/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_decl/long_not_overriding/doc-baseline.json @@ -24,170 +24,248 @@ } }, { - "id": 106, + "id": 108, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 105, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 104, - "kind": "list", - "list": [ - { - "id": 2, - "kind": "text", - "text": "function Foo" - }, - { - "id": 3, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } + "command": "group", + "id": 0, + "groupContents": { + "id": 107, + "kind": "list", + "list": [ + { + "id": 106, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 103, + "alignContents": { + "id": 105, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 102, + "id": 104, "kind": "list", "list": [ { - "id": 96, + "id": 2, + "kind": "text", + "text": "function Foo" + }, + { + "id": 3, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 103, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 95, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 94, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "(" - }, - { - "id": 92, + "id": 102, + "kind": "list", + "list": [ + { + "id": 96, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 95, "kind": "command", "command": { "command": "align", "alignData": { - "kind": "innerRoot" + "kind": "width", + "n": 1 }, "alignContents": { - "id": 91, + "id": 94, "kind": "list", "list": [ { - "id": 24, + "id": 4, + "kind": "text", + "text": "(" + }, + { + "id": 92, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 23, + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 91, "kind": "list", "list": [ { - "id": 15, + "id": 24, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 14, + "id": 23, "kind": "list", "list": [ { - "id": 6, + "id": 15, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 5, - "kind": "text", - "text": "AAAAA" + "id": 14, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 5, + "kind": "text", + "text": "AAAAA" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 7, + "kind": "text", + "text": " :" + }, + { + "id": 13, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 7, - "kind": "text", - "text": " :" - }, - { - "id": 13, + "id": 22, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "list", - "list": [ - { - "id": 8, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 21, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 20, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 18, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 11, + "alignContents": { + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 10, + "id": 16, "kind": "list", "list": [ - { - "id": 9, - "kind": "text", - "text": "Bar" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -198,173 +276,173 @@ } }, { - "id": 22, + "id": 25, + "kind": "text", + "text": ";" + }, + { + "id": 26, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 21, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "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 - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 25, - "kind": "text", - "text": ";" - }, - { - "id": 26, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 46, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 45, - "kind": "list", - "list": [ + }, { - "id": 37, + "id": 46, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 36, + "id": 45, "kind": "list", "list": [ { - "id": 28, + "id": 37, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 27, - "kind": "text", - "text": "BBBBB" + "id": 36, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "text", + "text": "BBBBB" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 29, + "kind": "text", + "text": " :" + }, + { + "id": 35, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 31, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 29, - "kind": "text", - "text": " :" - }, - { - "id": 35, + "id": 44, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 34, - "kind": "list", - "list": [ - { - "id": 30, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 43, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 42, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 41, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 40, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 33, + "alignContents": { + "id": 39, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 32, + "id": 38, "kind": "list", "list": [ - { - "id": 31, - "kind": "text", - "text": "Baz" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -375,173 +453,173 @@ } }, { - "id": 44, + "id": 47, + "kind": "text", + "text": ";" + }, + { + "id": 48, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 43, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 42, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 41, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 40, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 39, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 38, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 47, - "kind": "text", - "text": ";" - }, - { - "id": 48, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 68, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 67, - "kind": "list", - "list": [ + }, { - "id": 59, + "id": 68, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 58, + "id": 67, "kind": "list", "list": [ { - "id": 50, + "id": 59, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 49, - "kind": "text", - "text": "CCCC" + "id": 58, + "kind": "list", + "list": [ + { + "id": 50, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 49, + "kind": "text", + "text": "CCCC" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 51, + "kind": "text", + "text": " :" + }, + { + "id": 57, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 56, + "kind": "list", + "list": [ + { + "id": 52, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 53, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 51, - "kind": "text", - "text": " :" - }, - { - "id": 57, + "id": 66, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 56, - "kind": "list", - "list": [ - { - "id": 52, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 65, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 64, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 63, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 62, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 55, + "alignContents": { + "id": 61, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 54, + "id": 60, "kind": "list", "list": [ - { - "id": 53, - "kind": "text", - "text": "Qux" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -552,173 +630,173 @@ } }, { - "id": 66, + "id": 69, + "kind": "text", + "text": ";" + }, + { + "id": 70, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 65, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 64, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 63, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 62, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 61, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 60, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 69, - "kind": "text", - "text": ";" - }, - { - "id": 70, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 90, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 89, - "kind": "list", - "list": [ + }, { - "id": 81, + "id": 90, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 80, + "id": 89, "kind": "list", "list": [ { - "id": 72, + "id": 81, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 71, - "kind": "text", - "text": "DDDD" + "id": 80, + "kind": "list", + "list": [ + { + "id": 72, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 71, + "kind": "text", + "text": "DDDD" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 73, + "kind": "text", + "text": " :" + }, + { + "id": 79, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 78, + "kind": "list", + "list": [ + { + "id": 74, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 76, + "kind": "list", + "list": [ + { + "id": 75, + "kind": "text", + "text": "Corge" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 73, - "kind": "text", - "text": " :" - }, - { - "id": 79, + "id": 88, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 78, - "kind": "list", - "list": [ - { - "id": 74, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 87, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 86, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 85, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 84, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 77, + "alignContents": { + "id": 83, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 76, + "id": 82, "kind": "list", "list": [ - { - "id": 75, - "kind": "text", - "text": "Corge" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -727,133 +805,71 @@ "break": false, "expandedStates": null } - }, - { - "id": 88, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 87, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 86, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 85, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 84, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 83, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 82, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } } ] - }, - "break": false, - "expandedStates": null + } } + }, + { + "id": 93, + "kind": "text", + "text": ")" } ] } } }, - { - "id": 93, - "kind": "text", - "text": ")" + "break": false, + "expandedStates": null + } + }, + { + "id": 101, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 100, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 99, + "kind": "list", + "list": [ + { + "id": 97, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 98, + "kind": "text", + "text": "return Fred" + } + ] + }, + "break": false, + "expandedStates": null + } } - ] + } } - } + ] }, "break": false, "expandedStates": null } - }, - { - "id": 101, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 100, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 99, - "kind": "list", - "list": [ - { - "id": 97, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 98, - "kind": "text", - "text": "return Fred" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } } ] }, @@ -861,29 +877,12 @@ "expandedStates": null } } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 108, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 107, - "kind": "list", - "list": [ + } + } ] - } + }, + "break": false, + "expandedStates": null } }, { diff --git a/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/doc-baseline.json b/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/doc-baseline.json index c82aa2491..089b81d3a 100644 --- a/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/doc-baseline.json @@ -1,178 +1,256 @@ { - "id": 124, + "id": 120, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 123, + "id": 119, "kind": "list", "list": [ { - "id": 104, + "id": 117, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 103, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 102, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "function Foo" + "command": "group", + "id": 0, + "groupContents": { + "id": 116, + "kind": "list", + "list": [ + { + "id": 104, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 101, + "alignContents": { + "id": 103, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 100, + "id": 102, "kind": "list", "list": [ { - "id": 94, + "id": 0, + "kind": "text", + "text": "function Foo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 101, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 93, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 92, - "kind": "list", - "list": [ - { - "id": 2, - "kind": "text", - "text": "(" - }, - { - "id": 90, + "id": 100, + "kind": "list", + "list": [ + { + "id": 94, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 93, "kind": "command", "command": { "command": "align", "alignData": { - "kind": "innerRoot" + "kind": "width", + "n": 1 }, "alignContents": { - "id": 89, + "id": 92, "kind": "list", "list": [ { - "id": 22, + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 90, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 21, + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 89, "kind": "list", "list": [ { - "id": 13, + "id": 22, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 12, + "id": 21, "kind": "list", "list": [ { - "id": 4, + "id": 13, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 3, - "kind": "text", - "text": "A" + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "A" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 5, - "kind": "text", - "text": " :" - }, - { - "id": 11, + "id": 20, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 6, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 9, + "alignContents": { + "id": 15, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 8, + "id": 14, "kind": "list", "list": [ - { - "id": 7, - "kind": "text", - "text": "Bar" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -183,173 +261,173 @@ } }, { - "id": 20, + "id": 23, + "kind": "text", + "text": ";" + }, + { + "id": 24, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 19, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 18, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 17, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 23, - "kind": "text", - "text": ";" - }, - { - "id": 24, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 44, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 43, - "kind": "list", - "list": [ + }, { - "id": 35, + "id": 44, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 34, + "id": 43, "kind": "list", "list": [ { - "id": 26, + "id": 35, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 25, - "kind": "text", - "text": "B" + "id": 34, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 27, + "kind": "text", + "text": " :" + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 29, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 27, - "kind": "text", - "text": " :" - }, - { - "id": 33, + "id": 42, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 32, - "kind": "list", - "list": [ - { - "id": 28, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 41, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 40, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 31, + "alignContents": { + "id": 37, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 30, + "id": 36, "kind": "list", "list": [ - { - "id": 29, - "kind": "text", - "text": "Baz" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -360,173 +438,173 @@ } }, { - "id": 42, + "id": 45, + "kind": "text", + "text": ";" + }, + { + "id": 46, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 41, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 40, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 39, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 38, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 45, - "kind": "text", - "text": ";" - }, - { - "id": 46, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 66, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 65, - "kind": "list", - "list": [ + }, { - "id": 57, + "id": 66, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 56, + "id": 65, "kind": "list", "list": [ { - "id": 48, + "id": 57, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 47, - "kind": "text", - "text": "C" + "id": 56, + "kind": "list", + "list": [ + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "text", + "text": "C" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 49, + "kind": "text", + "text": " :" + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 50, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 51, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 49, - "kind": "text", - "text": " :" - }, - { - "id": 55, + "id": 64, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 54, - "kind": "list", - "list": [ - { - "id": 50, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 62, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 53, + "alignContents": { + "id": 59, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 52, + "id": 58, "kind": "list", "list": [ - { - "id": 51, - "kind": "text", - "text": "Qux" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -537,173 +615,173 @@ } }, { - "id": 64, + "id": 67, + "kind": "text", + "text": ";" + }, + { + "id": 68, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 63, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 62, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 61, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 60, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 59, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 58, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 67, - "kind": "text", - "text": ";" - }, - { - "id": 68, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 88, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 87, - "kind": "list", - "list": [ + }, { - "id": 79, + "id": 88, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 78, + "id": 87, "kind": "list", "list": [ { - "id": 70, + "id": 79, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 69, - "kind": "text", - "text": "D" + "id": 78, + "kind": "list", + "list": [ + { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "text", + "text": "D" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 71, + "kind": "text", + "text": " :" + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 76, + "kind": "list", + "list": [ + { + "id": 72, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 75, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 74, + "kind": "list", + "list": [ + { + "id": 73, + "kind": "text", + "text": "Corge" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 71, - "kind": "text", - "text": " :" - }, - { - "id": 77, + "id": 86, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 76, - "kind": "list", - "list": [ - { - "id": 72, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 85, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 84, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 83, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 82, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 75, + "alignContents": { + "id": 81, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 74, + "id": 80, "kind": "list", "list": [ - { - "id": 73, - "kind": "text", - "text": "Corge" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -712,133 +790,71 @@ "break": false, "expandedStates": null } - }, - { - "id": 86, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 85, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 84, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 83, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 82, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 81, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 80, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } } ] - }, - "break": false, - "expandedStates": null + } } + }, + { + "id": 91, + "kind": "text", + "text": ")" } ] } } }, - { - "id": 91, - "kind": "text", - "text": ")" + "break": false, + "expandedStates": null + } + }, + { + "id": 99, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 98, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 97, + "kind": "list", + "list": [ + { + "id": 95, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 96, + "kind": "text", + "text": "return Freddddddddddddd" + } + ] + }, + "break": false, + "expandedStates": null + } } - ] + } } - } + ] }, "break": false, "expandedStates": null } - }, - { - "id": 99, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 98, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 97, - "kind": "list", - "list": [ - { - "id": 95, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 96, - "kind": "text", - "text": "return Freddddddddddddd" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } } ] }, @@ -846,72 +862,48 @@ "expandedStates": null } } - ] + } }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 121, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 120, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 119, + { + "id": 107, "kind": "list", "list": [ { - "id": 108, + "id": 105, "kind": "command", "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 107, - "kind": "list", - "list": [ - { - "id": 105, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 106, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null + "command": "line", + "literal": false, + "soft": false, + "hard": true } }, { - "id": 118, + "id": 106, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 117, + "command": "breakParent" + } + } + ] + }, + { + "id": 115, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 114, + "kind": "list", + "list": [ + { + "id": 108, + "kind": "text", + "text": "with" + }, + { + "id": 113, "kind": "command", "command": { "command": "align", @@ -920,17 +912,17 @@ "n": 2 }, "alignContents": { - "id": 116, + "id": 112, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 115, + "id": 111, "kind": "list", "list": [ { - "id": 113, + "id": 109, "kind": "command", "command": { "command": "line", @@ -940,9 +932,9 @@ } }, { - "id": 114, + "id": 110, "kind": "text", - "text": "Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" + "text": "Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" } ] }, @@ -951,56 +943,27 @@ } } } - }, - "flatContents": { - "id": 112, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 111, - "kind": "list", - "list": [ - { - "id": 109, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 110, - "kind": "text", - "text": "Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" - } - ] - }, - "break": false, - "expandedStates": null - } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null } }, { - "id": 122, + "id": 118, "kind": "text", "text": ";" } ] }, - "break": false, + "break": true, "expandedStates": null } } diff --git a/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/input.ada b/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/input.ada index 05bb3eaff..9b2fcfd4b 100644 --- a/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/input.ada +++ b/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/input.ada @@ -1,2 +1,3 @@ function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Freddddddddddddd - with Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy; +with + Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy; diff --git a/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/test.out b/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/test.out index eb3ccb89f..9b2fcfd4b 100644 --- a/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/test.out +++ b/testsuite/tests/unparsing/subp_decl/long_with_long_aspects/test.out @@ -1,3 +1,3 @@ function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Freddddddddddddd - with - Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy; +with + Garplyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy; diff --git a/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/doc-baseline.json b/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/doc-baseline.json index dcb31c4c5..dd7511cf3 100644 --- a/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/doc-baseline.json @@ -1,178 +1,256 @@ { - "id": 124, + "id": 120, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 123, + "id": 119, "kind": "list", "list": [ { - "id": 104, + "id": 117, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 103, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 102, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "function Foo" + "command": "group", + "id": 0, + "groupContents": { + "id": 116, + "kind": "list", + "list": [ + { + "id": 104, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 101, + "alignContents": { + "id": 103, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 100, + "id": 102, "kind": "list", "list": [ { - "id": 94, + "id": 0, + "kind": "text", + "text": "function Foo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 101, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 93, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 92, - "kind": "list", - "list": [ - { - "id": 2, - "kind": "text", - "text": "(" - }, - { - "id": 90, + "id": 100, + "kind": "list", + "list": [ + { + "id": 94, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 93, "kind": "command", "command": { "command": "align", "alignData": { - "kind": "innerRoot" + "kind": "width", + "n": 1 }, "alignContents": { - "id": 89, + "id": 92, "kind": "list", "list": [ { - "id": 22, + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 90, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 21, + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 89, "kind": "list", "list": [ { - "id": 13, + "id": 22, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 12, + "id": 21, "kind": "list", "list": [ { - "id": 4, + "id": 13, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 3, - "kind": "text", - "text": "A" + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "A" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 5, - "kind": "text", - "text": " :" - }, - { - "id": 11, + "id": 20, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 6, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 9, + "alignContents": { + "id": 15, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 8, + "id": 14, "kind": "list", "list": [ - { - "id": 7, - "kind": "text", - "text": "Bar" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -183,173 +261,173 @@ } }, { - "id": 20, + "id": 23, + "kind": "text", + "text": ";" + }, + { + "id": 24, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 19, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 18, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 17, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 23, - "kind": "text", - "text": ";" - }, - { - "id": 24, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 44, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 43, - "kind": "list", - "list": [ + }, { - "id": 35, + "id": 44, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 34, + "id": 43, "kind": "list", "list": [ { - "id": 26, + "id": 35, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 25, - "kind": "text", - "text": "B" + "id": 34, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 27, + "kind": "text", + "text": " :" + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 29, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 27, - "kind": "text", - "text": " :" - }, - { - "id": 33, + "id": 42, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 32, - "kind": "list", - "list": [ - { - "id": 28, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 41, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 40, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 31, + "alignContents": { + "id": 37, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 30, + "id": 36, "kind": "list", "list": [ - { - "id": 29, - "kind": "text", - "text": "Baz" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -360,173 +438,173 @@ } }, { - "id": 42, + "id": 45, + "kind": "text", + "text": ";" + }, + { + "id": 46, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 41, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 40, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 39, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 38, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 45, - "kind": "text", - "text": ";" - }, - { - "id": 46, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 66, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 65, - "kind": "list", - "list": [ + }, { - "id": 57, + "id": 66, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 56, + "id": 65, "kind": "list", "list": [ { - "id": 48, + "id": 57, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 47, - "kind": "text", - "text": "C" + "id": 56, + "kind": "list", + "list": [ + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "text", + "text": "C" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 49, + "kind": "text", + "text": " :" + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 50, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 51, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 49, - "kind": "text", - "text": " :" - }, - { - "id": 55, + "id": 64, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 54, - "kind": "list", - "list": [ - { - "id": 50, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 62, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 53, + "alignContents": { + "id": 59, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 52, + "id": 58, "kind": "list", "list": [ - { - "id": 51, - "kind": "text", - "text": "Qux" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -537,173 +615,173 @@ } }, { - "id": 64, + "id": 67, + "kind": "text", + "text": ";" + }, + { + "id": 68, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 63, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 62, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 61, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 60, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 59, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 58, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 67, - "kind": "text", - "text": ";" - }, - { - "id": 68, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 88, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 87, - "kind": "list", - "list": [ + }, { - "id": 79, + "id": 88, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 78, + "id": 87, "kind": "list", "list": [ { - "id": 70, + "id": 79, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 69, - "kind": "text", - "text": "D" + "id": 78, + "kind": "list", + "list": [ + { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "text", + "text": "D" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 71, + "kind": "text", + "text": " :" + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 76, + "kind": "list", + "list": [ + { + "id": 72, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 75, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 74, + "kind": "list", + "list": [ + { + "id": 73, + "kind": "text", + "text": "Corge" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 71, - "kind": "text", - "text": " :" - }, - { - "id": 77, + "id": 86, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 76, - "kind": "list", - "list": [ - { - "id": 72, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 85, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 84, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 83, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 82, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 75, + "alignContents": { + "id": 81, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 74, + "id": 80, "kind": "list", "list": [ - { - "id": 73, - "kind": "text", - "text": "Corge" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -712,133 +790,71 @@ "break": false, "expandedStates": null } - }, - { - "id": 86, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 85, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 84, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 83, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 82, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 81, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 80, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } } ] - }, - "break": false, - "expandedStates": null + } } + }, + { + "id": 91, + "kind": "text", + "text": ")" } ] } } }, - { - "id": 91, - "kind": "text", - "text": ")" + "break": false, + "expandedStates": null + } + }, + { + "id": 99, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 98, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 97, + "kind": "list", + "list": [ + { + "id": 95, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 96, + "kind": "text", + "text": "return Freddddd" + } + ] + }, + "break": false, + "expandedStates": null + } } - ] + } } - } + ] }, "break": false, "expandedStates": null } - }, - { - "id": 99, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 98, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 97, - "kind": "list", - "list": [ - { - "id": 95, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 96, - "kind": "text", - "text": "return Freddddddddddddd" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } } ] }, @@ -846,72 +862,48 @@ "expandedStates": null } } - ] + } }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 121, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 120, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 119, + { + "id": 107, "kind": "list", "list": [ { - "id": 108, + "id": 105, "kind": "command", "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 107, - "kind": "list", - "list": [ - { - "id": 105, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 106, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null + "command": "line", + "literal": false, + "soft": false, + "hard": true } }, { - "id": 118, + "id": 106, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 117, + "command": "breakParent" + } + } + ] + }, + { + "id": 115, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 114, + "kind": "list", + "list": [ + { + "id": 108, + "kind": "text", + "text": "with" + }, + { + "id": 113, "kind": "command", "command": { "command": "align", @@ -920,17 +912,17 @@ "n": 2 }, "alignContents": { - "id": 116, + "id": 112, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 115, + "id": 111, "kind": "list", "list": [ { - "id": 113, + "id": 109, "kind": "command", "command": { "command": "line", @@ -940,7 +932,7 @@ } }, { - "id": 114, + "id": 110, "kind": "text", "text": "Garply" } @@ -951,56 +943,27 @@ } } } - }, - "flatContents": { - "id": 112, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 111, - "kind": "list", - "list": [ - { - "id": 109, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 110, - "kind": "text", - "text": "Garply" - } - ] - }, - "break": false, - "expandedStates": null - } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null } }, { - "id": 122, + "id": 118, "kind": "text", "text": ";" } ] }, - "break": false, + "break": true, "expandedStates": null } } diff --git a/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/input.ada b/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/input.ada index 42fe5eac9..c0e5478c8 100644 --- a/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/input.ada +++ b/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/input.ada @@ -1 +1 @@ -function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Freddddddddddddd with Garply; +function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Freddddd with Garply; diff --git a/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/test.out b/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/test.out index de530859c..1b2e6ea22 100644 --- a/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/test.out +++ b/testsuite/tests/unparsing/subp_decl/long_with_short_aspects/test.out @@ -1,2 +1,2 @@ -function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Freddddddddddddd - with Garply; +function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Freddddd +with Garply; diff --git a/testsuite/tests/unparsing/subp_decl/short_overriding/doc-baseline.json b/testsuite/tests/unparsing/subp_decl/short_overriding/doc-baseline.json index 013c46064..97d6e3571 100644 --- a/testsuite/tests/unparsing/subp_decl/short_overriding/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_decl/short_overriding/doc-baseline.json @@ -24,170 +24,248 @@ } }, { - "id": 106, + "id": 108, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 105, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 104, - "kind": "list", - "list": [ - { - "id": 2, - "kind": "text", - "text": "function Foo" - }, - { - "id": 3, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } + "command": "group", + "id": 0, + "groupContents": { + "id": 107, + "kind": "list", + "list": [ + { + "id": 106, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 103, + "alignContents": { + "id": 105, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 102, + "id": 104, "kind": "list", "list": [ { - "id": 96, + "id": 2, + "kind": "text", + "text": "function Foo" + }, + { + "id": 3, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 103, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 95, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 94, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "(" - }, - { - "id": 92, + "id": 102, + "kind": "list", + "list": [ + { + "id": 96, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 95, "kind": "command", "command": { "command": "align", "alignData": { - "kind": "innerRoot" + "kind": "width", + "n": 1 }, "alignContents": { - "id": 91, + "id": 94, "kind": "list", "list": [ { - "id": 24, + "id": 4, + "kind": "text", + "text": "(" + }, + { + "id": 92, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 23, + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 91, "kind": "list", "list": [ { - "id": 15, + "id": 24, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 14, + "id": 23, "kind": "list", "list": [ { - "id": 6, + "id": 15, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 5, - "kind": "text", - "text": "A" + "id": 14, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 5, + "kind": "text", + "text": "A" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 7, + "kind": "text", + "text": " :" + }, + { + "id": 13, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 7, - "kind": "text", - "text": " :" - }, - { - "id": 13, + "id": 22, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 12, - "kind": "list", - "list": [ - { - "id": 8, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 21, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 20, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 18, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 11, + "alignContents": { + "id": 17, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 10, + "id": 16, "kind": "list", "list": [ - { - "id": 9, - "kind": "text", - "text": "Bar" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -198,173 +276,173 @@ } }, { - "id": 22, + "id": 25, + "kind": "text", + "text": ";" + }, + { + "id": 26, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 21, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "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 - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 25, - "kind": "text", - "text": ";" - }, - { - "id": 26, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 46, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 45, - "kind": "list", - "list": [ + }, { - "id": 37, + "id": 46, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 36, + "id": 45, "kind": "list", "list": [ { - "id": 28, + "id": 37, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 27, - "kind": "text", - "text": "B" + "id": 36, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 29, + "kind": "text", + "text": " :" + }, + { + "id": 35, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 31, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 29, - "kind": "text", - "text": " :" - }, - { - "id": 35, + "id": 44, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 34, - "kind": "list", - "list": [ - { - "id": 30, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 43, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 42, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 41, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 40, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 33, + "alignContents": { + "id": 39, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 32, + "id": 38, "kind": "list", "list": [ - { - "id": 31, - "kind": "text", - "text": "Baz" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -375,173 +453,173 @@ } }, { - "id": 44, + "id": 47, + "kind": "text", + "text": ";" + }, + { + "id": 48, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 43, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 42, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 41, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 40, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 39, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 38, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 47, - "kind": "text", - "text": ";" - }, - { - "id": 48, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 68, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 67, - "kind": "list", - "list": [ + }, { - "id": 59, + "id": 68, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 58, + "id": 67, "kind": "list", "list": [ { - "id": 50, + "id": 59, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 49, - "kind": "text", - "text": "C" + "id": 58, + "kind": "list", + "list": [ + { + "id": 50, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 49, + "kind": "text", + "text": "C" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 51, + "kind": "text", + "text": " :" + }, + { + "id": 57, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 56, + "kind": "list", + "list": [ + { + "id": 52, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 53, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 51, - "kind": "text", - "text": " :" - }, - { - "id": 57, + "id": 66, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 56, - "kind": "list", - "list": [ - { - "id": 52, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 65, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 64, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 63, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 62, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 55, + "alignContents": { + "id": 61, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 54, + "id": 60, "kind": "list", "list": [ - { - "id": 53, - "kind": "text", - "text": "Qux" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -552,173 +630,173 @@ } }, { - "id": 66, + "id": 69, + "kind": "text", + "text": ";" + }, + { + "id": 70, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 65, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 64, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 63, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 62, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 61, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 60, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 69, - "kind": "text", - "text": ";" - }, - { - "id": 70, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 90, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 89, - "kind": "list", - "list": [ + }, { - "id": 81, + "id": 90, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 80, + "id": 89, "kind": "list", "list": [ { - "id": 72, + "id": 81, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 71, - "kind": "text", - "text": "D" + "id": 80, + "kind": "list", + "list": [ + { + "id": 72, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 71, + "kind": "text", + "text": "D" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 73, + "kind": "text", + "text": " :" + }, + { + "id": 79, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 78, + "kind": "list", + "list": [ + { + "id": 74, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 76, + "kind": "list", + "list": [ + { + "id": 75, + "kind": "text", + "text": "Corge" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 73, - "kind": "text", - "text": " :" - }, - { - "id": 79, + "id": 88, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 78, - "kind": "list", - "list": [ - { - "id": 74, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 87, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 86, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 85, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 84, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 77, + "alignContents": { + "id": 83, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 76, + "id": 82, "kind": "list", "list": [ - { - "id": 75, - "kind": "text", - "text": "Corge" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -727,133 +805,71 @@ "break": false, "expandedStates": null } - }, - { - "id": 88, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 87, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 86, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 85, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 84, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 83, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 82, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } } ] - }, - "break": false, - "expandedStates": null + } } + }, + { + "id": 93, + "kind": "text", + "text": ")" } ] } } }, - { - "id": 93, - "kind": "text", - "text": ")" + "break": false, + "expandedStates": null + } + }, + { + "id": 101, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 100, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 99, + "kind": "list", + "list": [ + { + "id": 97, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 98, + "kind": "text", + "text": "return Fred" + } + ] + }, + "break": false, + "expandedStates": null + } } - ] + } } - } + ] }, "break": false, "expandedStates": null } - }, - { - "id": 101, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 100, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 99, - "kind": "list", - "list": [ - { - "id": 97, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 98, - "kind": "text", - "text": "return Fred" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } } ] }, @@ -861,29 +877,12 @@ "expandedStates": null } } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 108, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 107, - "kind": "list", - "list": [ + } + } ] - } + }, + "break": false, + "expandedStates": null } }, { diff --git a/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/doc-baseline.json b/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/doc-baseline.json index 1dd01840b..3ee008a23 100644 --- a/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/doc-baseline.json @@ -1,178 +1,256 @@ { - "id": 124, + "id": 120, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 123, + "id": 119, "kind": "list", "list": [ { - "id": 104, + "id": 117, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 103, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 102, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "function Foo" + "command": "group", + "id": 0, + "groupContents": { + "id": 116, + "kind": "list", + "list": [ + { + "id": 104, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 101, + "alignContents": { + "id": 103, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 100, + "id": 102, "kind": "list", "list": [ { - "id": 94, + "id": 0, + "kind": "text", + "text": "function Foo" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 101, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 93, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 92, - "kind": "list", - "list": [ - { - "id": 2, - "kind": "text", - "text": "(" - }, - { - "id": 90, + "id": 100, + "kind": "list", + "list": [ + { + "id": 94, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 93, "kind": "command", "command": { "command": "align", "alignData": { - "kind": "innerRoot" + "kind": "width", + "n": 1 }, "alignContents": { - "id": 89, + "id": 92, "kind": "list", "list": [ { - "id": 22, + "id": 2, + "kind": "text", + "text": "(" + }, + { + "id": 90, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 21, + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 89, "kind": "list", "list": [ { - "id": 13, + "id": 22, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 12, + "id": 21, "kind": "list", "list": [ { - "id": 4, + "id": 13, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 3, - "kind": "text", - "text": "A" + "id": 12, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "text", + "text": "A" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 5, + "kind": "text", + "text": " :" + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 7, + "kind": "text", + "text": "Bar" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 5, - "kind": "text", - "text": " :" - }, - { - "id": 11, + "id": 20, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 6, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 18, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 9, + "alignContents": { + "id": 15, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 8, + "id": 14, "kind": "list", "list": [ - { - "id": 7, - "kind": "text", - "text": "Bar" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -183,173 +261,173 @@ } }, { - "id": 20, + "id": 23, + "kind": "text", + "text": ";" + }, + { + "id": 24, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 19, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 18, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 17, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 23, - "kind": "text", - "text": ";" - }, - { - "id": 24, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 44, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 43, - "kind": "list", - "list": [ + }, { - "id": 35, + "id": 44, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 34, + "id": 43, "kind": "list", "list": [ { - "id": 26, + "id": 35, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 25, - "kind": "text", - "text": "B" + "id": 34, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "text", + "text": "B" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 27, + "kind": "text", + "text": " :" + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 31, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 30, + "kind": "list", + "list": [ + { + "id": 29, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 27, - "kind": "text", - "text": " :" - }, - { - "id": 33, + "id": 42, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 32, - "kind": "list", - "list": [ - { - "id": 28, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 41, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 40, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 31, + "alignContents": { + "id": 37, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 30, + "id": 36, "kind": "list", "list": [ - { - "id": 29, - "kind": "text", - "text": "Baz" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -360,173 +438,173 @@ } }, { - "id": 42, + "id": 45, + "kind": "text", + "text": ";" + }, + { + "id": 46, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 41, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 40, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 39, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 38, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 45, - "kind": "text", - "text": ";" - }, - { - "id": 46, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 66, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 65, - "kind": "list", - "list": [ + }, { - "id": 57, + "id": 66, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 56, + "id": 65, "kind": "list", "list": [ { - "id": 48, + "id": 57, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 47, - "kind": "text", - "text": "C" + "id": 56, + "kind": "list", + "list": [ + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "text", + "text": "C" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 49, + "kind": "text", + "text": " :" + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 50, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 51, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 49, - "kind": "text", - "text": " :" - }, - { - "id": 55, + "id": 64, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 54, - "kind": "list", - "list": [ - { - "id": 50, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 62, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 53, + "alignContents": { + "id": 59, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 52, + "id": 58, "kind": "list", "list": [ - { - "id": 51, - "kind": "text", - "text": "Qux" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -537,173 +615,173 @@ } }, { - "id": 64, + "id": 67, + "kind": "text", + "text": ";" + }, + { + "id": 68, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 63, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 62, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 61, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 60, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 59, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 58, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } + "command": "line", + "literal": false, + "soft": false, + "hard": false } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 67, - "kind": "text", - "text": ";" - }, - { - "id": 68, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 88, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 87, - "kind": "list", - "list": [ + }, { - "id": 79, + "id": 88, "kind": "command", "command": { "command": "group", - "id": 1, + "id": 0, "groupContents": { - "id": 78, + "id": 87, "kind": "list", "list": [ { - "id": 70, + "id": 79, "kind": "command", "command": { "command": "group", - "id": 0, + "id": 1, "groupContents": { - "id": 69, - "kind": "text", - "text": "D" + "id": 78, + "kind": "list", + "list": [ + { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "text", + "text": "D" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 71, + "kind": "text", + "text": " :" + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 76, + "kind": "list", + "list": [ + { + "id": 72, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 75, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 74, + "kind": "list", + "list": [ + { + "id": 73, + "kind": "text", + "text": "Corge" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] }, "break": false, "expandedStates": null } }, { - "id": 71, - "kind": "text", - "text": " :" - }, - { - "id": 77, + "id": 86, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 76, - "kind": "list", - "list": [ - { - "id": 72, + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 85, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 84, "kind": "command", "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false + "command": "group", + "id": 0, + "groupContents": { + "id": 83, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null } + } + } + }, + "flatContents": { + "id": 82, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 75, + "alignContents": { + "id": 81, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 74, + "id": 80, "kind": "list", "list": [ - { - "id": 73, - "kind": "text", - "text": "Corge" - } ] }, "break": false, "expandedStates": null } } - ] + } } } } @@ -712,133 +790,71 @@ "break": false, "expandedStates": null } - }, - { - "id": 86, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 85, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 84, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 83, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 82, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 81, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 80, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - } } ] - }, - "break": false, - "expandedStates": null + } } + }, + { + "id": 91, + "kind": "text", + "text": ")" } ] } } }, - { - "id": 91, - "kind": "text", - "text": ")" + "break": false, + "expandedStates": null + } + }, + { + "id": 99, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 98, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 97, + "kind": "list", + "list": [ + { + "id": 95, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 96, + "kind": "text", + "text": "return Fred" + } + ] + }, + "break": false, + "expandedStates": null + } } - ] + } } - } + ] }, "break": false, "expandedStates": null } - }, - { - "id": 99, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 98, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 97, - "kind": "list", - "list": [ - { - "id": 95, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 96, - "kind": "text", - "text": "return Fred" - } - ] - }, - "break": false, - "expandedStates": null - } - } - } } ] }, @@ -846,72 +862,48 @@ "expandedStates": null } } - ] + } }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 121, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 120, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 119, + { + "id": 107, "kind": "list", "list": [ { - "id": 108, + "id": 105, "kind": "command", "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 107, - "kind": "list", - "list": [ - { - "id": 105, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 106, - "kind": "text", - "text": "with" - } - ] - }, - "break": false, - "expandedStates": null + "command": "line", + "literal": false, + "soft": false, + "hard": true } }, { - "id": 118, + "id": 106, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 117, + "command": "breakParent" + } + } + ] + }, + { + "id": 115, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 114, + "kind": "list", + "list": [ + { + "id": 108, + "kind": "text", + "text": "with" + }, + { + "id": 113, "kind": "command", "command": { "command": "align", @@ -920,17 +912,17 @@ "n": 2 }, "alignContents": { - "id": 116, + "id": 112, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 115, + "id": 111, "kind": "list", "list": [ { - "id": 113, + "id": 109, "kind": "command", "command": { "command": "line", @@ -940,9 +932,9 @@ } }, { - "id": 114, + "id": 110, "kind": "text", - "text": "Garplyyyyyyyyyyyyyyyyyy" + "text": "Garplyyyyy" } ] }, @@ -951,56 +943,27 @@ } } } - }, - "flatContents": { - "id": 112, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 111, - "kind": "list", - "list": [ - { - "id": 109, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 110, - "kind": "text", - "text": "Garplyyyyyyyyyyyyyyyyyy" - } - ] - }, - "break": false, - "expandedStates": null - } } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null } }, { - "id": 122, + "id": 118, "kind": "text", "text": ";" } ] }, - "break": false, + "break": true, "expandedStates": null } } diff --git a/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/input.ada b/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/input.ada index 1a73577e1..84ae3a986 100644 --- a/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/input.ada +++ b/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/input.ada @@ -1 +1 @@ -function Foo(A:Bar;B:Baz;C:Qux;D:Corge)return Fred with Garplyyyyyyyyyyyyyyyyyy; +function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Fred with Garplyyyyy; diff --git a/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/test.out b/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/test.out index 8eb346783..d2671de01 100644 --- a/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/test.out +++ b/testsuite/tests/unparsing/subp_decl/short_with_long_aspects/test.out @@ -1,2 +1,2 @@ -function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Fred with - Garplyyyyyyyyyyyyyyyyyy; +function Foo (A : Bar; B : Baz; C : Qux; D : Corge) return Fred +with Garplyyyyy;