Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement file templating #17

Open
calebzulawski opened this issue Mar 23, 2023 · 1 comment
Open

Implement file templating #17

calebzulawski opened this issue Mar 23, 2023 · 1 comment

Comments

@calebzulawski
Copy link
Collaborator

File templating is common, but the easiest way to do it right now is with multiline strings. It would be nice if files could be templated directly, with the same syntax as strings.

@afranchuk
Copy link
Collaborator

I assume you mean something where the templated file exists outside the script, and you could do something like std:fs:apply-template path/to/template/file path/to/output?

This would work very differently from multiline strings if it were a function, as they statically determine all captures and are parsed during tokenization. A syntax builtin would make it more equivalent, e.g. rust's include! macro occurs prior to tokenization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants