Fix formatting issue
This commit is contained in:
parent
e8a6b40432
commit
cac45e3607
|
@ -288,10 +288,8 @@ private:
|
||||||
case conditional_newline:
|
case conditional_newline:
|
||||||
immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]);
|
immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]);
|
||||||
if (l > config.dfmt_soft_max_line_length)
|
if (l > config.dfmt_soft_max_line_length)
|
||||||
{
|
|
||||||
newline();
|
newline();
|
||||||
}
|
else if (peekBackIs(tok!")"))
|
||||||
else
|
|
||||||
write(" ");
|
write(" ");
|
||||||
break;
|
break;
|
||||||
case always_newline:
|
case always_newline:
|
||||||
|
@ -304,7 +302,7 @@ private:
|
||||||
pushWrapIndent(tok!"!");
|
pushWrapIndent(tok!"!");
|
||||||
newline();
|
newline();
|
||||||
}
|
}
|
||||||
else
|
else if (peekBackIs(tok!")"))
|
||||||
write(" ");
|
write(" ");
|
||||||
break;
|
break;
|
||||||
case always_newline_indent:
|
case always_newline_indent:
|
||||||
|
@ -542,7 +540,7 @@ private:
|
||||||
write(" ");
|
write(" ");
|
||||||
}
|
}
|
||||||
else if ((peekIsKeyword() || peekIs(tok!"@")) && spaceAfterParens
|
else if ((peekIsKeyword() || peekIs(tok!"@")) && spaceAfterParens
|
||||||
&& !peekIs(tok!"in") && !peekIs(tok!"is"))
|
&& !peekIs(tok!"in") && !peekIs(tok!"is") && !peekIs(tok!"if"))
|
||||||
{
|
{
|
||||||
writeToken();
|
writeToken();
|
||||||
write(" ");
|
write(" ");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName if (is(T : Bar))
|
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName
|
||||||
|
if (is(T : Bar))
|
||||||
{
|
{
|
||||||
void foo()
|
void foo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ unittest
|
||||||
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
||||||
Three charlie, double delta)
|
Three charlie, double delta)
|
||||||
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
||||||
&& foxtrot && golf && hotel && india && juliet)
|
&& foxtrot && golf && hotel && india && juliet)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ unittest
|
||||||
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
||||||
Three charlie, double delta)
|
Three charlie, double delta)
|
||||||
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
||||||
&& foxtrot && golf && hotel && india && juliet)
|
&& foxtrot && golf && hotel && india && juliet)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName if (is(T : Bar)) {
|
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName
|
||||||
|
if (is(T : Bar)) {
|
||||||
void foo() {
|
void foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ unittest {
|
||||||
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
||||||
Three charlie, double delta)
|
Three charlie, double delta)
|
||||||
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
||||||
&& foxtrot && golf && hotel && india && juliet) {
|
&& foxtrot && golf && hotel && india && juliet) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ unittest {
|
||||||
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
bool anotherTemplatedFunction(One, Two, Three)(One alpha, Two bravo,
|
||||||
Three charlie, double delta)
|
Three charlie, double delta)
|
||||||
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
if (isNumeric!One && isNumeric!Two && isNumeric!Three && echo
|
||||||
&& foxtrot && golf && hotel && india && juliet) {
|
&& foxtrot && golf && hotel && india && juliet) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue