override public void LeaveGeneratorExpression(GeneratorExpression node) { var collector = new ForeignReferenceCollector(); collector.CurrentType = (IType)AstUtil.GetParentClass(node).Entity; node.Accept(collector); var processor = new GeneratorExpressionProcessor(Context, collector, node); processor.Run(); ReplaceCurrentNode(processor.CreateEnumerableConstructorInvocation()); }
public override void LeaveGeneratorExpression(GeneratorExpression node) { var collector = new ForeignReferenceCollector { CurrentType = TypeContaining(node) }; node.Accept(collector); var processor = new GeneratorExpressionProcessor(Context, collector, node); processor.Run(); ReplaceCurrentNode(processor.CreateEnumerableConstructorInvocation()); }