Skip to content

Commit

Permalink
Disable empty line hoist behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
colinator27 committed Dec 1, 2024
1 parent 07a46a9 commit e2527c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Underanalyzer/Decompiler/AST/LocalScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,15 @@ public void GenerateDeclarations(HashSet<string> declaredAnywhere)
}
blockChildren.Insert(index, localDecl!);

/*
// TODO? perhaps add this as a setting, but for now, will disable this to keep code style consistent
// If immediately before a node that has an empty line before it, take it over.
if (index < blockChildren.Count - 1 && blockChildren[index + 1].EmptyLineBefore)
{
blockChildren[index + 1].EmptyLineBefore = false;
localDecl!.EmptyLineBefore = true;
}
*/
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,8 @@ pop.v.v self.b
else
{
j = -1;

var i;

if (c)
{
}
Expand Down

0 comments on commit e2527c1

Please sign in to comment.