Skip to content

Commit

Permalink
Merge branch 'issue_778' into 'master'
Browse files Browse the repository at this point in the history
Unparsing: add configuration for BinOp, UnOp, ConcatOp and RelationOp

Closes #1341

See merge request eng/libadalang/libadalang!1612
  • Loading branch information
joaopsazevedo committed May 7, 2024
2 parents 0791661 + ead8e31 commit 300bb9a
Show file tree
Hide file tree
Showing 38 changed files with 5,378 additions and 4,745 deletions.
125 changes: 97 additions & 28 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,10 +1071,13 @@
"kind": "recurse_field",
"field": "f_operator"
},
"line",
"whitespace",
{
"kind": "recurse_field",
"field": "f_operand"
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_operand"
}
}
]
}
Expand All @@ -1085,30 +1088,6 @@
"recurse"
]
},
"ConstrainedArrayIndices": {
"node": {
"kind": "align",
"width": 1,
"contents": {
"kind": "group",
"document": [
{
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_list"
}
}
]
}
}
},
"ConstraintList": {
"sep": [
"recurse",
"line"
]
},
"ContractCases": {
"node": {
"kind": "group",
Expand Down Expand Up @@ -1263,6 +1242,30 @@
]
}
},
"ConstrainedArrayIndices": {
"node": {
"kind": "align",
"width": 1,
"contents": {
"kind": "group",
"document": [
{
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_list"
}
}
]
}
}
},
"ConstraintList": {
"sep": [
"recurse",
"line"
]
},
"DecimalFixedPointDef": {
"node": {
"kind": "group",
Expand Down Expand Up @@ -3770,6 +3773,30 @@
]
}
},
"OpAbs": {
"node": {
"kind": "group",
"document": [
{
"kind": "text",
"text": "abs"
},
"whitespace"
]
}
},
"OpNot": {
"node": {
"kind": "group",
"document": [
{
"kind": "text",
"text": "not"
},
"whitespace"
]
}
},
"OrdinaryFixedPointDef": {
"node": {
"kind": "group",
Expand Down Expand Up @@ -4779,6 +4806,30 @@
}
}
},
"RelationOp": {
"node": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_left"
},
"line",
{
"kind": "recurse_field",
"field": "f_op"
},
"whitespace",
{
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_right"
}
}
]
}
},
"ReturnStmt": {
"node": {
"kind": "align",
Expand Down Expand Up @@ -5485,6 +5536,24 @@
]
}
},
"UnOp": {
"node": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_op"
},
{
"kind": "innerRoot",
"contents": {
"kind": "recurse_field",
"field": "f_expr"
}
}
]
}
},
"Variant": {
"node": [
{
Expand Down Expand Up @@ -5678,4 +5747,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion testsuite/tests/unparsing/bin_op/doc-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@
"break": false,
"expandedStates": null
}
}
}
Loading

0 comments on commit 300bb9a

Please sign in to comment.