protected override void PostWalk(CodeBlock node) { node.Body = Rewrite(node.Body); List <Variable> toremove = new List <Variable>(); foreach (var v in node.Variables) { if (!references.ContainsKey(v)) { toremove.Add(v); } } node.RemoveVariables(toremove); node.Bind(); }
protected override void PostWalk(CodeBlock node) { node.Body = Rewrite(node.Body); List<Variable> toremove = new List<Variable>(); foreach (var v in node.Variables) { if (!references.ContainsKey(v)) { toremove.Add(v); } } node.RemoveVariables(toremove); node.Bind(); }