From 3237a7b4217d6309deabdcff3d511469350eb8f0 Mon Sep 17 00:00:00 2001 From: marcos henrich Date: Wed, 2 Apr 2014 15:42:00 +0100 Subject: [PATCH] Template method PopBlock now returns the active block. --- src/Generator/Generators/Template.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Generator/Generators/Template.cs b/src/Generator/Generators/Template.cs index 927d3c49..000f151d 100644 --- a/src/Generator/Generators/Template.cs +++ b/src/Generator/Generators/Template.cs @@ -291,10 +291,14 @@ namespace CppSharp.Generators ActiveBlock = block; } - public void PopBlock(NewLineKind newLineKind = NewLineKind.Never) + public Block PopBlock(NewLineKind newLineKind = NewLineKind.Never) { + var block = ActiveBlock; + ActiveBlock.NewLineKind = newLineKind; ActiveBlock = ActiveBlock.Parent; + + return block; } public IEnumerable FindBlocks(int kind)