Support semi colons on single line in statement range detection #638
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.
Branched from #636.
Addresses posit-dev/positron#4317
Adds a dependency of statement-range on the R parser. This is consistent with our plans to make evaluation of selections depend on the R parser as well (complete expressions detection).
When a statement range is requested, we simply check if the whole line completely parses. If that's the case we return the line range. This tactic doesn't work if multiline expressions are separated by semi-colons. We can find a better way when we switch to a Rowan implementation.
Positron Release Notes
New Features
Bug Fixes
Cmd/Ctrl + Enter
now works as expected with expressions separated by semi-colons on a single line.Semi-colons not respected when running single line commands in R positron#4317
Positron QA Notes
Cmd/Ctrl + Enter on that line (or an empty preceding line) should run the entire line:
A semi-colon following a multiline expression is not supported yet, so for instance this would evaluate only the braces: