Re: [Rd] [External] parse data wrong for R 4.0. raw strings

2020-04-22 Thread luke-tierney
Probably does make sense to keep the whole raw string expression. Also probably best to file with bugzilla so this doesn't slip through the cracks. This would be a bug fix, so OK for 4.0.1, but not urgent so could wait until 4.1.0. Best, luke On Wed, 22 Apr 2020, Gábor Csárdi wrote: I don't

Re: [Rd] [External] parse data wrong for R 4.0. raw strings

2020-04-22 Thread Gábor Csárdi
I don't know, maybe it would make sense to keep the whole expression, that's the text of the tag after all. Also, if we don't keep the whole expression, then it is not a valid string literal any more, because it does not have quoting. I can try to look into a patch. This is for 4.1 I believe, so

Re: [Rd] [External] parse data wrong for R 4.0. raw strings

2020-04-22 Thread luke-tierney
Looks like a bug. Will have a look when I get a chance. Simpler version: getParseData(parse(text = 'r"-|hello|-"')) getParseData(parse(text = 'r"(hello)"')) line1 col1 line2 col2 id parent token terminaltext 1 11 1 10 1 3 STR_CONST TRUE "hello) 3 11

[Rd] parse data wrong for R 4.0. raw strings

2020-04-22 Thread Gábor Csárdi
This seems like a bug to me: code <- 'x <- r"(hello, "world")"' getParseData(parse(text = code)) #> line1 col1 line2 col2 id parent token terminal text #> 7 11 1 24 7 0exprFALSE #> 1 11 11 1 3 SYMBOL TRUE