function template(str) {
		str = String(str);
		return (replacements = {}) => {
			const code = str.replace(/[A-Z0-9]+/g, s => {
				return s in replacements ? generate(replacements[s]) : s;
			});

			return template.ast(code);
		};
	}
@param {TemplateStringsArray} str
@returns {(replacements: Record<string, Node>) => Node}