public override void Visit(VarDefOp op, Node n) { VisitAncillaryOpDefault(op, n); AssertScalarOp(n.Child0.Op); VarDefOp varDefOp = (VarDefOp)op; AssertEqualTypes(varDefOp.Var.Type, n.Child0.Op.Type); }
public override void Visit(VarDefOp op, Node n) { Dictionary <string, object> attrs = new Dictionary <string, object>(); attrs.Add("Var", op.Var.Id); using (new AutoXml(this, op, attrs)) { VisitChildren(n); } }
/// <summary> /// Copies a VarDefOp /// </summary> /// <param name="op">The Op to Copy</param> /// <param name="n">The Node that references the Op</param> /// <returns>A copy of the original Node that references a copy of the original Op</returns> public override Node Visit(VarDefOp op, Node n) { // First create a new Var List <Node> children = ProcessChildren(n); Debug.Assert(op.Var.VarType == VarType.Computed, "Unexpected VarType"); Var newVar = m_destCmd.CreateComputedVar(op.Var.Type); SetMappedVar(op.Var, newVar); return(m_destCmd.CreateNode(m_destCmd.CreateVarDefOp(newVar), children)); }