Skip to content

Commit

Permalink
Unparsing: add confirguration for ExtendedReturnStmt
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopsazevedo committed Mar 26, 2024
1 parent c32beb1 commit e4496b7
Show file tree
Hide file tree
Showing 13 changed files with 1,290 additions and 5 deletions.
182 changes: 177 additions & 5 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,12 @@
]
}
},
"ElsifExprPartList": {
"sep": [
"hardline",
"recurse"
]
},
"ExprFunction": {
"node": {
"kind": "group",
Expand Down Expand Up @@ -1190,11 +1196,177 @@
]
}
},
"ElsifExprPartList": {
"sep": [
"hardline",
"recurse"
]
"ExtendedReturnStmtObjectDecl": {
"node": {
"kind": "group",
"document": [
{
"kind": "group",
"document": [
{
"kind": "group",
"document": {
"kind": "recurse_field",
"field": "f_ids"
}
},
"whitespace",
{
"kind": "text",
"text": ":"
},
{
"kind": "align",
"width": 2,
"contents": [
"line",
{
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_has_aliased"
},
{
"kind": "recurse_field",
"field": "f_has_constant"
},
{
"kind": "recurse_field",
"field": "f_mode"
},
{
"kind": "recurse_field",
"field": "f_type_expr"
}
]
}
]
}
],
"id": "name_and_type"
},
{
"kind": "ifBreak",
"breakContents": {
"kind": "align",
"width": 4,
"contents": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_default_expr"
},
{
"kind": "recurse_field",
"field": "f_renaming_clause"
},
{
"kind": "recurse_field",
"field": "f_aspects"
}
]
}
},
"flatContents": {
"kind": "align",
"width": 2,
"contents": {
"kind": "group",
"document": [
{
"kind": "recurse_field",
"field": "f_default_expr"
},
{
"kind": "recurse_field",
"field": "f_renaming_clause"
},
{
"kind": "recurse_field",
"field": "f_aspects"
}
]
}
},
"groupId": "name_and_type"
}
]
},
"fields": {
"f_default_expr": [
"whitespace",
{
"kind": "text",
"text": ":="
},
"line",
"recurse"
]
}
},
"ExtendedReturnStmt": {
"node": {
"kind": "group",
"document": [
{
"kind": "group",
"document": [
{
"kind": "group",
"document": {
"kind": "indent",
"contents": [
{
"kind": "text",
"text": "return"
},
"line",
{
"kind": "recurse_field",
"field": "f_decl"
}
]
}
},
{
"kind": "recurse_field",
"field": "f_stmts"
}
]
},
{
"kind": "text",
"text": ";"
}
]
},
"fields": {
"f_stmts": [
"hardline",
{
"kind": "group",
"document": [
{
"kind": "text",
"text": "do"
},
"recurse",
"hardlineWithoutBreakParent",
{
"kind": "text",
"text": "end"
},
"whitespace",
{
"kind": "text",
"text": "return"
}
]
}
]
}
},
"FloatingPointDef": {
"node": {
Expand Down
Loading

0 comments on commit e4496b7

Please sign in to comment.