From 1ce4a9af92b1631e4785e06b6b191d0171abd209 Mon Sep 17 00:00:00 2001 From: Monika Kurovszky Date: Tue, 9 Apr 2024 19:56:04 +0200 Subject: [PATCH 1/3] Add IncompleteTaggedTypeDecl config --- extensions/default_unparsing_config.json | 55 +++++++++++ .../indefinite_tagged/doc-baseline.json | 99 +++++++++++++++++++ .../indefinite_tagged/input.ada | 1 + .../indefinite_tagged/test.out | 1 + .../indefinite_tagged/test.yaml | 7 ++ .../doc-baseline.json | 99 +++++++++++++++++++ .../indefinite_tagged_abstract/input.ada | 1 + .../indefinite_tagged_abstract/test.out | 1 + .../indefinite_tagged_abstract/test.yaml | 7 ++ .../long_name/doc-baseline.json | 84 ++++++++++++++++ .../long_name/input.ada | 1 + .../long_name/test.out | 3 + .../long_name/test.yaml | 9 ++ .../long_with_discriminants/doc-baseline.json | 99 +++++++++++++++++++ .../long_with_discriminants/input.ada | 1 + .../long_with_discriminants/test.out | 3 + .../long_with_discriminants/test.yaml | 9 ++ .../simple_type/doc-baseline.json | 84 ++++++++++++++++ .../simple_type/input.ada | 1 + .../simple_type/test.out | 1 + .../simple_type/test.yaml | 7 ++ .../with_abstract/doc-baseline.json | 84 ++++++++++++++++ .../with_abstract/input.ada | 1 + .../with_abstract/test.out | 1 + .../with_abstract/test.yaml | 7 ++ 25 files changed, 666 insertions(+) create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.out create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.out create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.out create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.out create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.out create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.out create mode 100644 testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.yaml diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index bb0502583..a12639ff6 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -2863,6 +2863,61 @@ ] } }, + "IncompleteTaggedTypeDecl": { + "node": { + "kind": "group", + "document": [ + { + "kind": "text", + "text": "type" + }, + { + "kind": "align", + "width": 2, + "contents": [ + "line", + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_name" + }, + { + "kind": "recurse_field", + "field": "f_discriminants" + } + ] + } + ] + }, + "line", + { + "kind": "text", + "text": "is" + }, + "whitespace", + { + "kind": "recurse_field", + "field": "f_has_abstract" + }, + { + "kind": "text", + "text": "tagged" + }, + { + "kind": "text", + "text": ";" + } + ] + }, + "fields": { + "f_discriminants": [ + "line", + "recurse" + ] + } + }, "InterfaceTypeDef": { "node": { "kind": "group", diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/doc-baseline.json b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/doc-baseline.json new file mode 100644 index 000000000..20176f8f7 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/doc-baseline.json @@ -0,0 +1,99 @@ +{ + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Person" + }, + { + "id": 3, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "text", + "text": "(<>)" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 10, + "kind": "text", + "text": "is tagged;" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/input.ada b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/input.ada new file mode 100644 index 000000000..81b22bfb7 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/input.ada @@ -0,0 +1 @@ +type Person(<>) is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.out b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.out new file mode 100644 index 000000000..39f6a4eea --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.out @@ -0,0 +1 @@ +type Person (<>) is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.yaml b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.yaml new file mode 100644 index 000000000..407df294a --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged/test.yaml @@ -0,0 +1,7 @@ +description: | + This test checks the formatting of an incomplete indefinite + tagged type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/doc-baseline.json b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/doc-baseline.json new file mode 100644 index 000000000..fcf5a8bdc --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/doc-baseline.json @@ -0,0 +1,99 @@ +{ + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Person" + }, + { + "id": 3, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "text", + "text": "(<>)" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 10, + "kind": "text", + "text": "is abstract tagged;" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/input.ada b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/input.ada new file mode 100644 index 000000000..61fdfb07d --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/input.ada @@ -0,0 +1 @@ +type Person(<>) is abstract tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.out b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.out new file mode 100644 index 000000000..91e68909e --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.out @@ -0,0 +1 @@ +type Person (<>) is abstract tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.yaml b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.yaml new file mode 100644 index 000000000..446dd6049 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/indefinite_tagged_abstract/test.yaml @@ -0,0 +1,7 @@ +description: | + This test checks the formatting of an incomplete indefinite + abstract tagged type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/doc-baseline.json b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/doc-baseline.json new file mode 100644 index 000000000..f0e5b4981 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/doc-baseline.json @@ -0,0 +1,84 @@ +{ + "id": 10, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 9, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "VeeeeeeeeeeeerrrrrrrrrrrrrrrrrrrryLooooooooooooooooooooongNaaaaaaaaaaaaame" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 7, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 8, + "kind": "text", + "text": "is tagged;" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/input.ada b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/input.ada new file mode 100644 index 000000000..ce4722579 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/input.ada @@ -0,0 +1 @@ +type VeeeeeeeeeeeerrrrrrrrrrrrrrrrrrrryLooooooooooooooooooooongNaaaaaaaaaaaaame is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.out b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.out new file mode 100644 index 000000000..9bda38685 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.out @@ -0,0 +1,3 @@ +type + VeeeeeeeeeeeerrrrrrrrrrrrrrrrrrrryLooooooooooooooooooooongNaaaaaaaaaaaaame +is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.yaml b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.yaml new file mode 100644 index 000000000..bd277a542 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_name/test.yaml @@ -0,0 +1,9 @@ +description: | + This test checks the formatting of a simple incomplete + tagged type declaration. + It is expected the declaration breaks after `type` and + before `is` keywords and the new line be indented; the + `type` and `is` keywords are aligned. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/doc-baseline.json b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/doc-baseline.json new file mode 100644 index 000000000..90d333f6f --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/doc-baseline.json @@ -0,0 +1,99 @@ +{ + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "VeeeeeeeeeeerrrrrrrrrrrrryLooooooooooonnnnnnnnnnngNaaaaaaaaaaaaame" + }, + { + "id": 3, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "text", + "text": "(<>)" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 10, + "kind": "text", + "text": "is tagged;" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/input.ada b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/input.ada new file mode 100644 index 000000000..e8e599cf6 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/input.ada @@ -0,0 +1 @@ +type VeeeeeeeeeeerrrrrrrrrrrrryLooooooooooonnnnnnnnnnngNaaaaaaaaaaaaame(<>) is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.out b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.out new file mode 100644 index 000000000..a2340bfbe --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.out @@ -0,0 +1,3 @@ +type + VeeeeeeeeeeerrrrrrrrrrrrryLooooooooooonnnnnnnnnnngNaaaaaaaaaaaaame (<>) +is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.yaml b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.yaml new file mode 100644 index 000000000..41338bc51 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/long_with_discriminants/test.yaml @@ -0,0 +1,9 @@ +description: | + This test checks the formatting of a simple indefinite + incomplete tagged type declaration. + It is expected the declaration breaks after `type` and + before `is` keywords and the new line be indented; the + `type` and `is` keywords are aligned. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/doc-baseline.json b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/doc-baseline.json new file mode 100644 index 000000000..fbfffa997 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/doc-baseline.json @@ -0,0 +1,84 @@ +{ + "id": 10, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 9, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "T" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 7, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 8, + "kind": "text", + "text": "is tagged;" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/input.ada b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/input.ada new file mode 100644 index 000000000..537acc720 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/input.ada @@ -0,0 +1 @@ +type T is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.out b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.out new file mode 100644 index 000000000..537acc720 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.out @@ -0,0 +1 @@ +type T is tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.yaml b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.yaml new file mode 100644 index 000000000..13deb641a --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/simple_type/test.yaml @@ -0,0 +1,7 @@ +description: | + This test checks the formatting of a simple incomplete + tagged type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/doc-baseline.json b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/doc-baseline.json new file mode 100644 index 000000000..45abee7ae --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/doc-baseline.json @@ -0,0 +1,84 @@ +{ + "id": 10, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 9, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "T" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 7, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 8, + "kind": "text", + "text": "is abstract tagged;" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/input.ada b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/input.ada new file mode 100644 index 000000000..900f50b24 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/input.ada @@ -0,0 +1 @@ +type T is abstract tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.out b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.out new file mode 100644 index 000000000..900f50b24 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.out @@ -0,0 +1 @@ +type T is abstract tagged; diff --git a/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.yaml b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.yaml new file mode 100644 index 000000000..a458c8d6f --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_tagged_type_decl/with_abstract/test.yaml @@ -0,0 +1,7 @@ +description: | + This test checks the formatting of an abstract incomplete + tagged type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: incomplete_type_decl From 1029b5e2f4c7255ab72b11be6da1ea92d21f895f Mon Sep 17 00:00:00 2001 From: Monika Kurovszky Date: Wed, 10 Apr 2024 10:14:56 +0200 Subject: [PATCH 2/3] Add IncompleteTypeDecl config --- extensions/default_unparsing_config.json | 41 +++++++++ .../long_name/doc-baseline.json | 74 +++++++++++++++ .../incomplete_type_decl/long_name/input.ada | 1 + .../incomplete_type_decl/long_name/test.out | 2 + .../incomplete_type_decl/long_name/test.yaml | 8 ++ .../long_with_discriminants/doc-baseline.json | 89 +++++++++++++++++++ .../long_with_discriminants/input.ada | 1 + .../long_with_discriminants/test.out | 2 + .../long_with_discriminants/test.yaml | 8 ++ .../simple_type/doc-baseline.json | 74 +++++++++++++++ .../simple_type/input.ada | 1 + .../incomplete_type_decl/simple_type/test.out | 1 + .../simple_type/test.yaml | 6 ++ .../with_discriminant/doc-baseline.json | 89 +++++++++++++++++++ .../with_discriminant/input.ada | 1 + .../with_discriminant/test.out | 1 + .../with_discriminant/test.yaml | 7 ++ 17 files changed, 406 insertions(+) create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_name/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_name/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_name/test.out create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_name/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.out create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/simple_type/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/simple_type/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.out create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.out create mode 100644 testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.yaml diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index a12639ff6..5903f3d24 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -2863,6 +2863,47 @@ ] } }, + "IncompleteTypeDecl": { + "node": { + "kind": "group", + "document": [ + { + "kind": "text", + "text": "type" + }, + { + "kind": "align", + "width": 2, + "contents": [ + "line", + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_name" + }, + { + "kind": "recurse_field", + "field": "f_discriminants" + } + ] + } + ] + }, + { + "kind": "text", + "text": ";" + } + ] + }, + "fields": { + "f_discriminants": [ + "line", + "recurse" + ] + } + }, "IncompleteTaggedTypeDecl": { "node": { "kind": "group", diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_name/doc-baseline.json b/testsuite/tests/unparsing/incomplete_type_decl/long_name/doc-baseline.json new file mode 100644 index 000000000..8995082c0 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_name/doc-baseline.json @@ -0,0 +1,74 @@ +{ + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "TyyyyyypeWithVeeeeeeerrrrrrrrrrrrrrrryLoooooooooooooooooongNaaaaaaaaaaaaame" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 7, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_name/input.ada b/testsuite/tests/unparsing/incomplete_type_decl/long_name/input.ada new file mode 100644 index 000000000..4fddd81e2 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_name/input.ada @@ -0,0 +1 @@ +type TyyyyyypeWithVeeeeeeerrrrrrrrrrrrrrrryLoooooooooooooooooongNaaaaaaaaaaaaame; diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_name/test.out b/testsuite/tests/unparsing/incomplete_type_decl/long_name/test.out new file mode 100644 index 000000000..25d62cabd --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_name/test.out @@ -0,0 +1,2 @@ +type + TyyyyyypeWithVeeeeeeerrrrrrrrrrrrrrrryLoooooooooooooooooongNaaaaaaaaaaaaame; diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_name/test.yaml b/testsuite/tests/unparsing/incomplete_type_decl/long_name/test.yaml new file mode 100644 index 000000000..259c5a2d1 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_name/test.yaml @@ -0,0 +1,8 @@ +description: | + This test checks the formatting of a simple incomplete + type declaration with a long name. + It is expected the declaration breaks after `type` and + the new line be indented. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/doc-baseline.json b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/doc-baseline.json new file mode 100644 index 000000000..81e6dbbfb --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/doc-baseline.json @@ -0,0 +1,89 @@ +{ + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "VeeeeeeeeeeerrrrrrrrrrrrryLooooooooooonnnnnnnnnnngNaaaaaaaaaaaaameType" + }, + { + "id": 3, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "text", + "text": "(<>)" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 9, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/input.ada b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/input.ada new file mode 100644 index 000000000..b93f63f92 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/input.ada @@ -0,0 +1 @@ +type VeeeeeeeeeeerrrrrrrrrrrrryLooooooooooonnnnnnnnnnngNaaaaaaaaaaaaameType(<>); diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.out b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.out new file mode 100644 index 000000000..12f0c0691 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.out @@ -0,0 +1,2 @@ +type + VeeeeeeeeeeerrrrrrrrrrrrryLooooooooooonnnnnnnnnnngNaaaaaaaaaaaaameType (<>); diff --git a/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.yaml b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.yaml new file mode 100644 index 000000000..2a1e5d931 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/long_with_discriminants/test.yaml @@ -0,0 +1,8 @@ +description: | + This test checks the formatting of a simple indefinite + incomplete type declaration. + It is expected the declaration breaks after `type` and + the new line be indented. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_type_decl/simple_type/doc-baseline.json b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/doc-baseline.json new file mode 100644 index 000000000..d03d8fdd7 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/doc-baseline.json @@ -0,0 +1,74 @@ +{ + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Cell" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 7, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_type_decl/simple_type/input.ada b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/input.ada new file mode 100644 index 000000000..0f51d1df5 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/input.ada @@ -0,0 +1 @@ +type Cell; diff --git a/testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.out b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.out new file mode 100644 index 000000000..0f51d1df5 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.out @@ -0,0 +1 @@ +type Cell; diff --git a/testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.yaml b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.yaml new file mode 100644 index 000000000..8055e5167 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/simple_type/test.yaml @@ -0,0 +1,6 @@ +description: | + This test checks the formatting of a simple incomplete type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: incomplete_type_decl diff --git a/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/doc-baseline.json b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/doc-baseline.json new file mode 100644 index 000000000..f6cf1235e --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/doc-baseline.json @@ -0,0 +1,89 @@ +{ + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Person" + }, + { + "id": 3, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "text", + "text": "(<>)" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 9, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/input.ada b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/input.ada new file mode 100644 index 000000000..dd12d87eb --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/input.ada @@ -0,0 +1 @@ +type Person(<>); diff --git a/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.out b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.out new file mode 100644 index 000000000..55c279678 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.out @@ -0,0 +1 @@ +type Person (<>); diff --git a/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.yaml b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.yaml new file mode 100644 index 000000000..52fb550c2 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_type_decl/with_discriminant/test.yaml @@ -0,0 +1,7 @@ +description: | + This test checks the formatting of a simple indefinite + incomplete type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: incomplete_type_decl From bc9eb6b8a84f0a82e1859bee6d59a5ed101033fc Mon Sep 17 00:00:00 2001 From: Monika Kurovszky Date: Wed, 10 Apr 2024 13:19:08 +0200 Subject: [PATCH 3/3] Add IncompleteFormalTypeDecl config --- extensions/default_unparsing_config.json | 71 + .../multiple_long_aspects/doc-baseline.json | 759 +++--- .../multiple_short_aspects/doc-baseline.json | 665 +++--- .../complete/doc-baseline.json | 863 +++---- .../no_prelude_no_pragma/doc-baseline.json | 311 ++- .../simple_type/both_long/doc-baseline.json | 169 ++ .../simple_type/both_long/input.ada | 1 + .../simple_type/both_long/test.out | 4 + .../simple_type/both_long/test.yaml | 10 + .../long_default/doc-baseline.json | 169 ++ .../simple_type/long_default/input.ada | 1 + .../simple_type/long_default/test.out | 3 + .../simple_type/long_default/test.yaml | 9 + .../simple_type/long_name/doc-baseline.json | 169 ++ .../simple_type/long_name/input.ada | 1 + .../simple_type/long_name/test.out | 2 + .../simple_type/long_name/test.yaml | 9 + .../simple_type/short_names/doc-baseline.json | 169 ++ .../simple_type/short_names/input.ada | 1 + .../simple_type/short_names/test.out | 1 + .../simple_type/short_names/test.yaml | 7 + .../tagged_type/both_long/doc-baseline.json | 174 ++ .../tagged_type/both_long/input.ada | 1 + .../tagged_type/both_long/test.out | 4 + .../tagged_type/both_long/test.yaml | 10 + .../long_default/doc-baseline.json | 174 ++ .../tagged_type/long_default/input.ada | 1 + .../tagged_type/long_default/test.out | 3 + .../tagged_type/long_default/test.yaml | 9 + .../tagged_type/long_name/doc-baseline.json | 174 ++ .../tagged_type/long_name/input.ada | 1 + .../tagged_type/long_name/test.out | 3 + .../tagged_type/long_name/test.yaml | 9 + .../tagged_type/short_names/doc-baseline.json | 174 ++ .../tagged_type/short_names/input.ada | 1 + .../tagged_type/short_names/test.out | 1 + .../tagged_type/short_names/test.yaml | 7 + .../short_names_w_stmts/doc-baseline.json | 741 +++--- .../short_names_wo_stmts/doc-baseline.json | 571 +++-- .../long_aspect/doc-baseline.json | 798 ++++--- .../package_decl/long_name/doc-baseline.json | 798 ++++--- .../long_name_and_aspect/doc-baseline.json | 798 ++++--- .../no_end_name/doc-baseline.json | 798 ++++--- .../no_private_part/doc-baseline.json | 571 +++-- .../short_names/doc-baseline.json | 798 ++++--- .../subp_body/no_end_name/doc-baseline.json | 2099 +++++++++-------- .../subp_body/with_decls/doc-baseline.json | 2099 +++++++++-------- 47 files changed, 8532 insertions(+), 5679 deletions(-) create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.yaml create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/doc-baseline.json create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/input.ada create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.out create mode 100644 testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.yaml diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index 5903f3d24..cff9f626e 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -2863,6 +2863,77 @@ ] } }, + "IncompleteFormalTypeDecl": { + "node": { + "kind": "group", + "document": [ + { + "kind": "group", + "document": [ + { + "kind": "text", + "text": "type" + }, + { + "kind": "align", + "width": 2, + "contents": [ + "line", + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_name" + }, + { + "kind": "recurse_field", + "field": "f_discriminants" + } + ] + } + ] + } + ] + }, + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_is_tagged" + }, + "line", + { + "kind": "group", + "document": { + "kind": "recurse_field", + "field": "f_default_type" + } + } + ] + }, + { + "kind": "text", + "text": ";" + } + ] + }, + "fields": { + "f_discriminants": [ + "line", + "recurse" + ], + "f_default_type": { + "kind": "align", + "width": 2, + "contents": [ + "line", + "recurse" + ] + } + } + }, "IncompleteTypeDecl": { "node": { "kind": "group", 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 7269f1ce2..4b3b9958b 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,345 +1,414 @@ -{ - "id": 44, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 31, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" - }, - { - "id": 28, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 27, - "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": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 24, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 23, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 22, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 10, - "kind": "text", - "text": "," - }, - { - "id": 11, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 12, - "kind": "text", - "text": "Baz" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 16, - "kind": "text", - "text": "," - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 21, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 20, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 18, - "kind": "text", - "text": "Quuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuux" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 30, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 39, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 38, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 37, - "kind": "list", - "list": [ - { - "id": 35, - "kind": "list", - "list": [ - { - "id": 33, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 34, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 36, - "kind": "text", - "text": "type Corge;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 42, - "kind": "list", - "list": [ - { - "id": 40, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 41, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 43, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 53, + "kind": "list", + "list": [ + { + "id": 32, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 31, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 27, + "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": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 24, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 23, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 22, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 10, + "kind": "text", + "text": "," + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "text", + "text": "Baz" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 16, + "kind": "text", + "text": "," + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 18, + "kind": "text", + "text": "Quuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuux" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 29, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 30, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 47, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 46, + "kind": "list", + "list": [ + { + "id": 35, + "kind": "list", + "list": [ + { + "id": 33, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 34, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + { + "id": 36, + "kind": "text", + "text": "type" + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 41, + "kind": "list", + "list": [ + { + "id": 37, + "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": 38, + "kind": "text", + "text": "Corge" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 43, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "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": 52, + "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 2954787ce..2b9e5f593 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,298 +1,367 @@ -{ - "id": 38, - "kind": "list", - "list": [ - { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foo" - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 21, - "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": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "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": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 10, - "kind": "text", - "text": "," - }, - { - "id": 11, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 12, - "kind": "text", - "text": "Baz" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 23, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 24, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 33, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 32, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 31, - "kind": "list", - "list": [ - { - "id": 29, - "kind": "list", - "list": [ - { - "id": 27, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 28, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 30, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 35, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 37, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 47, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 21, + "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": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "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": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 10, + "kind": "text", + "text": "," + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "text", + "text": "Baz" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 23, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 24, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 41, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 40, + "kind": "list", + "list": [ + { + "id": 29, + "kind": "list", + "list": [ + { + "id": 27, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 39, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 38, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "text", + "text": "type" + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 35, + "kind": "list", + "list": [ + { + "id": 31, + "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": 32, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 37, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 45, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 44, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 46, + "kind": "text", + "text": "end Foo;" + } + ] +} diff --git a/testsuite/tests/unparsing/compilation_unit/complete/doc-baseline.json b/testsuite/tests/unparsing/compilation_unit/complete/doc-baseline.json index f26730ab2..257e46f8a 100644 --- a/testsuite/tests/unparsing/compilation_unit/complete/doc-baseline.json +++ b/testsuite/tests/unparsing/compilation_unit/complete/doc-baseline.json @@ -1,397 +1,466 @@ -{ - "id": 53, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 4, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "with " - }, - { - "id": 2, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 1, - "kind": "text", - "text": "Foo" - } - } - }, - { - "id": 3, - "kind": "text", - "text": ";" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 8, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 7, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 9, - "kind": "text", - "text": "with " - }, - { - "id": 11, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 10, - "kind": "text", - "text": "Bar" - } - } - }, - { - "id": 12, - "kind": "text", - "text": ";" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 17, - "kind": "list", - "list": [ - { - "id": 15, - "kind": "command", - "command": { - "command": "line", - "literal": true, - "soft": false, - "hard": false - } - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 20, - "kind": "list", - "list": [ - { - "id": 18, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 19, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 25, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 24, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "text", - "text": "package Baz" - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 23, - "kind": "text", - "text": "is" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 32, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 31, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "list", - "list": [ - { - "id": 26, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 29, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 35, - "kind": "list", - "list": [ - { - "id": 33, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 34, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 36, - "kind": "text", - "text": "end Baz;" - }, - { - "id": 39, - "kind": "list", - "list": [ - { - "id": 37, - "kind": "command", - "command": { - "command": "line", - "literal": true, - "soft": false, - "hard": false - } - }, - { - "id": 38, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 42, - "kind": "list", - "list": [ - { - "id": 40, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 41, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 52, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 51, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 50, - "kind": "list", - "list": [ - { - "id": 43, - "kind": "text", - "text": "pragma" - }, - { - "id": 44, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "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": "list", - "list": [ - { - "id": 45, - "kind": "text", - "text": "Corge" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 49, - "kind": "text", - "text": ";" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] -} +{ + "id": 62, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 4, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "with " + }, + { + "id": 2, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 1, + "kind": "text", + "text": "Foo" + } + } + }, + { + "id": 3, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 8, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 7, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": "with " + }, + { + "id": 11, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 10, + "kind": "text", + "text": "Bar" + } + } + }, + { + "id": 12, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 17, + "kind": "list", + "list": [ + { + "id": 15, + "kind": "command", + "command": { + "command": "line", + "literal": true, + "soft": false, + "hard": false + } + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 20, + "kind": "list", + "list": [ + { + "id": 18, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 25, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 24, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "text", + "text": "package Baz" + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 23, + "kind": "text", + "text": "is" + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 41, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 40, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 27, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 37, + "kind": "list", + "list": [ + { + "id": 29, + "kind": "text", + "text": "type" + }, + { + "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": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 36, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 44, + "kind": "list", + "list": [ + { + "id": 42, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 43, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 45, + "kind": "text", + "text": "end Baz;" + }, + { + "id": 48, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "command", + "command": { + "command": "line", + "literal": true, + "soft": false, + "hard": false + } + }, + { + "id": 47, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "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": 61, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 59, + "kind": "list", + "list": [ + { + "id": 52, + "kind": "text", + "text": "pragma" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 57, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 56, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 55, + "kind": "list", + "list": [ + { + "id": 54, + "kind": "text", + "text": "Corge" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 58, + "kind": "text", + "text": ";" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] +} diff --git a/testsuite/tests/unparsing/compilation_unit/no_prelude_no_pragma/doc-baseline.json b/testsuite/tests/unparsing/compilation_unit/no_prelude_no_pragma/doc-baseline.json index c86f748f5..499d703fe 100644 --- a/testsuite/tests/unparsing/compilation_unit/no_prelude_no_pragma/doc-baseline.json +++ b/testsuite/tests/unparsing/compilation_unit/no_prelude_no_pragma/doc-baseline.json @@ -1,121 +1,190 @@ -{ - "id": 16, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 3, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Baz" - }, - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 2, - "kind": "text", - "text": "is" - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 11, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 10, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 9, - "kind": "list", - "list": [ - { - "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": 8, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 14, - "kind": "list", - "list": [ - { - "id": 12, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 13, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 15, - "kind": "text", - "text": "end Baz;" - } - ] -} +{ + "id": 25, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Baz" + }, + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 2, + "kind": "text", + "text": "is" + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "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": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "text", + "text": "type" + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 11, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 15, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 24, + "kind": "text", + "text": "end Baz;" + } + ] +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/doc-baseline.json new file mode 100644 index 000000000..475ee259c --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/doc-baseline.json @@ -0,0 +1,169 @@ +{ + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Very_Long_Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 15, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "or use" + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 12, + "kind": "text", + "text": "Veeeeeery_Looooong_Dddddddddddddddddddddddddddddddddddddddddddddddddddddd" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/input.ada new file mode 100644 index 000000000..b71430cd2 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/input.ada @@ -0,0 +1 @@ +type Very_Long_Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame or use Veeeeeery_Looooong_Dddddddddddddddddddddddddddddddddddddddddddddddddddddd; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.out new file mode 100644 index 000000000..60f179c9b --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.out @@ -0,0 +1,4 @@ +type + Very_Long_Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame +or use + Veeeeeery_Looooong_Dddddddddddddddddddddddddddddddddddddddddddddddddddddd; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.yaml new file mode 100644 index 000000000..c6f18fd5a --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/both_long/test.yaml @@ -0,0 +1,10 @@ +description: | + This test checks the formatting of a simple incomplete + formal type declaration with long type and and default + type names. + It is expected the declaration breaks before `or` and + after `type` and `use` and keywords, the new lines be + indented and `type` and `or` keywords be aligned. + +driver: unparser +rule: formal_type_decl diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/doc-baseline.json new file mode 100644 index 000000000..5014d49a9 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/doc-baseline.json @@ -0,0 +1,169 @@ +{ + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "T" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 15, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "or use" + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 12, + "kind": "text", + "text": "Deffffffffffault_loooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnng" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/input.ada new file mode 100644 index 000000000..df417cb02 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/input.ada @@ -0,0 +1 @@ +type T or use Deffffffffffault_loooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnng; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.out new file mode 100644 index 000000000..aa28059ad --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.out @@ -0,0 +1,3 @@ +type T +or use + Deffffffffffault_loooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnng; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.yaml new file mode 100644 index 000000000..48b29720d --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_default/test.yaml @@ -0,0 +1,9 @@ +description: | + This test checks the formatting of a simple incomplete + formal type declaration with long default type name. + It is expected the declaration breaks before 'or` and + after `use` keywords, the new line be indented and + `type` and `or` keywords be aligned. + +driver: unparser +rule: formal_type_decl diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/doc-baseline.json new file mode 100644 index 000000000..8b42eb977 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/doc-baseline.json @@ -0,0 +1,169 @@ +{ + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 15, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "or use" + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 12, + "kind": "text", + "text": "D" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/input.ada new file mode 100644 index 000000000..ea4c0ef33 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/input.ada @@ -0,0 +1 @@ +type Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.out new file mode 100644 index 000000000..6932c3265 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.out @@ -0,0 +1,2 @@ +type Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame +or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.yaml new file mode 100644 index 000000000..8b91c1647 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/long_name/test.yaml @@ -0,0 +1,9 @@ +description: | + This test checks the formatting of a simple incomplete + formal type declaration with long type name. + It is expected the declaration breaks after `type` and + before `or` keywords, the new line is not indented and + `type` and `or` keywords be aligned. + +driver: unparser +rule: formal_type_decl diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/doc-baseline.json new file mode 100644 index 000000000..55cba838f --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/doc-baseline.json @@ -0,0 +1,169 @@ +{ + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "T" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 15, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "or use" + }, + { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 12, + "kind": "text", + "text": "D" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/input.ada new file mode 100644 index 000000000..177395165 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/input.ada @@ -0,0 +1 @@ +type T or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.out new file mode 100644 index 000000000..177395165 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.out @@ -0,0 +1 @@ +type T or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.yaml new file mode 100644 index 000000000..3711acafc --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/simple_type/short_names/test.yaml @@ -0,0 +1,7 @@ +description: | + This test checks the formatting of a simple incomplete + formal type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: formal_type_decl diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/doc-baseline.json new file mode 100644 index 000000000..1813f0b99 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/doc-baseline.json @@ -0,0 +1,174 @@ +{ + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Veeeeeeeeeeeery_Long_Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": " is tagged" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "text", + "text": "or use" + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 13, + "kind": "text", + "text": "Veeeeeery_Looooong_Dddddddddddddddddddddddddddddddddddddddddddddddddddddd" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/input.ada new file mode 100644 index 000000000..5ea4479b7 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/input.ada @@ -0,0 +1 @@ +type Veeeeeeeeeeeery_Long_Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame is tagged or use Veeeeeery_Looooong_Dddddddddddddddddddddddddddddddddddddddddddddddddddddd; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.out new file mode 100644 index 000000000..03bfe5dbc --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.out @@ -0,0 +1,4 @@ +type + Veeeeeeeeeeeery_Long_Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame is tagged +or use + Veeeeeery_Looooong_Dddddddddddddddddddddddddddddddddddddddddddddddddddddd; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.yaml new file mode 100644 index 000000000..c1c5f07f7 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/both_long/test.yaml @@ -0,0 +1,10 @@ +description: | + This test checks the formatting of a simple incomplete + tagged formal type declaration with long type names + and default type. + It is expected the declaration breaks after `type`, + `tagged` and `use` keywords, the new lines be indented + and `type` and `or` keywords be aligned. + +driver: unparser +rule: formal_type_decl diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/doc-baseline.json new file mode 100644 index 000000000..a80293c5d --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/doc-baseline.json @@ -0,0 +1,174 @@ +{ + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "T" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": " is tagged" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "text", + "text": "or use" + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 13, + "kind": "text", + "text": "Deffffffffffault_loooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnng" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/input.ada new file mode 100644 index 000000000..4bbaaa115 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/input.ada @@ -0,0 +1 @@ +type T is tagged or use Deffffffffffault_loooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnng; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.out new file mode 100644 index 000000000..584632c7b --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.out @@ -0,0 +1,3 @@ +type T is tagged +or use + Deffffffffffault_loooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnng; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.yaml new file mode 100644 index 000000000..8f95c943d --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_default/test.yaml @@ -0,0 +1,9 @@ +description: | + This test checks the formatting of a simple incomplete + tagged formal type declaration with long default type name. + It is expected the declaration breaks after 'tagged` and + `use` keywords, the new line be indented and `type` and + `or` keywords be aligned. + +driver: unparser +rule: formal_type_decl diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/doc-baseline.json new file mode 100644 index 000000000..175024a58 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/doc-baseline.json @@ -0,0 +1,174 @@ +{ + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": " is tagged" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "text", + "text": "or use" + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 13, + "kind": "text", + "text": "D" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/input.ada new file mode 100644 index 000000000..f38552752 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/input.ada @@ -0,0 +1 @@ +type Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame is tagged or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.out new file mode 100644 index 000000000..73870df9a --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.out @@ -0,0 +1,3 @@ +type + Tyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyype_Naaaaaaaaaaaaaame is tagged +or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.yaml new file mode 100644 index 000000000..b8be731b0 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/long_name/test.yaml @@ -0,0 +1,9 @@ +description: | + This test checks the formatting of a simple incomplete + tagged formal type declaration with long type name. + It is expected the declaration breaks after `type` and + `tagged` keywords, the new line be indented and `type` + and `or` keywords be aligned. + +driver: unparser +rule: formal_type_decl diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/doc-baseline.json b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/doc-baseline.json new file mode 100644 index 000000000..d319739b2 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/doc-baseline.json @@ -0,0 +1,174 @@ +{ + "id": 22, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 21, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "type" + }, + { + "id": 6, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 5, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 2, + "kind": "text", + "text": "T" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": " is tagged" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 11, + "kind": "text", + "text": "or use" + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 13, + "kind": "text", + "text": "D" + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 20, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/input.ada b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/input.ada new file mode 100644 index 000000000..0d544b731 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/input.ada @@ -0,0 +1 @@ +type T is tagged or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.out b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.out new file mode 100644 index 000000000..0d544b731 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.out @@ -0,0 +1 @@ +type T is tagged or use D; diff --git a/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.yaml b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.yaml new file mode 100644 index 000000000..29419ef80 --- /dev/null +++ b/testsuite/tests/unparsing/incomplete_formal_type_decl/tagged_type/short_names/test.yaml @@ -0,0 +1,7 @@ +description: | + This test checks the formatting of a simple incomplete + tagged formal type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: formal_type_decl 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 09b535b56..25a0db969 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,336 +1,405 @@ -{ - "id": 44, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package body Foo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "begin" - }, - { - "id": 39, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 38, - "kind": "list", - "list": [ - { - "id": 37, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 33, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 35, - "kind": "text", - "text": "null;" - } - ] - } - } - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 42, - "kind": "list", - "list": [ - { - "id": 40, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 41, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 43, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 53, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package body Foo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "begin" + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 45, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 44, + "kind": "text", + "text": "null;" + } + ] + } + } + } + ] + }, + "break": true, + "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": 52, + "kind": "text", + "text": "end Foo;" + } + ] +} 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 aecc72b27..267a0f82c 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,251 +1,320 @@ -{ - "id": 32, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package body Foo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 41, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package body Foo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "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 b0ecbaa6c..939f19993 100644 --- a/testsuite/tests/unparsing/package_decl/long_aspect/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/long_aspect/doc-baseline.json @@ -1,330 +1,468 @@ -{ - "id": 43, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "private" - }, - { - "id": 38, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 33, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 35, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 41, - "kind": "list", - "list": [ - { - "id": 39, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 40, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 42, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 61, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "private" + }, + { + "id": 56, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 44, + "kind": "text", + "text": "type" + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 49, + "kind": "list", + "list": [ + { + "id": 45, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 51, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 59, + "kind": "list", + "list": [ + { + "id": 57, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 60, + "kind": "text", + "text": "end Foo;" + } + ] +} 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 6a0ab5f65..1238653cc 100644 --- a/testsuite/tests/unparsing/package_decl/long_name/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/long_name/doc-baseline.json @@ -1,330 +1,468 @@ -{ - "id": 43, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "private" - }, - { - "id": 38, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 33, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 35, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 41, - "kind": "list", - "list": [ - { - "id": 39, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 40, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 42, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 61, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "private" + }, + { + "id": 56, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 44, + "kind": "text", + "text": "type" + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 49, + "kind": "list", + "list": [ + { + "id": 45, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 51, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 59, + "kind": "list", + "list": [ + { + "id": 57, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 60, + "kind": "text", + "text": "end Foo;" + } + ] +} 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 88721bd64..8a877a23b 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,330 +1,468 @@ -{ - "id": 43, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "private" - }, - { - "id": 38, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 33, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 35, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 41, - "kind": "list", - "list": [ - { - "id": 39, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 40, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 42, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 61, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "private" + }, + { + "id": 56, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 44, + "kind": "text", + "text": "type" + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 49, + "kind": "list", + "list": [ + { + "id": 45, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 51, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 59, + "kind": "list", + "list": [ + { + "id": 57, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 60, + "kind": "text", + "text": "end Foo;" + } + ] +} 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 707f41f59..9060c696b 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,330 +1,468 @@ -{ - "id": 43, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "private" - }, - { - "id": 38, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 33, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 35, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 41, - "kind": "list", - "list": [ - { - "id": 39, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 40, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 42, - "kind": "text", - "text": "end;" - } - ] -} +{ + "id": 61, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "private" + }, + { + "id": 56, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 44, + "kind": "text", + "text": "type" + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 49, + "kind": "list", + "list": [ + { + "id": 45, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 51, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 59, + "kind": "list", + "list": [ + { + "id": 57, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 60, + "kind": "text", + "text": "end;" + } + ] +} 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 015d30404..2b09f9bd0 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,251 +1,320 @@ -{ - "id": 32, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 41, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "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 a2162d575..e784dcc25 100644 --- a/testsuite/tests/unparsing/package_decl/short_names/doc-baseline.json +++ b/testsuite/tests/unparsing/package_decl/short_names/doc-baseline.json @@ -1,330 +1,468 @@ -{ - "id": 43, - "kind": "list", - "list": [ - { - "id": 20, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 19, - "kind": "list", - "list": [ - { - "id": 0, - "kind": "text", - "text": "package Foo" - }, - { - "id": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 15, - "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": 14, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 13, - "kind": "list", - "list": [ - { - "id": 4, - "kind": "text", - "text": "with" - }, - { - "id": 12, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 11, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 10, - "kind": "list", - "list": [ - { - "id": 5, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 8, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 7, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "Bar" - } - ] - } - } - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - }, - { - "id": 17, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 18, - "kind": "text", - "text": "is" - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 27, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - { - "id": 23, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 22, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 24, - "kind": "text", - "text": "type Baz;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 30, - "kind": "list", - "list": [ - { - "id": 28, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 29, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 31, - "kind": "text", - "text": "private" - }, - { - "id": 38, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "list", - "list": [ - { - "id": 32, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 33, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 35, - "kind": "text", - "text": "type Qux;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 41, - "kind": "list", - "list": [ - { - "id": 39, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 40, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 42, - "kind": "text", - "text": "end Foo;" - } - ] -} +{ + "id": 61, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "package Foo" + }, + { + "id": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 15, + "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": 14, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 13, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 12, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 11, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 10, + "kind": "list", + "list": [ + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 8, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 7, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "Bar" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 18, + "kind": "text", + "text": "is" + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 36, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 35, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 34, + "kind": "list", + "list": [ + { + "id": 23, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 22, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "list", + "list": [ + { + "id": 24, + "kind": "text", + "text": "type" + }, + { + "id": 30, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 26, + "kind": "text", + "text": "Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 39, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 40, + "kind": "text", + "text": "private" + }, + { + "id": 56, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 42, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 52, + "kind": "list", + "list": [ + { + "id": 44, + "kind": "text", + "text": "type" + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 49, + "kind": "list", + "list": [ + { + "id": 45, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + { + "id": 46, + "kind": "text", + "text": "Qux" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 51, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 59, + "kind": "list", + "list": [ + { + "id": 57, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 58, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 60, + "kind": "text", + "text": "end Foo;" + } + ] +} 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 3e0d041a5..f45c55e93 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,1015 +1,1084 @@ -{ - "id": 127, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 126, - "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": 101, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 100, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "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": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 19, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 18, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 17, - "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": 38, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 41, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 40, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 39, - "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": 60, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 59, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 58, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 63, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 62, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 61, - "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": 82, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 81, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 80, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 85, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 84, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 83, - "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": 113, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 112, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 111, - "kind": "list", - "list": [ - { - "id": 109, - "kind": "list", - "list": [ - { - "id": 107, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 108, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 110, - "kind": "text", - "text": "type Garply;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 114, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 115, - "kind": "text", - "text": "begin" - }, - { - "id": 123, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 122, - "kind": "list", - "list": [ - { - "id": 121, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 120, - "kind": "list", - "list": [ - { - "id": 118, - "kind": "list", - "list": [ - { - "id": 116, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 117, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 119, - "kind": "text", - "text": "null;" - } - ] - } - } - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 124, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 125, - "kind": "text", - "text": "end;" - } - ] - }, - "break": true, - "expandedStates": null - } -} +{ + "id": 136, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 135, + "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": 101, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 100, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "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": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "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": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 37, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 36, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 41, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 40, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "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": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 59, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 58, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "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": 82, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 81, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 80, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 85, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 84, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 83, + "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": 122, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 121, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 120, + "kind": "list", + "list": [ + { + "id": 109, + "kind": "list", + "list": [ + { + "id": 107, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 108, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 119, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 118, + "kind": "list", + "list": [ + { + "id": 110, + "kind": "text", + "text": "type" + }, + { + "id": 116, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 115, + "kind": "list", + "list": [ + { + "id": 111, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 114, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 113, + "kind": "list", + "list": [ + { + "id": 112, + "kind": "text", + "text": "Garply" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 117, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 123, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 124, + "kind": "text", + "text": "begin" + }, + { + "id": 132, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 131, + "kind": "list", + "list": [ + { + "id": 130, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 129, + "kind": "list", + "list": [ + { + "id": 127, + "kind": "list", + "list": [ + { + "id": 125, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 126, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 128, + "kind": "text", + "text": "null;" + } + ] + } + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 133, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 134, + "kind": "text", + "text": "end;" + } + ] + }, + "break": true, + "expandedStates": null + } +} 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 b9998a127..8833346da 100644 --- a/testsuite/tests/unparsing/subp_body/with_decls/doc-baseline.json +++ b/testsuite/tests/unparsing/subp_body/with_decls/doc-baseline.json @@ -1,1015 +1,1084 @@ -{ - "id": 127, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 126, - "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": 101, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 100, - "kind": "list", - "list": [ - { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "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": 16, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 15, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 14, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 19, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 18, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 17, - "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": 38, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 37, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 36, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 41, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 40, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 39, - "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": 60, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 59, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 58, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 63, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 62, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 61, - "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": 82, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 - }, - "alignContents": { - "id": 81, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 80, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - "flatContents": { - "id": 85, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 84, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 83, - "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": 113, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 112, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 111, - "kind": "list", - "list": [ - { - "id": 109, - "kind": "list", - "list": [ - { - "id": 107, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 108, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 110, - "kind": "text", - "text": "type Garply;" - } - ] - }, - "break": true, - "expandedStates": null - } - } - } - }, - { - "id": 114, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 115, - "kind": "text", - "text": "begin" - }, - { - "id": 123, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 122, - "kind": "list", - "list": [ - { - "id": 121, - "kind": "command", - "command": { - "command": "indent", - "indentContents": { - "id": 120, - "kind": "list", - "list": [ - { - "id": 118, - "kind": "list", - "list": [ - { - "id": 116, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 117, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 119, - "kind": "text", - "text": "null;" - } - ] - } - } - } - ] - }, - "break": true, - "expandedStates": null - } - }, - { - "id": 124, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 125, - "kind": "text", - "text": "end Foo;" - } - ] - }, - "break": true, - "expandedStates": null - } -} +{ + "id": 136, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 135, + "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": 101, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 100, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "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": 16, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 18, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 17, + "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": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 37, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 36, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 41, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 40, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "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": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 59, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 58, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 62, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "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": 82, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 81, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 80, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 85, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 84, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 83, + "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": 122, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 121, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 120, + "kind": "list", + "list": [ + { + "id": 109, + "kind": "list", + "list": [ + { + "id": 107, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 108, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 119, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 118, + "kind": "list", + "list": [ + { + "id": 110, + "kind": "text", + "text": "type" + }, + { + "id": 116, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 115, + "kind": "list", + "list": [ + { + "id": 111, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 114, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 113, + "kind": "list", + "list": [ + { + "id": 112, + "kind": "text", + "text": "Garply" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 117, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + } + } + }, + { + "id": 123, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 124, + "kind": "text", + "text": "begin" + }, + { + "id": 132, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 131, + "kind": "list", + "list": [ + { + "id": 130, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 129, + "kind": "list", + "list": [ + { + "id": 127, + "kind": "list", + "list": [ + { + "id": 125, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 126, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 128, + "kind": "text", + "text": "null;" + } + ] + } + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 133, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 134, + "kind": "text", + "text": "end Foo;" + } + ] + }, + "break": true, + "expandedStates": null + } +}