Fix #226
This commit is contained in:
parent
e6fe5df515
commit
0ea6b340a4
|
@ -1022,11 +1022,13 @@ private:
|
|||
}
|
||||
break;
|
||||
}
|
||||
else if (!astInformation.unaryLocations.canFindIndex(current.index))
|
||||
goto binary;
|
||||
else
|
||||
else if (astInformation.unaryLocations.canFindIndex(current.index))
|
||||
{
|
||||
writeToken();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
regenLineBreakHintsIfNecessary(index);
|
||||
goto binary;
|
||||
case tok!"~":
|
||||
if (peekIs(tok!"this"))
|
||||
{
|
||||
|
@ -1048,6 +1050,7 @@ private:
|
|||
writeToken();
|
||||
break;
|
||||
}
|
||||
regenLineBreakHintsIfNecessary(index);
|
||||
goto binary;
|
||||
case tok!"[":
|
||||
case tok!"(":
|
||||
|
|
|
@ -111,6 +111,7 @@ bool isBreakToken(IdType t) pure nothrow @safe @nogc
|
|||
case tok!"/":
|
||||
case tok!"..":
|
||||
case tok!"*=":
|
||||
case tok!"*":
|
||||
case tok!"&=":
|
||||
case tok!"%=":
|
||||
case tok!"%":
|
||||
|
@ -173,6 +174,7 @@ int breakCost(IdType p, IdType c) pure nothrow @safe @nogc
|
|||
case tok!"/":
|
||||
case tok!"..":
|
||||
case tok!"*=":
|
||||
case tok!"*":
|
||||
case tok!"&=":
|
||||
case tok!"%=":
|
||||
case tok!"%":
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
unittest
|
||||
{
|
||||
auto a = 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890
|
||||
+ 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890
|
||||
+ 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890
|
||||
+ 1234567890 + 1234567890 + 1234567890;
|
||||
auto a = 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890
|
||||
- 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890
|
||||
- 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890
|
||||
- 1234567890 - 1234567890 - 1234567890;
|
||||
auto a = 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890
|
||||
* 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890
|
||||
* 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890
|
||||
* 1234567890 * 1234567890 * 1234567890;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
unittest
|
||||
{
|
||||
auto a = 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890;
|
||||
auto a = 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890;
|
||||
auto a = 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
unittest {
|
||||
auto a = 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890
|
||||
+ 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890
|
||||
+ 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890
|
||||
+ 1234567890 + 1234567890 + 1234567890;
|
||||
auto a = 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890
|
||||
- 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890
|
||||
- 1234567890 - 1234567890 - 1234567890 - 1234567890 - 1234567890
|
||||
- 1234567890 - 1234567890 - 1234567890;
|
||||
auto a = 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890
|
||||
* 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890
|
||||
* 1234567890 * 1234567890 * 1234567890 * 1234567890 * 1234567890
|
||||
* 1234567890 * 1234567890 * 1234567890;
|
||||
}
|
Loading…
Reference in New Issue