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

feat: implement the string functions in the WDL standard library. #252

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

peterhuene
Copy link
Collaborator

This commit implements the following functions in the WDL standard library:

  • find
  • matches
  • sub

Additionally, the spans of the arguments are now passed into the functions so that any returned diagnostics may point at a particular argument.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have added yourself or the appropriate individual as the assignee.
  • You have added at least one relevant code reviewer to the PR.
  • Your code builds clean without any errors or warnings.
  • You have added tests (when appropriate).
  • You have updated the README or other documentation to account for these
    changes (when appropriate).
  • You have added an entry to the relevant CHANGELOG.md (see
    "keep a changelog" for more information).
  • Your commit messages follow the conventional commit style.

This commit implements the following functions in the WDL standard library:

* `find`
* `matches`
* `sub`

Additionally, the spans of the arguments are now passed into the functions so
that any returned diagnostics may point at a particular argument.
@peterhuene
Copy link
Collaborator Author

peterhuene commented Nov 12, 2024

We should have a lint that checks to see if the pattern argument to each of these functions (find, matches, and sub) is a string literal, and if so, do a static check to ensure it's a valid regular expression.

Edit: opened #253 to track.

@peterhuene peterhuene merged commit 71d4e77 into stjude-rust-labs:main Nov 12, 2024
16 checks passed
@peterhuene peterhuene deleted the stdlib branch November 12, 2024 22:05
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.

2 participants