-
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 'mku/mr_use_clause' into 'master'
Unparsing: Add UseClause config See merge request eng/libadalang/libadalang!1537
- Loading branch information
Showing
37 changed files
with
1,632 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
216 changes: 216 additions & 0 deletions
216
...kage_clause/max_line_length_exceeded/mixed_dotted_and_simple_packs_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,216 @@ | ||
{ | ||
"id": 27, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 26, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 0, | ||
"kind": "text", | ||
"text": "use " | ||
}, | ||
{ | ||
"id": 24, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "innerRoot" | ||
}, | ||
"alignContents": { | ||
"id": 23, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 9, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "innerRoot" | ||
}, | ||
"alignContents": { | ||
"id": 8, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 7, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 6, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 1, | ||
"kind": "text", | ||
"text": "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" | ||
}, | ||
{ | ||
"id": 2, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": true, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 3, | ||
"kind": "text", | ||
"text": ".Bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" | ||
}, | ||
{ | ||
"id": 4, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": true, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 5, | ||
"kind": "text", | ||
"text": ".Ccccccccccccccccccccccccccccccccccccc" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"id": 10, | ||
"kind": "text", | ||
"text": "," | ||
}, | ||
{ | ||
"id": 11, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 12, | ||
"kind": "text", | ||
"text": "Dddddddddddddd," | ||
}, | ||
{ | ||
"id": 13, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 14, | ||
"kind": "text", | ||
"text": "Eeeeeeeeeeeeeee," | ||
}, | ||
{ | ||
"id": 15, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 22, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "innerRoot" | ||
}, | ||
"alignContents": { | ||
"id": 21, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 20, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 19, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 16, | ||
"kind": "text", | ||
"text": "FFFFFFFF" | ||
}, | ||
{ | ||
"id": 17, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": true, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 18, | ||
"kind": "text", | ||
"text": ".Gggggggggggggg" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"id": 25, | ||
"kind": "text", | ||
"text": ";" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
.../use_package_clause/max_line_length_exceeded/mixed_dotted_and_simple_packs_list/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 @@ | ||
use Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .Bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb. Ccccccccccccccccccccccccccccccccccccc , Dddddddddddddd, Eeeeeeeeeeeeeee, FFFFFFFF.Gggggggggggggg; |
6 changes: 6 additions & 0 deletions
6
...g/use_package_clause/max_line_length_exceeded/mixed_dotted_and_simple_packs_list/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,6 @@ | ||
use Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
.Bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | ||
.Ccccccccccccccccccccccccccccccccccccc, | ||
Dddddddddddddd, | ||
Eeeeeeeeeeeeeee, | ||
FFFFFFFF.Gggggggggggggg; |
14 changes: 14 additions & 0 deletions
14
.../use_package_clause/max_line_length_exceeded/mixed_dotted_and_simple_packs_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,14 @@ | ||
description: | | ||
This test checks the formatting of a use package clause having | ||
a list of package names exceeding the maximal line length. | ||
The packages are designated by dotted and simple names with | ||
different casing. | ||
It is expected to break after the comma, align on the first | ||
element of the package list and keep the casing unchanged. | ||
The long dotted name will be formatted as expected (namely, a | ||
line break is inserted before . and the alignment is based on | ||
the initial position of the first field and a line continuation | ||
indentation (i.e., 2 spaces) is added before . on each new line. | ||
driver: unparser | ||
rule: use_clause |
Oops, something went wrong.