diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index 388dab066..ee01e6405 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -653,20 +653,28 @@ "text": "generic" }, { - "kind": "indent", - "contents": [ - "hardline", - { - "kind": "group", - "break": true, - "document": { - "kind": "recurse_field", - "field": "f_decls" - } - } - ] + "kind": "group", + "document": { + "kind": "recurse_field", + "field": "f_decls" + } } ] + }, + "fields": { + "f_decls": { + "kind": "ifEmpty", + "then": "recurse", + "else": [ + { + "kind": "indent", + "contents": [ + "hardline", + "recurse" + ] + } + ] + } } }, "GenericFormalSubpDecl": { @@ -700,6 +708,100 @@ ] } }, + "GenericPackageDecl": { + "node": { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_formal_part" + }, + "hardline", + { + "kind": "recurse_field", + "field": "f_package_decl" + } + ] + } + }, + "GenericPackageInternal": { + "node": [ + { + "kind": "group", + "document": [ + { + "kind": "group", + "document": { + "kind": "group", + "document": [ + { + "kind": "text", + "text": "package" + }, + "whitespace", + { + "kind": "recurse_field", + "field": "f_package_name" + }, + { + "kind": "align", + "width": 2, + "contents": { + "kind": "recurse_field", + "field": "f_aspects" + } + } + ] + } + }, + "line", + { + "kind": "text", + "text": "is" + } + ] + }, + { + "kind": "indent", + "contents": [ + "hardline", + { + "kind": "recurse_field", + "field": "f_public_part" + } + ] + }, + "hardline", + { + "kind": "recurse_field", + "field": "f_private_part" + }, + { + "kind": "text", + "text": "end" + }, + { + "kind": "recurse_field", + "field": "f_end_name" + }, + { + "kind": "text", + "text": ";" + } + ], + "fields": { + "f_private_part": [ + { + "kind": "indent", + "contents": [ + "hardline", + "recurse" + ] + }, + "hardline" + ] + } + }, "IfStmt": { "node": { "kind": "group", diff --git a/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/doc-baseline.json b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/doc-baseline.json new file mode 100644 index 000000000..34e7452ed --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/doc-baseline.json @@ -0,0 +1,643 @@ +{ + "id": 81, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 80, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "generic" + }, + { + "id": 2, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 1, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "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": 24, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 23, + "kind": "list", + "list": [ + { + "id": 20, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "text", + "text": "package " + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 14, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 13, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 12, + "kind": "list", + "list": [ + { + "id": 9, + "kind": "text", + "text": "Corge" + }, + { + "id": 10, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 11, + "kind": "text", + "text": ".Fred" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 16, + "kind": "list", + "list": [ + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 21, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 22, + "kind": "text", + "text": "is" + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 67, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 66, + "kind": "list", + "list": [ + { + "id": 27, + "kind": "list", + "list": [ + { + "id": 25, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 26, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 65, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 64, + "kind": "list", + "list": [ + { + "id": 60, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 59, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 58, + "kind": "list", + "list": [ + { + "id": 28, + "kind": "text", + "text": "procedure Garply" + }, + { + "id": 29, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 57, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 56, + "kind": "list", + "list": [ + { + "id": 55, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 54, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 53, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "text", + "text": "(" + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 50, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 49, + "kind": "list", + "list": [ + { + "id": 41, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 40, + "kind": "list", + "list": [ + { + "id": 32, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 31, + "kind": "text", + "text": "G" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 33, + "kind": "text", + "text": " :" + }, + { + "id": 39, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 38, + "kind": "list", + "list": [ + { + "id": 34, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 37, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 36, + "kind": "list", + "list": [ + { + "id": 35, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 48, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 47, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 46, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 45, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 44, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 43, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 42, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 52, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 62, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 61, + "kind": "list", + "list": [ + ] + } + } + }, + { + "id": 63, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 70, + "kind": "list", + "list": [ + { + "id": 68, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 69, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 71, + "kind": "text", + "text": "end" + }, + { + "id": 78, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 77, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 76, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 75, + "kind": "list", + "list": [ + { + "id": 72, + "kind": "text", + "text": " GNATfuzz" + }, + { + "id": 73, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 74, + "kind": "text", + "text": ".AFL_Seed_Data_Chunks" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 79, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/input.ada b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/input.ada new file mode 100644 index 000000000..4101d9f49 --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/input.ada @@ -0,0 +1,4 @@ +generic +package Corge.Fred is + procedure Garply (G : Foo); +end GNATfuzz.AFL_Seed_Data_Chunks; diff --git a/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/test.out b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/test.out new file mode 100644 index 000000000..4101d9f49 --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/test.out @@ -0,0 +1,4 @@ +generic +package Corge.Fred is + procedure Garply (G : Foo); +end GNATfuzz.AFL_Seed_Data_Chunks; diff --git a/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/test.yaml b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/test.yaml new file mode 100644 index 000000000..97041b182 --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/empty_formal_part/test.yaml @@ -0,0 +1,5 @@ +driver: unparser +rule: generic_decl +description: | + Test that there is no line break between the keywords `generic` and + `function`. diff --git a/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/doc-baseline.json b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/doc-baseline.json new file mode 100644 index 000000000..ea92a6589 --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/doc-baseline.json @@ -0,0 +1,1449 @@ +{ + "id": 180, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 179, + "kind": "list", + "list": [ + { + "id": 103, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 102, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "generic" + }, + { + "id": 101, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 100, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 99, + "kind": "list", + "list": [ + { + "id": 3, + "kind": "list", + "list": [ + { + "id": 1, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 2, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 49, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "text", + "text": "with" + }, + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 43, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 42, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 41, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "function Bar" + }, + { + "id": 7, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 40, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 39, + "kind": "list", + "list": [ + { + "id": 33, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 32, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 31, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "text", + "text": "(" + }, + { + "id": 29, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 28, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 27, + "kind": "list", + "list": [ + { + "id": 19, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 9, + "kind": "text", + "text": "Baz" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 11, + "kind": "text", + "text": " :" + }, + { + "id": 17, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 15, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 14, + "kind": "list", + "list": [ + { + "id": 13, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 26, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 25, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 24, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 23, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 22, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 30, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 38, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 37, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 36, + "kind": "list", + "list": [ + { + "id": 34, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 35, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 45, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 44, + "kind": "list", + "list": [ + ] + } + } + }, + { + "id": 46, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 51, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 98, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 97, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 96, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 95, + "kind": "list", + "list": [ + { + "id": 52, + "kind": "text", + "text": "with" + }, + { + "id": 53, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 91, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 90, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 89, + "kind": "list", + "list": [ + { + "id": 54, + "kind": "text", + "text": "function Baz" + }, + { + "id": 55, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 88, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 87, + "kind": "list", + "list": [ + { + "id": 81, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 80, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 79, + "kind": "list", + "list": [ + { + "id": 56, + "kind": "text", + "text": "(" + }, + { + "id": 77, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 76, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 75, + "kind": "list", + "list": [ + { + "id": 67, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 66, + "kind": "list", + "list": [ + { + "id": 58, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 57, + "kind": "text", + "text": "Qux" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 59, + "kind": "text", + "text": " :" + }, + { + "id": 65, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 64, + "kind": "list", + "list": [ + { + "id": 60, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 63, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 62, + "kind": "list", + "list": [ + { + "id": 61, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 74, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 73, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 72, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 71, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 70, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 69, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 68, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 78, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 86, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 85, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 84, + "kind": "list", + "list": [ + { + "id": 82, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 83, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 93, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 92, + "kind": "list", + "list": [ + ] + } + } + }, + { + "id": 94, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + "break": true, + "expandedStates": null + } + } + ] + }, + "break": true, + "expandedStates": null + } + }, + { + "id": 106, + "kind": "list", + "list": [ + { + "id": 104, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 105, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 123, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 122, + "kind": "list", + "list": [ + { + "id": 119, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 118, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 117, + "kind": "list", + "list": [ + { + "id": 107, + "kind": "text", + "text": "package " + }, + { + "id": 114, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 113, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 112, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 111, + "kind": "list", + "list": [ + { + "id": 108, + "kind": "text", + "text": "Corge" + }, + { + "id": 109, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 110, + "kind": "text", + "text": ".Fred" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 116, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 115, + "kind": "list", + "list": [ + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 120, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 121, + "kind": "text", + "text": "is" + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 166, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 165, + "kind": "list", + "list": [ + { + "id": 126, + "kind": "list", + "list": [ + { + "id": 124, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 125, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 164, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 163, + "kind": "list", + "list": [ + { + "id": 159, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 158, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 157, + "kind": "list", + "list": [ + { + "id": 127, + "kind": "text", + "text": "procedure Garply" + }, + { + "id": 128, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 156, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 155, + "kind": "list", + "list": [ + { + "id": 154, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 153, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 152, + "kind": "list", + "list": [ + { + "id": 129, + "kind": "text", + "text": "(" + }, + { + "id": 150, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 149, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 148, + "kind": "list", + "list": [ + { + "id": 140, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 139, + "kind": "list", + "list": [ + { + "id": 131, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 130, + "kind": "text", + "text": "G" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 132, + "kind": "text", + "text": " :" + }, + { + "id": 138, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 137, + "kind": "list", + "list": [ + { + "id": 133, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 136, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 135, + "kind": "list", + "list": [ + { + "id": 134, + "kind": "text", + "text": "Foo" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 147, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 146, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 145, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 144, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 143, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 142, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 141, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 151, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 161, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 160, + "kind": "list", + "list": [ + ] + } + } + }, + { + "id": 162, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 169, + "kind": "list", + "list": [ + { + "id": 167, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": true + } + }, + { + "id": 168, + "kind": "command", + "command": { + "command": "breakParent" + } + } + ] + }, + { + "id": 170, + "kind": "text", + "text": "end" + }, + { + "id": 177, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 176, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 175, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 174, + "kind": "list", + "list": [ + { + "id": 171, + "kind": "text", + "text": " GNATfuzz" + }, + { + "id": 172, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": true, + "hard": false + } + }, + { + "id": 173, + "kind": "text", + "text": ".AFL_Seed_Data_Chunks" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + }, + { + "id": 178, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/input.ada b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/input.ada new file mode 100644 index 000000000..e0e9d1f1b --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/input.ada @@ -0,0 +1,6 @@ +generic + with function Bar (Baz: Foo) return Boolean; + with function Baz (Qux: Foo) return Boolean; +package Corge.Fred is + procedure Garply (G : Foo); +end GNATfuzz.AFL_Seed_Data_Chunks; diff --git a/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/test.out b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/test.out new file mode 100644 index 000000000..0588f5419 --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/test.out @@ -0,0 +1,6 @@ +generic + with function Bar (Baz : Foo) return Boolean; + with function Baz (Qux : Foo) return Boolean; +package Corge.Fred is + procedure Garply (G : Foo); +end GNATfuzz.AFL_Seed_Data_Chunks; diff --git a/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/test.yaml b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/test.yaml new file mode 100644 index 000000000..d74277ec1 --- /dev/null +++ b/testsuite/tests/unparsing/generic_package_decl/non_empty_formal_part/test.yaml @@ -0,0 +1,4 @@ +driver: unparser +rule: generic_decl +description: | + Test that each generic formal declaration is in its own line. diff --git a/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/doc-baseline.json b/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/doc-baseline.json index e69de29bb..04914b8b4 100644 --- a/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/doc-baseline.json +++ b/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/doc-baseline.json @@ -0,0 +1,750 @@ +{ + "id": 93, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 92, + "kind": "list", + "list": [ + { + "id": 4, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 3, + "kind": "list", + "list": [ + { + "id": 0, + "kind": "text", + "text": "generic" + }, + { + "id": 2, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 1, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "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": 90, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 89, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 88, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "text", + "text": "function Perform_Comparison_Check" + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 87, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 86, + "kind": "list", + "list": [ + { + "id": 80, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 79, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 78, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "(" + }, + { + "id": 76, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" + }, + "alignContents": { + "id": 75, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 12, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 11, + "kind": "text", + "text": "Comparing_Value" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 13, + "kind": "text", + "text": " :" + }, + { + "id": 19, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 18, + "kind": "list", + "list": [ + { + "id": 14, + "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": 15, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 28, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 27, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 24, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 23, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 22, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 52, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 51, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 42, + "kind": "list", + "list": [ + { + "id": 34, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 33, + "kind": "text", + "text": "Rule_Value" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 35, + "kind": "text", + "text": " :" + }, + { + "id": 41, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 40, + "kind": "list", + "list": [ + { + "id": 36, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 39, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 38, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 49, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 46, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 53, + "kind": "text", + "text": ";" + }, + { + "id": 54, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 74, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 73, + "kind": "list", + "list": [ + { + "id": 65, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 64, + "kind": "list", + "list": [ + { + "id": 56, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 55, + "kind": "text", + "text": "Logic_Operator" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 57, + "kind": "text", + "text": " :" + }, + { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 62, + "kind": "list", + "list": [ + { + "id": 58, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 61, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 60, + "kind": "list", + "list": [ + { + "id": 59, + "kind": "text", + "text": "Unbounded_String" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 72, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 71, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 70, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 69, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 68, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 67, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 66, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + } + } + }, + { + "id": 77, + "kind": "text", + "text": ")" + } + ] + } + } + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 85, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 84, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 83, + "kind": "list", + "list": [ + { + "id": 81, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 82, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + { + "id": 91, + "kind": "text", + "text": ";" + } + ] + }, + "break": true, + "expandedStates": null + } +} diff --git a/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/test.yaml b/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/test.yaml index a1587b5cc..97041b182 100644 --- a/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/test.yaml +++ b/testsuite/tests/unparsing/generic_subp_decl/empty_formal_part/test.yaml @@ -3,9 +3,3 @@ rule: generic_decl description: | Test that there is no line break between the keywords `generic` and `function`. -control: - - [ - XFAIL, - "True", - "https://gitlab.adacore-it.com/eng/libadalang/langkit/-/issues/760", - ] diff --git a/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json b/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json index 3bea8611a..b5437bfec 100644 --- a/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json +++ b/testsuite/tests/unparsing/generic_subp_decl/non_empty_formal_part/doc-baseline.json @@ -1,21 +1,21 @@ { - "id": 171, + "id": 170, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 170, + "id": 169, "kind": "list", "list": [ { - "id": 82, + "id": 81, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 81, + "id": 80, "kind": "list", "list": [ { @@ -24,311 +24,220 @@ "text": "generic" }, { - "id": 80, + "id": 79, "kind": "command", "command": { - "command": "indent", - "indentContents": { - "id": 79, - "kind": "list", - "list": [ - { - "id": 3, + "command": "group", + "id": 0, + "groupContents": { + "id": 78, + "kind": "command", + "command": { + "command": "indent", + "indentContents": { + "id": 77, "kind": "list", "list": [ { - "id": 1, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": true - } - }, - { - "id": 2, - "kind": "command", - "command": { - "command": "breakParent" - } - } - ] - }, - { - "id": 78, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 77, + "id": 3, "kind": "list", "list": [ { - "id": 4, - "kind": "text", - "text": "type Foo_Bar_Baz is private;" - }, - { - "id": 5, + "id": 1, "kind": "command", "command": { "command": "line", "literal": false, "soft": false, - "hard": false + "hard": true } }, { - "id": 76, + "id": 2, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 75, + "command": "breakParent" + } + } + ] + }, + { + "id": 4, + "kind": "text", + "text": "type Foo_Bar_Baz is private;" + }, + { + "id": 5, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 76, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 75, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 74, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 74, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 73, - "kind": "list", - "list": [ - { - "id": 6, - "kind": "text", - "text": "with" - }, - { - "id": 7, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } + "command": "group", + "id": 0, + "groupContents": { + "id": 73, + "kind": "list", + "list": [ + { + "id": 6, + "kind": "text", + "text": "with" + }, + { + "id": 7, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 68, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 68, + "alignContents": { + "id": 67, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 67, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 66, - "kind": "list", - "list": [ - { - "id": 8, - "kind": "text", - "text": "function \">\"" - }, - { - "id": 9, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 65, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 64, - "kind": "list", - "list": [ - { - "id": 58, + "command": "group", + "id": 0, + "groupContents": { + "id": 66, + "kind": "list", + "list": [ + { + "id": 8, + "kind": "text", + "text": "function \">\"" + }, + { + "id": 9, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 65, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 64, + "kind": "list", + "list": [ + { + "id": 58, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 57, "kind": "command", "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 57, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 56, + "kind": "list", + "list": [ + { + "id": 10, + "kind": "text", + "text": "(" }, - "alignContents": { - "id": 56, - "kind": "list", - "list": [ - { - "id": 10, - "kind": "text", - "text": "(" + { + "id": 54, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "innerRoot" }, - { - "id": 54, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "innerRoot" - }, - "alignContents": { - "id": 53, - "kind": "list", - "list": [ - { - "id": 30, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 29, - "kind": "list", - "list": [ - { - "id": 21, - "kind": "command", - "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 20, - "kind": "list", - "list": [ - { - "id": 12, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 11, - "kind": "text", - "text": "Left_Left_Left_Left_Left" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 13, - "kind": "text", - "text": " :" - }, - { - "id": 19, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 18, - "kind": "list", - "list": [ - { - "id": 14, - "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": 15, - "kind": "text", - "text": "Foo_Bar_Baz" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 28, - "kind": "command", - "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 27, + "alignContents": { + "id": 53, + "kind": "list", + "list": [ + { + "id": 30, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 29, + "kind": "list", + "list": [ + { + "id": 21, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 20, + "kind": "list", + "list": [ + { + "id": 12, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 + "command": "group", + "id": 0, + "groupContents": { + "id": 11, + "kind": "text", + "text": "Left_Left_Left_Left_Left" }, - "alignContents": { - "id": 26, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 25, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } + "break": false, + "expandedStates": null } }, - "flatContents": { - "id": 24, + { + "id": 13, + "kind": "text", + "text": " :" + }, + { + "id": 19, "kind": "command", "command": { "command": "align", @@ -337,175 +246,175 @@ "n": 2 }, "alignContents": { - "id": 23, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 22, - "kind": "list", - "list": [ - ] + "id": 18, + "kind": "list", + "list": [ + { + "id": 14, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } }, - "break": false, - "expandedStates": null - } + { + "id": 17, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 16, + "kind": "list", + "list": [ + { + "id": 15, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] } } } - } - } - ] + ] + }, + "break": false, + "expandedStates": null + } }, - "break": false, - "expandedStates": null - } - }, - { - "id": 31, - "kind": "text", - "text": ";" - }, - { - "id": 32, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 52, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 51, - "kind": "list", - "list": [ - { - "id": 43, + { + "id": 28, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 27, "kind": "command", "command": { - "command": "group", - "id": 1, - "groupContents": { - "id": 42, - "kind": "list", - "list": [ - { - "id": 34, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 33, - "kind": "text", - "text": "Right_Right_Right_Right_Right" - }, - "break": false, - "expandedStates": null - } - }, - { - "id": 35, - "kind": "text", - "text": " :" - }, - { - "id": 41, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 40, - "kind": "list", - "list": [ - { - "id": 36, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 39, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 38, - "kind": "list", - "list": [ - { - "id": 37, - "kind": "text", - "text": "Foo_Bar_Baz" - } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - } - } - } - ] + "command": "align", + "alignData": { + "kind": "width", + "n": 4 }, - "break": false, - "expandedStates": null + "alignContents": { + "id": 26, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 25, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } } }, - { - "id": 50, + "flatContents": { + "id": 24, "kind": "command", "command": { - "command": "ifBreak", - "ifBreakGroupId": 1, - "breakContents": { - "id": 49, + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 23, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 4 + "command": "group", + "id": 0, + "groupContents": { + "id": 22, + "kind": "list", + "list": [ + ] }, - "alignContents": { - "id": 48, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 47, - "kind": "list", - "list": [ - ] - }, - "break": false, - "expandedStates": null - } - } + "break": false, + "expandedStates": null } + } + } + } + } + } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 31, + "kind": "text", + "text": ";" + }, + { + "id": 32, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } + }, + { + "id": 52, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 51, + "kind": "list", + "list": [ + { + "id": 43, + "kind": "command", + "command": { + "command": "group", + "id": 1, + "groupContents": { + "id": 42, + "kind": "list", + "list": [ + { + "id": 34, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 33, + "kind": "text", + "text": "Right_Right_Right_Right_Right" + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 35, + "kind": "text", + "text": " :" }, - "flatContents": { - "id": 46, + { + "id": 41, "kind": "command", "command": { "command": "align", @@ -514,151 +423,236 @@ "n": 2 }, "alignContents": { - "id": 45, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 44, - "kind": "list", - "list": [ - ] + "id": 40, + "kind": "list", + "list": [ + { + "id": 36, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } }, - "break": false, - "expandedStates": null - } + { + "id": 39, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 38, + "kind": "list", + "list": [ + { + "id": 37, + "kind": "text", + "text": "Foo_Bar_Baz" + } + ] + }, + "break": false, + "expandedStates": null + } + } + ] } } } + ] + }, + "break": false, + "expandedStates": null + } + }, + { + "id": 50, + "kind": "command", + "command": { + "command": "ifBreak", + "ifBreakGroupId": 1, + "breakContents": { + "id": 49, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 4 + }, + "alignContents": { + "id": 48, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 47, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } + } + }, + "flatContents": { + "id": 46, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 + }, + "alignContents": { + "id": 45, + "kind": "command", + "command": { + "command": "group", + "id": 0, + "groupContents": { + "id": 44, + "kind": "list", + "list": [ + ] + }, + "break": false, + "expandedStates": null + } + } } } - ] - }, - "break": false, - "expandedStates": null - } - } - ] + } + } + ] + }, + "break": false, + "expandedStates": null + } } - } - }, - { - "id": 55, - "kind": "text", - "text": ")" + ] } - ] + } + }, + { + "id": 55, + "kind": "text", + "text": ")" } - } - }, - "break": false, - "expandedStates": null + ] + } } }, - { - "id": 63, + "break": false, + "expandedStates": null + } + }, + { + "id": 63, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 1 + }, + "alignContents": { + "id": 62, "kind": "command", "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 1 - }, - "alignContents": { - "id": 62, - "kind": "command", - "command": { - "command": "group", - "id": 0, - "groupContents": { - "id": 61, - "kind": "list", - "list": [ - { - "id": 59, - "kind": "command", - "command": { - "command": "line", - "literal": false, - "soft": false, - "hard": false - } - }, - { - "id": 60, - "kind": "text", - "text": "return Boolean" - } - ] + "command": "group", + "id": 0, + "groupContents": { + "id": 61, + "kind": "list", + "list": [ + { + "id": 59, + "kind": "command", + "command": { + "command": "line", + "literal": false, + "soft": false, + "hard": false + } }, - "break": false, - "expandedStates": null - } - } + { + "id": 60, + "kind": "text", + "text": "return Boolean" + } + ] + }, + "break": false, + "expandedStates": null } } - ] - }, - "break": false, - "expandedStates": null - } - } - ] - }, - "break": false, - "expandedStates": null - } - } - } - }, - { - "id": 69, - "kind": "text", - "text": " is <>" - }, - { - "id": 71, - "kind": "command", - "command": { - "command": "align", - "alignData": { - "kind": "width", - "n": 2 - }, - "alignContents": { - "id": 70, - "kind": "list", - "list": [ + } + } + ] + }, + "break": false, + "expandedStates": null + } + } ] - } + }, + "break": false, + "expandedStates": null } + } + } + }, + { + "id": 69, + "kind": "text", + "text": " is <>" + }, + { + "id": 71, + "kind": "command", + "command": { + "command": "align", + "alignData": { + "kind": "width", + "n": 2 }, - { - "id": 72, - "kind": "text", - "text": ";" + "alignContents": { + "id": 70, + "kind": "list", + "list": [ + ] } - ] + } }, - "break": false, - "expandedStates": null - } - } + { + "id": 72, + "kind": "text", + "text": ";" + } + ] + }, + "break": false, + "expandedStates": null } - }, - "break": false, - "expandedStates": null + } } - } - ] - }, - "break": false, - "expandedStates": null - } + }, + "break": false, + "expandedStates": null + } + } + ] } - ] - } + } + }, + "break": true, + "expandedStates": null } } ] @@ -668,11 +662,11 @@ } }, { - "id": 85, + "id": 84, "kind": "list", "list": [ { - "id": 83, + "id": 82, "kind": "command", "command": { "command": "line", @@ -682,7 +676,7 @@ } }, { - "id": 84, + "id": 83, "kind": "command", "command": { "command": "breakParent" @@ -691,7 +685,7 @@ ] }, { - "id": 168, + "id": 167, "kind": "command", "command": { "command": "align", @@ -700,22 +694,22 @@ "n": 2 }, "alignContents": { - "id": 167, + "id": 166, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 166, + "id": 165, "kind": "list", "list": [ { - "id": 86, + "id": 85, "kind": "text", "text": "function Perform_Comparison_Check" }, { - "id": 87, + "id": 86, "kind": "command", "command": { "command": "line", @@ -725,23 +719,23 @@ } }, { - "id": 165, + "id": 164, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 164, + "id": 163, "kind": "list", "list": [ { - "id": 158, + "id": 157, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 157, + "id": 156, "kind": "command", "command": { "command": "align", @@ -750,16 +744,16 @@ "n": 1 }, "alignContents": { - "id": 156, + "id": 155, "kind": "list", "list": [ { - "id": 88, + "id": 87, "kind": "text", "text": "(" }, { - "id": 154, + "id": 153, "kind": "command", "command": { "command": "align", @@ -767,37 +761,37 @@ "kind": "innerRoot" }, "alignContents": { - "id": 153, + "id": 152, "kind": "list", "list": [ { - "id": 108, + "id": 107, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 107, + "id": 106, "kind": "list", "list": [ { - "id": 99, + "id": 98, "kind": "command", "command": { "command": "group", "id": 1, "groupContents": { - "id": 98, + "id": 97, "kind": "list", "list": [ { - "id": 90, + "id": 89, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 89, + "id": 88, "kind": "text", "text": "Comparing_Value" }, @@ -806,12 +800,12 @@ } }, { - "id": 91, + "id": 90, "kind": "text", "text": " :" }, { - "id": 97, + "id": 96, "kind": "command", "command": { "command": "align", @@ -820,11 +814,11 @@ "n": 2 }, "alignContents": { - "id": 96, + "id": 95, "kind": "list", "list": [ { - "id": 92, + "id": 91, "kind": "command", "command": { "command": "line", @@ -834,17 +828,17 @@ } }, { - "id": 95, + "id": 94, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 94, + "id": 93, "kind": "list", "list": [ { - "id": 93, + "id": 92, "kind": "text", "text": "Foo_Bar_Baz" } @@ -865,13 +859,13 @@ } }, { - "id": 106, + "id": 105, "kind": "command", "command": { "command": "ifBreak", "ifBreakGroupId": 1, "breakContents": { - "id": 105, + "id": 104, "kind": "command", "command": { "command": "align", @@ -880,13 +874,13 @@ "n": 4 }, "alignContents": { - "id": 104, + "id": 103, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 103, + "id": 102, "kind": "list", "list": [ ] @@ -898,7 +892,7 @@ } }, "flatContents": { - "id": 102, + "id": 101, "kind": "command", "command": { "command": "align", @@ -907,13 +901,13 @@ "n": 2 }, "alignContents": { - "id": 101, + "id": 100, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 100, + "id": 99, "kind": "list", "list": [ ] @@ -933,12 +927,12 @@ } }, { - "id": 109, + "id": 108, "kind": "text", "text": ";" }, { - "id": 110, + "id": 109, "kind": "command", "command": { "command": "line", @@ -948,33 +942,33 @@ } }, { - "id": 130, + "id": 129, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 129, + "id": 128, "kind": "list", "list": [ { - "id": 121, + "id": 120, "kind": "command", "command": { "command": "group", "id": 1, "groupContents": { - "id": 120, + "id": 119, "kind": "list", "list": [ { - "id": 112, + "id": 111, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 111, + "id": 110, "kind": "text", "text": "Rule_Value" }, @@ -983,12 +977,12 @@ } }, { - "id": 113, + "id": 112, "kind": "text", "text": " :" }, { - "id": 119, + "id": 118, "kind": "command", "command": { "command": "align", @@ -997,11 +991,11 @@ "n": 2 }, "alignContents": { - "id": 118, + "id": 117, "kind": "list", "list": [ { - "id": 114, + "id": 113, "kind": "command", "command": { "command": "line", @@ -1011,17 +1005,17 @@ } }, { - "id": 117, + "id": 116, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 116, + "id": 115, "kind": "list", "list": [ { - "id": 115, + "id": 114, "kind": "text", "text": "Foo_Bar_Baz" } @@ -1042,13 +1036,13 @@ } }, { - "id": 128, + "id": 127, "kind": "command", "command": { "command": "ifBreak", "ifBreakGroupId": 1, "breakContents": { - "id": 127, + "id": 126, "kind": "command", "command": { "command": "align", @@ -1057,13 +1051,13 @@ "n": 4 }, "alignContents": { - "id": 126, + "id": 125, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 125, + "id": 124, "kind": "list", "list": [ ] @@ -1075,7 +1069,7 @@ } }, "flatContents": { - "id": 124, + "id": 123, "kind": "command", "command": { "command": "align", @@ -1084,13 +1078,13 @@ "n": 2 }, "alignContents": { - "id": 123, + "id": 122, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 122, + "id": 121, "kind": "list", "list": [ ] @@ -1110,12 +1104,12 @@ } }, { - "id": 131, + "id": 130, "kind": "text", "text": ";" }, { - "id": 132, + "id": 131, "kind": "command", "command": { "command": "line", @@ -1125,33 +1119,33 @@ } }, { - "id": 152, + "id": 151, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 151, + "id": 150, "kind": "list", "list": [ { - "id": 143, + "id": 142, "kind": "command", "command": { "command": "group", "id": 1, "groupContents": { - "id": 142, + "id": 141, "kind": "list", "list": [ { - "id": 134, + "id": 133, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 133, + "id": 132, "kind": "text", "text": "Logic_Operator" }, @@ -1160,12 +1154,12 @@ } }, { - "id": 135, + "id": 134, "kind": "text", "text": " :" }, { - "id": 141, + "id": 140, "kind": "command", "command": { "command": "align", @@ -1174,11 +1168,11 @@ "n": 2 }, "alignContents": { - "id": 140, + "id": 139, "kind": "list", "list": [ { - "id": 136, + "id": 135, "kind": "command", "command": { "command": "line", @@ -1188,17 +1182,17 @@ } }, { - "id": 139, + "id": 138, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 138, + "id": 137, "kind": "list", "list": [ { - "id": 137, + "id": 136, "kind": "text", "text": "Unbounded_String" } @@ -1219,13 +1213,13 @@ } }, { - "id": 150, + "id": 149, "kind": "command", "command": { "command": "ifBreak", "ifBreakGroupId": 1, "breakContents": { - "id": 149, + "id": 148, "kind": "command", "command": { "command": "align", @@ -1234,13 +1228,13 @@ "n": 4 }, "alignContents": { - "id": 148, + "id": 147, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 147, + "id": 146, "kind": "list", "list": [ ] @@ -1252,7 +1246,7 @@ } }, "flatContents": { - "id": 146, + "id": 145, "kind": "command", "command": { "command": "align", @@ -1261,13 +1255,13 @@ "n": 2 }, "alignContents": { - "id": 145, + "id": 144, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 144, + "id": 143, "kind": "list", "list": [ ] @@ -1291,7 +1285,7 @@ } }, { - "id": 155, + "id": 154, "kind": "text", "text": ")" } @@ -1304,7 +1298,7 @@ } }, { - "id": 163, + "id": 162, "kind": "command", "command": { "command": "align", @@ -1313,17 +1307,17 @@ "n": 1 }, "alignContents": { - "id": 162, + "id": 161, "kind": "command", "command": { "command": "group", "id": 0, "groupContents": { - "id": 161, + "id": 160, "kind": "list", "list": [ { - "id": 159, + "id": 158, "kind": "command", "command": { "command": "line", @@ -1333,7 +1327,7 @@ } }, { - "id": 160, + "id": 159, "kind": "text", "text": "return Boolean" } @@ -1360,7 +1354,7 @@ } }, { - "id": 169, + "id": 168, "kind": "text", "text": ";" }