public static Block RemovePossibleReturn(Block block, out bool modified) { if (block.Count > 0 && block.AsAdded[0] is ReturnSignal) { var builder = new CodeBuilder(); builder.Copy(block, 1); modified = true; return(builder.Block); } modified = false; return(block); }