Displaying 1 result from an estimated 1 matches for "xsubstitutions".
Did you mean:
substitutions
2018 Jan 01
0
lit: dependent substitutions?
...ons (e.g. %s) to absolute paths, and I'd like to be able to
introduce substitutions for the source path relative to the source
root. This seems generally useful -- if there was a way in lit.cfg to
register a function for substitution instead of a simple pair, we
could do stuff like:
config.xsubstitutions.append(('%r', lambda s: os.path.relpath(s,
some_root)))
Most of the simple builtin substitutions are variations on this theme,
so I guess they could be implemented similarly.
Is this a useful direction? Would you accept lit patches to that end?
Thanks,
- Kim