Skip to content

Commit e732807

Browse files
committed
Fix #44
1 parent 9374214 commit e732807

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

src/dfmt.d

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,11 @@ private:
505505
writeToken();
506506
if (currentIs(tok!"}", false))
507507
tempIndent = 0;
508-
else if (!currentIs(tok!")", false) && !currentIs(tok!"]", false))
508+
else if (!currentIs(tok!")", false) && !currentIs(tok!"]", false)
509+
&& !currentIs(tok!"comment", false))
510+
{
509511
write(" ");
512+
}
510513
}
511514
regenLineBreakHintsIfNecessary(index - 1);
512515
break;

tests/issue0017.d.ref

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
immutable NameId[] namesA = [{"Aacgr", 0x00386}, // GREEK CAPITAL LETTER ALPHA WITH TONOS
2-
{"aacgr", 0x003AC}, // GREEK SMALL LETTER ALPHA WITH TONOS
1+
immutable NameId[] namesA = [{"Aacgr", 0x00386}, // GREEK CAPITAL LETTER ALPHA WITH TONOS
2+
{"aacgr", 0x003AC}, // GREEK SMALL LETTER ALPHA WITH TONOS
33
];

tests/issue0044.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
enum Sizeok : int
2+
{
3+
SIZEOKnone, // size of aggregate is not computed yet
4+
SIZEOKdone, // size of aggregate is set correctly
5+
SIZEOKfwd, // error in computing size of aggregate
6+
}

tests/issue0044.d.ref

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
enum Sizeok : int
2+
{
3+
SIZEOKnone, // size of aggregate is not computed yet
4+
SIZEOKdone, // size of aggregate is set correctly
5+
SIZEOKfwd, // error in computing size of aggregate
6+
}

0 commit comments

Comments
 (0)