Skip to content

Commit

Permalink
Fix #436
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerpilot committed Feb 20, 2019
1 parent b34acc9 commit b4e97d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/dfmt/formatter.d
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,18 @@ private:
{
writeToken();
write(" ");
while (index < tokens.length)
{
if (currentIs(tok!"("))
formatLeftParenOrBracket();
else if (currentIs(tok!")"))
{
formatRightParen();
break;
}
else
writeToken();
}
}
else if (((isBlockHeader() || currentIs(tok!"version")) && peekIs(tok!"("))
|| (currentIs(tok!"debug") && peekIs(tok!"{")))
Expand Down
1 change: 1 addition & 0 deletions tests/allman/issue0436.d.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extern (Objective-C) int a;
1 change: 1 addition & 0 deletions tests/issue0436.d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extern (Objective-C) int a;
1 change: 1 addition & 0 deletions tests/otbs/issue0436.d.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extern (Objective-C) int a;

0 comments on commit b4e97d3

Please sign in to comment.