dlang-community / SDLang-D

An SDLang (Simple Declarative Language) library for D
http://sdlang.org
Other
120 stars 21 forks source link

Add a way to deep clone a tag (and all its children) #38

Closed trikko closed 7 years ago

trikko commented 8 years ago

I can't find anything...

This is a ugly workaround:

Tag dup(Tag t) 
{
    Tag clone =  t.toSDLString.parseSource.tags[0];
    clone.remove();
    return clone; 
}
Abscissa commented 8 years ago

Unfortunately no, not at the moment, but that's a good idea. (PR's welcome, of course!)