Skip to content

Commit e0b3abd

Browse files
committed
format(expr): fix missing space in struct/array literals
1 parent 833cf6f commit e0b3abd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util/format_expr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ std::ostream &format_rec(std::ostream &os, const exprt &expr)
280280
<< format(to_let_expr(expr).where());
281281
else if(id == ID_array || id == ID_struct)
282282
{
283-
os << "{ ";
283+
os << '{';
284284

285285
bool first = true;
286286

@@ -289,12 +289,12 @@ std::ostream &format_rec(std::ostream &os, const exprt &expr)
289289
if(first)
290290
first = false;
291291
else
292-
os << ", ";
292+
os << ',';
293293

294-
os << format(op);
294+
os << ' ' << format(op);
295295
}
296296

297-
return os << '}';
297+
return os << " }";
298298
}
299299
else if(id == ID_if)
300300
{

0 commit comments

Comments
 (0)