Skip to content

Commit

Permalink
Unparsing: add config for GenericPackageDecl and GenericPackageInternal
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopsazevedo committed Mar 1, 2024
1 parent 776344e commit 645477b
Show file tree
Hide file tree
Showing 12 changed files with 3,616 additions and 655 deletions.
126 changes: 114 additions & 12 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,20 +653,28 @@
"text": "generic"
},
{
"kind": "indent",
"contents": [
"hardline",
{
"kind": "group",
"break": true,
"document": {
"kind": "recurse_field",
"field": "f_decls"
}
}
]
"kind": "group",
"document": {
"kind": "recurse_field",
"field": "f_decls"
}
}
]
},
"fields": {
"f_decls": {
"kind": "ifEmpty",
"then": "recurse",
"else": [
{
"kind": "indent",
"contents": [
"hardline",
"recurse"
]
}
]
}
}
},
"GenericFormalSubpDecl": {
Expand Down Expand Up @@ -700,6 +708,100 @@
]
}
},
"GenericPackageDecl": {
"node": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_formal_part"
},
"hardline",
{
"kind": "recurse_field",
"field": "f_package_decl"
}
]
}
},
"GenericPackageInternal": {
"node": [
{
"kind": "group",
"document": [
{
"kind": "group",
"document": {
"kind": "group",
"document": [
{
"kind": "text",
"text": "package"
},
"whitespace",
{
"kind": "recurse_field",
"field": "f_package_name"
},
{
"kind": "align",
"width": 2,
"contents": {
"kind": "recurse_field",
"field": "f_aspects"
}
}
]
}
},
"line",
{
"kind": "text",
"text": "is"
}
]
},
{
"kind": "indent",
"contents": [
"hardline",
{
"kind": "recurse_field",
"field": "f_public_part"
}
]
},
"hardline",
{
"kind": "recurse_field",
"field": "f_private_part"
},
{
"kind": "text",
"text": "end"
},
{
"kind": "recurse_field",
"field": "f_end_name"
},
{
"kind": "text",
"text": ";"
}
],
"fields": {
"f_private_part": [
{
"kind": "indent",
"contents": [
"hardline",
"recurse"
]
},
"hardline"
]
}
},
"IfStmt": {
"node": {
"kind": "group",
Expand Down
Loading

0 comments on commit 645477b

Please sign in to comment.