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

Support slashy interpolated string #51

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bentsherman
Copy link
Member

Close #49

Testing support for slashy interpolated strings, which can be useful for defining an interpolated regex without needing as many escapes.

TODO:

  • provide an example that shows the benefit over a regular interpolated string

@bentsherman
Copy link
Member Author

This case doesn't work:

id = 'SRA001'
println /${id}.fastq/

It gives Unexpected input: '<EOF>' at the end of the script

Adding parentheses is a workaround:

id = 'SRA001'
println(/${id}.fastq/)

But still the slashy string isn't being parsed correctly:

GStringExpression(2:9-2:21)
  ConstantExpression(2:11-2:20)

It is parsing the string contents as plain text rather than the ${id} expression.

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.

How to deal with Regex comparisons
1 participant