Skip to content

Commit

Permalink
Merge branch 'issue_1333' into 'master'
Browse files Browse the repository at this point in the history
Unparsing: add configurations for BracketAggregate, BracketDeltaAggregate and DeltaAggregate

Closes #1333

See merge request eng/libadalang/libadalang!1593
  • Loading branch information
joaopsazevedo committed Mar 27, 2024
2 parents 4d875f4 + e15755d commit 25bb9dd
Show file tree
Hide file tree
Showing 33 changed files with 1,893 additions and 11 deletions.
164 changes: 153 additions & 11 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,101 @@
]
}
},
"BracketAggregate": {
"node": {
"kind": "group",
"document": [
{
"kind": "text",
"text": "["
},
{
"kind": "align",
"width": 1,
"contents": [
{
"kind": "recurse_field",
"field": "f_ancestor_expr"
},
{
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_assocs"
}
}
]
},
{
"kind": "text",
"text": "]"
}
]
},
"fields": {
"f_ancestor_expr": {
"kind": "align",
"width": 2,
"contents": [
"recurse",
{
"kind": "text",
"text": "with"
},
"line"
]
}
}
},
"BracketDeltaAggregate": {
"node": {
"kind": "group",
"document": [
{
"kind": "text",
"text": "["
},
{
"kind": "align",
"width": 1,
"contents": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_ancestor_expr"
},
"whitespace",
{
"kind": "text",
"text": "with"
},
"whitespace",
{
"kind": "text",
"text": "delta"
},
{
"kind": "align",
"width": 2,
"contents": [
"line",
{
"kind": "recurse_field",
"field": "f_assocs"
}
]
}
]
}
},
{
"kind": "text",
"text": "]"
}
]
}
},
"CallExpr": {
"node": {
"kind": "innerRoot",
Expand Down Expand Up @@ -879,6 +974,53 @@
"line"
]
},
"DeltaAggregate": {
"kind": "group",
"document": [
{
"kind": "text",
"text": "("
},
{
"kind": "align",
"width": 1,
"contents": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_ancestor_expr"
},
"whitespace",
{
"kind": "text",
"text": "with"
},
"whitespace",
{
"kind": "text",
"text": "delta"
},
{
"kind": "align",
"width": 2,
"contents": [
"line",
{
"kind": "recurse_field",
"field": "f_assocs"
}
]
}
]
}
},
{
"kind": "text",
"text": ")"
}
]
},
"DerivedTypeDef": {
"node": {
"kind": "group",
Expand Down Expand Up @@ -1068,7 +1210,7 @@
"kind": "text",
"text": "entry"
},
"whitespace",
"whitespace",
{
"kind": "recurse_field",
"field": "f_entry_name"
Expand All @@ -1089,7 +1231,7 @@
{
"kind": "text",
"text": "when"
},
},
{
"kind": "recurse_field",
"field": "f_barrier"
Expand Down Expand Up @@ -3177,8 +3319,8 @@
{
"kind": "recurse_field",
"field": "f_public_part"
}
]
}
]
},
"hardline",
{
Expand All @@ -3188,7 +3330,7 @@
{
"kind": "text",
"text": "end"
},
},
"whitespace",
{
"kind": "recurse_field",
Expand Down Expand Up @@ -3238,13 +3380,13 @@
"kind": "recurse_field",
"field": "f_aspects"
},
"line",
"line",
{
"kind": "text",
"text": "is"
}
]
},
},
{
"kind": "group",
"document": [
Expand Down Expand Up @@ -3422,13 +3564,13 @@
"kind": "recurse_field",
"field": "f_aspects"
},
"line",
"line",
{
"kind": "text",
"text": "is"
}
]
},
},
{
"kind": "group",
"document": [
Expand Down Expand Up @@ -3458,7 +3600,7 @@
]
}
}
},
},
"StmtList": {
"sep": [
"recurse",
Expand Down Expand Up @@ -3616,7 +3758,7 @@
"kind": "ifEmpty",
"then": "recurse",
"else": [
"line",
"line",
"recurse"
]
}
Expand Down
Loading

0 comments on commit 25bb9dd

Please sign in to comment.