xogeny / denada-go

A Golang implementation of Denada
32 stars 4 forks source link

Add an insert transformation #9

Open xogeny opened 10 years ago

xogeny commented 10 years ago

This could be done by creating a new transformation like import. But the problem there is that it wouldn't be very DRY. So ideally, I'd create some kind of visitor implementation where I could just plug in some simply code for each transformation.

Another alternative is to extend the import directive to allow inserting from some a supplied map[string]ElementList instead of just from a file.