Skip to content

Commit

Permalink
Fix ForLoopStmt extra space before loop keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
CKMonika committed Jul 15, 2024
1 parent a0b7d4b commit a78dc0f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
9 changes: 7 additions & 2 deletions extensions/default_unparsing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2580,14 +2580,19 @@
"kind": "recurse_field",
"field": "f_iter_expr"
},
"line",
{
"kind": "recurse_field",
"field": "f_iter_filter"
}
]
}
]
},
"fields": {
"f_iter_filter": [
"line",
"recurse"
]
}
},
"ForLoopStmt": {
Expand Down Expand Up @@ -5852,4 +5857,4 @@
}
},
"max_empty_lines": 1
}
}
3 changes: 3 additions & 0 deletions testsuite/tests/unparsing/for_loop_stmt/array_init/input.ada
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
for I in My_Tasks'Range loop
My_Tasks (I).Start (I);
end loop;
3 changes: 3 additions & 0 deletions testsuite/tests/unparsing/for_loop_stmt/array_init/test.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
for I in My_Tasks'Range loop
My_Tasks (I).Start (I);
end loop;
4 changes: 4 additions & 0 deletions testsuite/tests/unparsing/for_loop_stmt/array_init/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
driver: unparser
rule: stmt
description: |
Test that no line breaks are added.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Max : not null Person_Name := new Person(Sex=>M);

Max : not null Person_Name := new Person(Sex=>M);

0 comments on commit a78dc0f

Please sign in to comment.