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

equal_assign changed to expr_or_assign_or_help in R 4.0 #327

Closed
renkun-ken opened this issue Aug 27, 2020 · 0 comments · Fixed by #328
Closed

equal_assign changed to expr_or_assign_or_help in R 4.0 #327

renkun-ken opened this issue Aug 27, 2020 · 0 comments · Fixed by #328

Comments

@renkun-ken
Copy link
Member

The = token changed from equal_assign to expr_or_assign_or_help in R 4.0, breaking the xpaths we use in scope completion, definition, and hover.

R 3.6

> e <- parse(text = "a=1")

> getParseData(e)
  line1 col1 line2 col2 id parent        token terminal text
8     1    1     1    3  8      0 equal_assign    FALSE     
1     1    1     1    1  1      3       SYMBOL     TRUE    a
3     1    1     1    1  3      8         expr    FALSE     
2     1    2     1    2  2      8    EQ_ASSIGN     TRUE    =
4     1    3     1    3  4      5    NUM_CONST     TRUE    1
5     1    3     1    3  5      8         expr    FALSE     

R 4.0

> e <- parse(text= "a=1")

> getParseData(e)
  line1 col1 line2 col2 id parent                  token terminal text
9     1    1     1    3  9      0 expr_or_assign_or_help    FALSE     
1     1    1     1    1  1      3                 SYMBOL     TRUE    a
3     1    1     1    1  3      9                   expr    FALSE     
2     1    2     1    2  2      9              EQ_ASSIGN     TRUE    =
5     1    3     1    3  5      6              NUM_CONST     TRUE    1
6     1    3     1    3  6      9                   expr    FALSE     
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant