I think the closest "standard" tool for this is m4, which doesn't seem powerful enough for most applications.
Lips seems similar, but for Lisp/Scheme (e.g. https://github.com/zc1036/lips https://github.com/rbryan/guile-lips )
Lips seems similar, but for Lisp/Scheme (e.g. https://github.com/zc1036/lips https://github.com/rbryan/guile-lips )