-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'issue_1338' into 'master'
Unparsing: add configuration for ExceptionDecl Closes #1338 See merge request eng/libadalang/libadalang!1596
- Loading branch information
Showing
17 changed files
with
741 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
198 changes: 198 additions & 0 deletions
198
testsuite/tests/unparsing/exception_decl/long_complete/doc-baseline.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
{ | ||
"id": 24, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 23, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 11, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 10, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 2, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 1, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 0, | ||
"kind": "text", | ||
"text": "Baaaaaaaaaaaaaaaaaaaaar" | ||
} | ||
} | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
}, | ||
{ | ||
"id": 3, | ||
"kind": "text", | ||
"text": " : exception" | ||
}, | ||
{ | ||
"id": 9, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 8, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 7, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 4, | ||
"kind": "text", | ||
"text": " renames" | ||
}, | ||
{ | ||
"id": 5, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 6, | ||
"kind": "text", | ||
"text": "Fooooooooooooooooooooooooooooooooooo" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
}, | ||
{ | ||
"id": 12, | ||
"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": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 19, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 13, | ||
"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": 14, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 15, | ||
"kind": "text", | ||
"text": "Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
}, | ||
{ | ||
"id": 22, | ||
"kind": "text", | ||
"text": ";" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
testsuite/tests/unparsing/exception_decl/long_complete/input.ada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Baaaaaaaaaaaaaaaaaaaaar : exception renames Fooooooooooooooooooooooooooooooooooo | ||
with Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz; |
4 changes: 4 additions & 0 deletions
4
testsuite/tests/unparsing/exception_decl/long_complete/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Baaaaaaaaaaaaaaaaaaaaar : exception renames | ||
Fooooooooooooooooooooooooooooooooooo | ||
with | ||
Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz; |
5 changes: 5 additions & 0 deletions
5
testsuite/tests/unparsing/exception_decl/long_complete/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
driver: unparser | ||
rule: exception_decl | ||
description: | | ||
Test the line break after the `renames` and `with` keywords. | ||
Test the indentation of `f_renames` and `f_aspects`. |
115 changes: 115 additions & 0 deletions
115
testsuite/tests/unparsing/exception_decl/long_no_aspect/doc-baseline.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"id": 14, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 13, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 11, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 10, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 2, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 1, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 0, | ||
"kind": "text", | ||
"text": "Baaaaaaaaaaaaaaaaaaaaar" | ||
} | ||
} | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
}, | ||
{ | ||
"id": 3, | ||
"kind": "text", | ||
"text": " : exception" | ||
}, | ||
{ | ||
"id": 9, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 8, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 7, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 4, | ||
"kind": "text", | ||
"text": " renames" | ||
}, | ||
{ | ||
"id": 5, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 6, | ||
"kind": "text", | ||
"text": "Foooooooooooooooooooooooooooooooooo" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
}, | ||
{ | ||
"id": 12, | ||
"kind": "text", | ||
"text": ";" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
testsuite/tests/unparsing/exception_decl/long_no_aspect/input.ada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Baaaaaaaaaaaaaaaaaaaaar : exception renames Foooooooooooooooooooooooooooooooooo; |
2 changes: 2 additions & 0 deletions
2
testsuite/tests/unparsing/exception_decl/long_no_aspect/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Baaaaaaaaaaaaaaaaaaaaar : exception renames | ||
Foooooooooooooooooooooooooooooooooo; |
Oops, something went wrong.