bdarcus / csln

Reimagining CSL
Mozilla Public License 2.0
13 stars 0 forks source link

Add substitution support #23

Closed bdarcus closed 1 year ago

bdarcus commented 1 year ago

So how to do this, in Rust.

If an author is None, then iterate through the substitution options until one returns Some.

The wrinkle is what to do with that substituted variable at that point. In 1.0, it's suppressed, which I think is correct. But then how best to do that technically?

Seems likely will need to store the substituted value or type, which is not necessarily a Contributor, on the Template implementation.

I guess there's only ever going to be one substituted item, so maybe we need a mutable variable that stores that type?