public Expr CopyExpr(Expr expr) { if (substMap == null) { return expr; } return BoundVarAndReplacingOldSubstituter.Apply(substMap, oldSubstMap, prefix, expr); }
public Cmd CopyCmd(Cmd cmd) { if (substMap == null) { return cmd; } return BoundVarAndReplacingOldSubstituter.Apply(substMap, oldSubstMap, prefix, cmd); }
public Cmd CopyCmd(Cmd cmd) { if (substMap == null) { return cmd; } var newCmd = BoundVarAndReplacingOldSubstituter.Apply(substMap, oldSubstMap, prefix, cmd); if (cmd is ICarriesAttributes attrCmd && attrCmd.Attributes != null) { var attrCopy = (QKeyValue) attrCmd.Attributes.Clone(); ((ICarriesAttributes) newCmd).Attributes = Substituter.ApplyReplacingOldExprs(PartialSubst, PartialOldSubst, attrCopy); } return newCmd; }