summaryrefslogtreecommitdiff
path: root/lang/c/pseudoc.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2024-10-24 14:25:04 -0400
committerPeter LaFosse <peter@vector35.com>2024-10-24 14:25:04 -0400
commita0242dc95da8b9d83a6a88272cfb7c973b158b73 (patch)
tree177d0faa10f876b06259bea262a88ebf3e9a5459 /lang/c/pseudoc.cpp
parent6d7f4ac49f5db820c5c468b69efc953cab87307b (diff)
Fix alignment of top level braces in PseudoC
Diffstat (limited to 'lang/c/pseudoc.cpp')
-rw-r--r--lang/c/pseudoc.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lang/c/pseudoc.cpp b/lang/c/pseudoc.cpp
index 2a1ac3a9..8de510a7 100644
--- a/lang/c/pseudoc.cpp
+++ b/lang/c/pseudoc.cpp
@@ -31,6 +31,7 @@ void PseudoCFunction::BeginLines(const HighLevelILInstruction& instr, HighLevelI
if (instr.exprIndex == m_highLevelIL->GetRootExpr().exprIndex)
{
// At top level, add braces around the entire function
+ tokens.PrependCollapseIndicator();
tokens.AppendOpenBrace();
tokens.NewLine();
tokens.IncreaseIndent();
@@ -45,6 +46,7 @@ void PseudoCFunction::EndLines(const HighLevelILInstruction& instr, HighLevelILT
// At top level, add braces around the entire function
tokens.NewLine();
tokens.DecreaseIndent();
+ tokens.PrependCollapseIndicator();
tokens.AppendCloseBrace();
}
}
@@ -813,6 +815,7 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H
if (function->IsInstructionCollapsed(instr, 1))
{
tokens.Append(CollapsedInformationToken, " {...}");
+ tokens.NewLine();
}
else
{