/// <summary>Make the 'to' template look exactly like the 'from' template /// except for the attributes. This is like creating an instance /// of a class in that the executable code is the same (the template /// chunks), but the instance data is blank (the attributes). Do /// not copy the enclosingInstance pointer since you will want this /// template to eval in a context different from the examplar. /// </summary> protected internal virtual void dup(StringTemplate from, StringTemplate to) { if (debugMode) debug("dup template ID " + from.getTemplateID() + " to get " + to.getTemplateID()); to.pattern = from.pattern; to.chunks = from.chunks; to.formalArguments = from.formalArguments; to.name = from.name; to.group = from.group; to.listener = from.listener; }