fizyr / subst

Apache License 2.0
12 stars 5 forks source link

Implement re-usable templates. #21

Closed de-vri-es closed 3 months ago

de-vri-es commented 3 months ago

This PR makes it possible to re-use a parsed template string more than once.

To preserve backwards compatibility the error types are a little but duplicate now, but I think it's worth it to avoid breaking compatibility.

This can also be used by #18 to implement the different expansion modes without breaking the API.