127 introduce within.qenv - #147
Closed
chlebowa wants to merge 6 commits into
Closed
Conversation
chlebowa
marked this pull request as ready for review
October 2, 2023 10:03
Contributor
Code Coverage SummaryDiff against mainResults for commit: 260ae9f Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Contributor
Contributor
Author
|
Since we want to store code as is, it becomes an issue to perform substitution properly. Code coming in (whether it's through |
Contributor
Author
|
A solution has been proposed 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #127
Added an S3
withinmethod for classqenv.Usage:
within(data, expr, code, ...).dataisqenv, this is handled by S3 dispatchexpris for literal codecodeis for variables holding code (call, list of calls, expression, list of expressions) or literal character stringsCode passed in any form is converted into list of (single) calls, which are evaluated sequentially.
The whole code is appended to the
@codeslot. Currently this is stored asexpressionbut following #146 the slot will hold a single string, which will enable keeping comments.Characters (vectors or strings) passed to
codeare stored as single strings, combined withpaste(..., collapse = "\n").Language (calls or lists of calls, expressions or lists of expressions) passed to
codeare deparsed and combined likewise.