Fix crash on import expressions
This commit is contained in:
parent
24d78d8869
commit
445bbf0956
12
src/dfmt.d
12
src/dfmt.d
|
@ -211,6 +211,11 @@ private:
|
||||||
{
|
{
|
||||||
auto t = current.type;
|
auto t = current.type;
|
||||||
writeToken();
|
writeToken();
|
||||||
|
if (current.type == tok!"(")
|
||||||
|
{
|
||||||
|
writeParens(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
write(" ");
|
write(" ");
|
||||||
while (index < tokens.length)
|
while (index < tokens.length)
|
||||||
{
|
{
|
||||||
|
@ -289,10 +294,15 @@ private:
|
||||||
switch (current.type)
|
switch (current.type)
|
||||||
{
|
{
|
||||||
case tok!"default":
|
case tok!"default":
|
||||||
case tok!"cast":
|
|
||||||
writeToken();
|
writeToken();
|
||||||
break;
|
break;
|
||||||
|
case tok!"cast":
|
||||||
|
writeToken();
|
||||||
|
write(" ");
|
||||||
|
writeParens(true);
|
||||||
|
break;
|
||||||
case tok!"mixin":
|
case tok!"mixin":
|
||||||
|
case tok!"assert":
|
||||||
writeToken();
|
writeToken();
|
||||||
write(" ");
|
write(" ");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue