Fix #49
This commit is contained in:
parent
49633c8901
commit
b989388e7c
|
|
@ -428,8 +428,11 @@ private:
|
|||
else if (!assumeSorted(astInformation.caseEndLocations)
|
||||
.equalRange(current.index).empty)
|
||||
{
|
||||
if (!(peekIs(tok!"case") || peekIs(tok!"default") || peekIsLabel()))
|
||||
if (!(peekIs(tok!"case", false) || peekIs(tok!"default", false)
|
||||
|| peekIs(tok!"}") || peekIsLabel()))
|
||||
{
|
||||
indentLevel++;
|
||||
}
|
||||
writeToken();
|
||||
newline();
|
||||
}
|
||||
|
|
@ -843,8 +846,8 @@ private:
|
|||
writeToken();
|
||||
write(" ");
|
||||
}
|
||||
else if (peekIs(tok!"case") || peekIs(tok!"default")
|
||||
|| peekIs(tok!"}") || peekIsLabel())
|
||||
else if (peekIs(tok!"case", false) || peekIs(tok!"default", false)
|
||||
|| peekIs(tok!"}", false) || peekIsLabel())
|
||||
{
|
||||
indentLevel = l;
|
||||
formatStep();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
void main(string[] args)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0:
|
||||
return null;
|
||||
case 1:
|
||||
// Indented comment
|
||||
/* fall through */
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
void main(string[] args)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0:
|
||||
return null;
|
||||
case 1:
|
||||
// Indented comment
|
||||
/* fall through */
|
||||
default:
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue