Skip to content

Commit

Permalink
Merge branch 'issue_1327' into 'master'
Browse files Browse the repository at this point in the history
Unparsing: add DeclBlock and ExceptionHandler configurations

Closes #1327

See merge request eng/libadalang/libadalang!1589
  • Loading branch information
joaopsazevedo committed Mar 27, 2024
2 parents 0d83388 + 9dec639 commit 4d875f4
Show file tree
Hide file tree
Showing 9 changed files with 2,897 additions and 11 deletions.
138 changes: 127 additions & 11 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,46 @@
}
}
},
"DeclBlock": {
"node": {
"kind": "group",
"document": [
{
"kind": "text",
"text": "declare"
},
{
"kind": "indent",
"contents": {
"kind": "recurse_field",
"field": "f_decls"
}
},
"hardline",
{
"kind": "text",
"text": "begin"
},
{
"kind": "recurse_field",
"field": "f_stmts"
},
"hardline",
{
"kind": "text",
"text": "end"
},
{
"kind": "recurse_field",
"field": "f_end_name"
},
{
"kind": "text",
"text": ";"
}
]
}
},
"DefiningNameList": {
"sep": [
"recurse",
Expand Down Expand Up @@ -886,24 +926,23 @@
]
},
"fields": {
"f_interfaces":{
"f_interfaces": {
"kind": "ifEmpty",
"then": "recurse",
"else":
{
"kind": "align",
"width": 1,
"contents": "recurse"
}
"else": {
"kind": "align",
"width": 1,
"contents": "recurse"
}
},
"f_record_extension":{
"f_record_extension": {
"kind": "ifEmpty",
"then": "recurse",
"else": [
"hardlineWithoutBreakParent",
"recurse"
]
}
]
}
}
},
"DiscriminantSpec": {
Expand Down Expand Up @@ -1221,6 +1260,83 @@
"recurse"
]
},
"ExceptionHandler": {
"node": {
"kind": "group",
"document": [
{
"kind": "group",
"document": [
{
"kind": "group",
"document": [
{
"kind": "text",
"text": "when"
},
{
"kind": "align",
"width": 2,
"contents": [
"line",
{
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_exception_name"
},
{
"kind": "group",
"document": {
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_handled_exceptions"
}
}
}
]
}
]
}
]
},
"line",
{
"kind": "text",
"text": "=>"
}
]
},
{
"kind": "indent",
"contents": [
"hardline",
{
"kind": "recurse_field",
"field": "f_stmts"
}
]
}
]
},
"fields": {
"f_exception_name": {
"kind": "align",
"width": 2,
"contents": [
"recurse",
"whitespace",
{
"kind": "text",
"text": ":"
},
"line"
]
}
}
},
"ExprFunction": {
"node": {
"kind": "group",
Expand Down Expand Up @@ -2236,7 +2352,7 @@
}
]
}
},
},
"KnownDiscriminantPart": {
"node": {
"kind": "group",
Expand Down
Loading

0 comments on commit 4d875f4

Please sign in to comment.