-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mku/abort_stmt' into 'master'
Add AbortStmt config Closes #1362 See merge request eng/libadalang/libadalang!1617
- Loading branch information
Showing
17 changed files
with
453 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
88 changes: 88 additions & 0 deletions
88
testsuite/tests/unparsing/abort_stmt/long_with_list/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,88 @@ | ||
{ | ||
"id": 11, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 10, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 0, | ||
"kind": "text", | ||
"text": "abort" | ||
}, | ||
{ | ||
"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": 2, | ||
"kind": "text", | ||
"text": "T1111111111111111111111111111111111111111111," | ||
}, | ||
{ | ||
"id": 3, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 4, | ||
"kind": "text", | ||
"text": "T22222222222222222222," | ||
}, | ||
{ | ||
"id": 5, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 6, | ||
"kind": "text", | ||
"text": "T333333333333333333" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"id": 9, | ||
"kind": "text", | ||
"text": ";" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
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 @@ | ||
abort T1111111111111111111111111111111111111111111, T22222222222222222222,T333333333333333333; |
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 @@ | ||
abort | ||
T1111111111111111111111111111111111111111111, | ||
T22222222222222222222, | ||
T333333333333333333; |
9 changes: 9 additions & 0 deletions
9
testsuite/tests/unparsing/abort_stmt/long_with_list/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,9 @@ | ||
description: | | ||
This test checks the formatting of an abort statement | ||
with a long list of task names. | ||
It is expected the declaration breaks after `abort` | ||
keyword and the list is broken and all its elements be | ||
indented. | ||
driver: unparser | ||
rule: abort_stmt |
147 changes: 147 additions & 0 deletions
147
testsuite/tests/unparsing/abort_stmt/one_task/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,147 @@ | ||
{ | ||
"id": 18, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 17, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 0, | ||
"kind": "text", | ||
"text": "abort" | ||
}, | ||
{ | ||
"id": 15, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 14, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 1, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 13, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "innerRoot" | ||
}, | ||
"alignContents": { | ||
"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": 2, | ||
"kind": "text", | ||
"text": "T_Array" | ||
}, | ||
{ | ||
"id": 3, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 4, | ||
"kind": "text", | ||
"text": "(" | ||
}, | ||
{ | ||
"id": 8, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 7, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 6, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 5, | ||
"kind": "text", | ||
"text": "N" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
}, | ||
{ | ||
"id": 9, | ||
"kind": "text", | ||
"text": ")" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"id": 16, | ||
"kind": "text", | ||
"text": ";" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
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 @@ | ||
abort T_Array(N); |
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 @@ | ||
abort T_Array (N); |
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,7 @@ | ||
description: | | ||
This test checks the formatting of an abort statement | ||
with an array element as task name. | ||
It is expected the declaration stays on a single line. | ||
driver: unparser | ||
rule: abort_stmt |
58 changes: 58 additions & 0 deletions
58
testsuite/tests/unparsing/abort_stmt/single_task_long_name/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,58 @@ | ||
{ | ||
"id": 7, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 6, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 0, | ||
"kind": "text", | ||
"text": "abort" | ||
}, | ||
{ | ||
"id": 4, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 3, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 1, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 2, | ||
"kind": "text", | ||
"text": "TaaaaaaaaaaaaaaaassssssssssssssssssskLooooooongNaaaaaaaaaaaaaaaaaaaaaaame" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"id": 5, | ||
"kind": "text", | ||
"text": ";" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
testsuite/tests/unparsing/abort_stmt/single_task_long_name/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 @@ | ||
abort TaaaaaaaaaaaaaaaassssssssssssssssssskLooooooongNaaaaaaaaaaaaaaaaaaaaaaame; |
2 changes: 2 additions & 0 deletions
2
testsuite/tests/unparsing/abort_stmt/single_task_long_name/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 @@ | ||
abort | ||
TaaaaaaaaaaaaaaaassssssssssssssssssskLooooooongNaaaaaaaaaaaaaaaaaaaaaaame; |
8 changes: 8 additions & 0 deletions
8
testsuite/tests/unparsing/abort_stmt/single_task_long_name/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,8 @@ | ||
description: | | ||
This test checks the formatting of an abort statement | ||
with a long task name. | ||
It is expected the declaration breaks after `abort` | ||
keyword and the new line be indented. | ||
driver: unparser | ||
rule: abort_stmt |
Oops, something went wrong.