-
Notifications
You must be signed in to change notification settings - Fork 33
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
Allow newlines directly after function
and \
#145
Merged
DavisVaughan
merged 3 commits into
r-lib:main
from
DavisVaughan:fix/newline-after-function
Sep 17, 2024
Merged
Allow newlines directly after function
and \
#145
DavisVaughan
merged 3 commits into
r-lib:main
from
DavisVaughan:fix/newline-after-function
Sep 17, 2024
Conversation
This file contains 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
DavisVaughan
added a commit
to posit-dev/ark
that referenced
this pull request
Sep 17, 2024
DavisVaughan
added a commit
to posit-dev/ark
that referenced
this pull request
Sep 23, 2024
DavisVaughan
added a commit
to posit-dev/ark
that referenced
this pull request
Sep 23, 2024
* Fix invalid R code in `indent.R` causing issues * Embrace `{ }` illegal if/else statements in `indent.R` * Bump tree-sitter-r * Remove `UnmatchedDelimiter` node * First pass at diagnostics update * Bump tree-sitter-r again To get a combination of fixes that work nicely together * Split syntax and semantic diagnostics * Tweak some message formatting * Allow semantic diagnostics on subtrees with no errors * Add customized syntax error for unmatched closing token * Don't need a mutable context * More on not needing a mutable context * Add syntax error range truncation to avoid overwhelming the user Can often occur when you have unmatched string delimiters, which there isn't much else we can do about * Ha, use a package that will always be installed Otherwise we get a diagnostic about dplyr not being installed * Simplify `node_find_string()` a little * Remove `build_` prefix * Tweak message * Bump to latest tree-sitter-r, includes tree-sitter 0.23.0 * Adapt to new tree-sitter `LANGUAGE` conventions * Update to `LANGUAGE` in tests too * Add test for previous `(0, 0)` `program` node issue * Fix more invalid R syntax in `indent.R` Otherwise example 34 now indents out one level * Custom panic message in `statement_range_test()` * Bump tree-sitter-r one more time for r-lib/tree-sitter-r#145 * Fix tests related to `(0, 0)` `program` node issue * Adapt diagnostics tests to tree-sitter-r grammar changes * Bump tree-sitter-r once again * Rename syntactic -> syntax * Remove TODOs in `indent.R` * Token -> Delimiter * Switch to snapshot testing for diagnostics * Use simpler recursion scheme for only reporting terminal `ERROR`s
lionel-
pushed a commit
to posit-dev/air
that referenced
this pull request
Nov 12, 2024
* Fix invalid R code in `indent.R` causing issues * Embrace `{ }` illegal if/else statements in `indent.R` * Bump tree-sitter-r * Remove `UnmatchedDelimiter` node * First pass at diagnostics update * Bump tree-sitter-r again To get a combination of fixes that work nicely together * Split syntax and semantic diagnostics * Tweak some message formatting * Allow semantic diagnostics on subtrees with no errors * Add customized syntax error for unmatched closing token * Don't need a mutable context * More on not needing a mutable context * Add syntax error range truncation to avoid overwhelming the user Can often occur when you have unmatched string delimiters, which there isn't much else we can do about * Ha, use a package that will always be installed Otherwise we get a diagnostic about dplyr not being installed * Simplify `node_find_string()` a little * Remove `build_` prefix * Tweak message * Bump to latest tree-sitter-r, includes tree-sitter 0.23.0 * Adapt to new tree-sitter `LANGUAGE` conventions * Update to `LANGUAGE` in tests too * Add test for previous `(0, 0)` `program` node issue * Fix more invalid R syntax in `indent.R` Otherwise example 34 now indents out one level * Custom panic message in `statement_range_test()` * Bump tree-sitter-r one more time for r-lib/tree-sitter-r#145 * Fix tests related to `(0, 0)` `program` node issue * Adapt diagnostics tests to tree-sitter-r grammar changes * Bump tree-sitter-r once again * Rename syntactic -> syntax * Remove TODOs in `indent.R` * Token -> Delimiter * Switch to snapshot testing for diagnostics * Use simpler recursion scheme for only reporting terminal `ERROR`s
lionel-
pushed a commit
to posit-dev/air
that referenced
this pull request
Nov 26, 2024
* Fix invalid R code in `indent.R` causing issues * Embrace `{ }` illegal if/else statements in `indent.R` * Bump tree-sitter-r * Remove `UnmatchedDelimiter` node * First pass at diagnostics update * Bump tree-sitter-r again To get a combination of fixes that work nicely together * Split syntax and semantic diagnostics * Tweak some message formatting * Allow semantic diagnostics on subtrees with no errors * Add customized syntax error for unmatched closing token * Don't need a mutable context * More on not needing a mutable context * Add syntax error range truncation to avoid overwhelming the user Can often occur when you have unmatched string delimiters, which there isn't much else we can do about * Ha, use a package that will always be installed Otherwise we get a diagnostic about dplyr not being installed * Simplify `node_find_string()` a little * Remove `build_` prefix * Tweak message * Bump to latest tree-sitter-r, includes tree-sitter 0.23.0 * Adapt to new tree-sitter `LANGUAGE` conventions * Update to `LANGUAGE` in tests too * Add test for previous `(0, 0)` `program` node issue * Fix more invalid R syntax in `indent.R` Otherwise example 34 now indents out one level * Custom panic message in `statement_range_test()` * Bump tree-sitter-r one more time for r-lib/tree-sitter-r#145 * Fix tests related to `(0, 0)` `program` node issue * Adapt diagnostics tests to tree-sitter-r grammar changes * Bump tree-sitter-r once again * Rename syntactic -> syntax * Remove TODOs in `indent.R` * Token -> Delimiter * Switch to snapshot testing for diagnostics * Use simpler recursion scheme for only reporting terminal `ERROR`s
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.
Fixes an issue accidentally introduced by #134 where I guess we were consuming these newlines automatically previously (which I think was actually a mistake on our part, we should indeed have had an explicit
repeat($._newline)
here)