mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
parent
e4297a63c3
commit
eea508f930
4 changed files with 24 additions and 6 deletions
|
@ -794,12 +794,16 @@ private:
|
|||
write(" ");
|
||||
break;
|
||||
case tok!"enum":
|
||||
if (peekBackIs(tok!"identifier"))
|
||||
write(" ");
|
||||
indents.push(tok!"enum");
|
||||
writeToken();
|
||||
if (!currentIs(tok!":"))
|
||||
write(" ");
|
||||
if (peekIs(tok!")") || peekIs(tok!"==")) {
|
||||
writeToken();
|
||||
} else {
|
||||
if (peekBackIs(tok!"identifier"))
|
||||
write(" ");
|
||||
indents.push(tok!"enum");
|
||||
writeToken();
|
||||
if (!currentIs(tok!":"))
|
||||
write(" ");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (peekBackIs(tok!"identifier"))
|
||||
|
|
5
tests/allman/issue0174.d.ref
Normal file
5
tests/allman/issue0174.d.ref
Normal file
|
@ -0,0 +1,5 @@
|
|||
void merge()
|
||||
{
|
||||
static if (is(T == enum))
|
||||
*thisN = x;
|
||||
}
|
5
tests/issue0174.d
Normal file
5
tests/issue0174.d
Normal file
|
@ -0,0 +1,5 @@
|
|||
void merge()
|
||||
{
|
||||
static if (is(T == enum))
|
||||
*thisN = x;
|
||||
}
|
4
tests/otbs/issue0174.d.ref
Normal file
4
tests/otbs/issue0174.d.ref
Normal file
|
@ -0,0 +1,4 @@
|
|||
void merge() {
|
||||
static if (is(T == enum))
|
||||
*thisN = x;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue