Fix crash on import expressions

This commit is contained in:
Hackerpilot 2015-02-23 16:24:02 -08:00
parent 24d78d8869
commit 445bbf0956
1 changed files with 11 additions and 1 deletions

View File

@ -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;