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

Fix parse tree for !! #296

Closed
lionel- opened this issue Nov 24, 2017 · 1 comment
Closed

Fix parse tree for !! #296

lionel- opened this issue Nov 24, 2017 · 1 comment
Labels

Comments

@lionel-
Copy link
Member

@lionel- lionel- commented Nov 24, 2017

  • Remove one layer of parentheses surrounding bang-bang, e.g. (!! x). This way:
x <- quote(fn)
expr(
  (!! x)(foo)
)

# expands to:
fn(foo)

# instead of:
(fn)(foo)
  • What operator precedence do we want for !!? On master it's now binding very tightly, but maybe we should make some exceptions. Maybe operators that are written without space should bing tightlier than !!:
expr(!! x:y)

Currently on master this is equivalent to:

expr((!! x):y)

But maybe this should be:

expr(!! (x:y))

There is a similar issue for ^:

expr(!! x^y)
@lionel- lionel- added the tidyeval label Nov 24, 2017
lionel- added a commit to lionel-/rlang that referenced this issue Nov 27, 2017
Part of r-lib#296
lionel- added a commit to lionel-/rlang that referenced this issue Nov 28, 2017
Part of r-lib#296
@hadley
Copy link
Member

@hadley hadley commented Nov 28, 2017

I think it's most consistent to match the existing infix operators + and -

lionel- added a commit to lionel-/rlang that referenced this issue Nov 28, 2017
Part of r-lib#296
lionel- added a commit to lionel-/rlang that referenced this issue Nov 28, 2017
Part of r-lib#296
@lionel- lionel- closed this in e8fb232 Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants