You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
> getParseData(parse(text="t = 1"))
# current R 3.5.1line1col1line2col2idparenttokenterminaltext1111113SYMBOLTRUEt3111130exprFALSE2121220EQ_ASSIGNTRUE=4131345NUM_CONSTTRUE15131350exprFALSE# R devel after committed by Tomas Kaliberaline1col1line2col2idparenttokenterminaltext8111380equal_assignFALSE<====Iaddedthis1111113SYMBOLTRUEt3111138exprFALSE2121228EQ_ASSIGNTRUE=4131345NUM_CONSTTRUE15131358exprFALSE
Note the new token, which is not an expr and that all ids are changed. I was notified by the creator of the bug fix Tomas Kalibera as this will cause R CMD CHECK of styler (and reverse dependencies) to fail on R devel.
I see the following solution: Nest the parse data as is. Then, don't relocate the EQ_ASSIGN if a token equal_assign is present in a nest.
@krlmlr what do you think should we do? Should we wait until the bug fix of the base R parser is implemented in R devel, fix the problem here and create a new release? I think I can't guarantee that this works and submit before the changes are implemented in R devel and I won't build R devel myself.
The text was updated successfully, but these errors were encountered:
Sure I can test an updated source package for you on my system. There may be some more changes you'd need to make if your code assumes that the node for equality assignment is expr. Also some tests may need adjustment. As I said earlier I can also give you my patch for R.
Thanks Tomas. I'd like to use your patch but I am a bit afraid of building R devel from source myself if this is required at all. Is it? I run macOs, Linux and Windows.
You are right that more adjustments may be needed, but I think we hardly / never conditioned on whether a token is expr but instead used terminal for the operations that could be affected. Will try to check. Thanks for offering me to run my code, I will send you an email with the updated source package, taken from this branch. I just want to make sure this is not too time-consuming for you. I mocked GetParseData(parse(...)) with the code I posted above and it worked with the revision I am sending you, but obviously, this does not mean that R CMD CHECK will pass.