-
Notifications
You must be signed in to change notification settings - Fork 73
Wrap expr in expr before enclosing with curly braces #263
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
Merged
Conversation
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
Closed
See #77 for an earlier (short) discussion on the ordering of the transformations. |
krlmlr
approved these changes
Oct 26, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good. If we don't need the parents
column, maybe remove it altogether?
Always add parenthesis to both if-else part with strict = TRUE if expr is multiline. Closes r-lib#229.
70b0ebc
to
06e8063
Compare
Delete column parent in parse table after parse data is nested.
06e8063
to
dbc3cda
Compare
955bb0e
to
94cb7bc
Compare
Yes, |
krlmlr
added a commit
that referenced
this pull request
Nov 27, 2017
- Adapt documentation (#290). - Add roundtrip (#287). - Fix AppVeyor builds. - Fix token insertion / comment interaction (#279). - Clarify labelling strategy (#285). - Fixing and extending Rstudioaddins (#283). - Fix eq assign parsing (#276). - style_files -> vectorized style_file (#273). - Refactoring (#270). - Fix CI (#275). - Fix covr (#274). - Renaming files (#271). - Handle styling of an unsaved active file (#243). - Test R 3.1 and R 3.2 (#249). - Allow empty {} without line break (#261). - Wrap expr in expr before enclosing with curly braces (#263). - Avoid checking for hard-coded dot (#262). - Account for dependency renaming (utf8 changed to enc) (#264). - Indention of function declaration and closing braces (#260). - Only remove line break before closing with strict option (#252).
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.
Found a way around it as outlined in #257. However, the problem that
token_before
andtoken_after
get outdated after tokens were inserted persists. It's kind of a chicken and egg problem because if we first insert the tokens, we need to already have the line breaks set for which we needtoken_before
andtoken_after
(at least in the current code, and it might be necessary to do so to access tokens from neighbouring nests). Anyways I think we should merge that quickly since it seems to be substantial bug.The column
parent
in the nested parse table also get's outdated with this approach, but I think we can consider removing it after we computed the nested parse data since it appears to me to be not of any further use.