Merge pull request #396 from LaurentTreguier/debug-with-param
Debug with param merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
commit
810e4b464f
|
@ -207,7 +207,7 @@ private:
|
||||||
}
|
}
|
||||||
else if (currentIs(tok!"with"))
|
else if (currentIs(tok!"with"))
|
||||||
{
|
{
|
||||||
if (indents.length == 0 || (indents.top != tok!"switch" && indents.top != tok!"with"))
|
if (indents.length == 0 || !indents.topIsOneOf(tok!"switch", tok!"with"))
|
||||||
indents.push(tok!"with");
|
indents.push(tok!"with");
|
||||||
writeToken();
|
writeToken();
|
||||||
write(" ");
|
write(" ");
|
||||||
|
@ -732,13 +732,14 @@ private:
|
||||||
writeToken();
|
writeToken();
|
||||||
indents.popWrapIndents();
|
indents.popWrapIndents();
|
||||||
linebreakHints = [];
|
linebreakHints = [];
|
||||||
while (indents.topIsOneOf(tok!"enum", tok!"try", tok!"catch", tok!"finally"))
|
while (indents.topIsOneOf(tok!"enum", tok!"try", tok!"catch", tok!"finally", tok!"debug"))
|
||||||
indents.pop();
|
indents.pop();
|
||||||
if (indents.topAre(tok!"static", tok!"else"))
|
if (indents.topAre(tok!"static", tok!"else"))
|
||||||
{
|
{
|
||||||
indents.pop();
|
indents.pop();
|
||||||
indents.pop();
|
indents.pop();
|
||||||
}
|
}
|
||||||
|
indentLevel = indents.indentLevel;
|
||||||
if (config.dfmt_brace_style == BraceStyle.allman)
|
if (config.dfmt_brace_style == BraceStyle.allman)
|
||||||
{
|
{
|
||||||
if (!currentIs(tok!"{"))
|
if (!currentIs(tok!"{"))
|
||||||
|
@ -1552,7 +1553,7 @@ private:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (indents.topIsTemp() && (peekBackIsOneOf(true, tok!"}",
|
if (indents.topIsTemp() && (peekBackIsOneOf(true, tok!"}",
|
||||||
tok!";") && indents.top != tok!";"))
|
tok!";") && !indents.topIs(tok!";")))
|
||||||
indents.popTempIndents();
|
indents.popTempIndents();
|
||||||
indentLevel = indents.indentLevel;
|
indentLevel = indents.indentLevel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
debug (0)
|
||||||
|
foo();
|
||||||
|
else
|
||||||
|
bar();
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
debug(0) foo(); else bar();
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
void main() {
|
||||||
|
debug (0)
|
||||||
|
foo();
|
||||||
|
else
|
||||||
|
bar();
|
||||||
|
}
|
Loading…
Reference in New Issue