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

String interpolation #109

Merged
merged 18 commits into from
Sep 4, 2023
Merged

String interpolation #109

merged 18 commits into from
Sep 4, 2023

Conversation

01mf02
Copy link
Owner

@01mf02 01mf02 commented Aug 29, 2023

This PR adds support for string interpolation, such as "The successor of \(.) is \(.+1)."
It also allows prefixing formatters, allowing for things like @uri "https://www.google.com/search?q=\(.search)".

Unlike jq, jaq allows the definition of n-ary filters starting with an @.
However, like jq, jaq limits the usage of formatters usable in string interpolation to nullary filters starting with an @. This restriction simplifies the parser, which might otherwise run into exponential runtime issues.

@01mf02 01mf02 mentioned this pull request Aug 29, 2023
@01mf02 01mf02 merged commit 66f29c2 into main Sep 4, 2023
1 check passed
@01mf02 01mf02 deleted the string-interpolation branch September 4, 2023 07:21
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.

1 participant