Exemplo n.º 1
0
        public override Node AcceptTransformer(AbstractHirTransformer transformer, bool forceDefaultImpl)
        {
            if (forceDefaultImpl)
            {
                var init = transformer.Transform(Init).AssertCast <Expression>();
                var body = transformer.Transform(Body).AssertCast <Block>();

                var visited = new Using(init, body);
                visited.Locals.SetElements(Locals.Select(loc => loc.DeepClone()));
                return(visited.HasProto(this));
            }
            else
            {
                return(transformer.TransformUsing(this).HasProto(this));
            }
        }
 protected internal virtual void TraverseUsing(Using @using) { @using.Unsupported(); }
 protected internal override void TraverseUsing(Using @using)
 {
     Dispatch(@using);
 }
Exemplo n.º 4
0
 public UsingDebugView(Using node, Object parentProxy) : this(node, parentProxy, NodeDebuggabilityHelper.InferDebugProxyNameFromStackTrace())
 {
 }
Exemplo n.º 5
0
 public UsingDebugView(Using node) : this(node, null)
 {
 }
Exemplo n.º 6
0
 public UsingDebugView_NoParent(Using node, Object parentProxy, String name)
 {
     _node = node; _parentProxy = parentProxy; _name = name;
 }
Exemplo n.º 7
0
 public UsingDebugView_NoParent(Using node) : this(node, null)
 {
 }
 protected internal override Node TransformUsing(Using @using)
 {
     return Dispatch(@using);
 }
 protected internal override void TraverseUsing(Using @using)
 {
     Traverse(@using.Init);
     Traverse(@using.Body);
     Types.Add(@using, null);
 }
 protected internal override void TraverseUsing(Using @using)
 {
     _writer.Write("foreach (var {0} in ", @using.Resource);
     Traverse(@using.Init);
     _writer.WriteLine(")");
     Traverse(@using.Body);
 }
 protected internal virtual Node TransformUsing(Using @using) { return @using.AcceptTransformer(this, true); }