Skip to content

Make deftemplate and opt-ask public #222

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

pepe
Copy link
Member

@pepe pepe commented Jun 19, 2025

Closes #221

@sogaiu
Copy link
Contributor

sogaiu commented Jun 19, 2025

Though I don't quite follow all of the details, here's an attempt at a version of one of the docstrings with a few tweaks:

Define a template inline in the manner of Python PEP292 (shell-like $ substitution), also allowing dashes in identifiers.

A new function template-name is defined that takes a dictionary opts containing substitutions as key-value pairs. Keys should be keywords with names that correspond to those of the substitution names.

The template is parsed from body which should be a string and can contain substitutions.

@bakpakin bakpakin merged commit 4b99420 into janet-lang:master Jun 19, 2025
23 checks passed
@pepe pepe deleted the public-templates branch June 20, 2025 09:04
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

Successfully merging this pull request may close these issues.

Make pm/deftempate and pm/opt-ask public
3 participants