r-lib / xmlparsedata

R code parse data as an XML tree
https://r-lib.github.io/xmlparsedata/
Other
23 stars 6 forks source link

re-parse octal constants when possible #26

Closed MichaelChirico closed 1 year ago

MichaelChirico commented 2 years ago

Closes #25

MichaelChirico commented 2 years ago

check if the current R session needs the workaround at all

that was my thinking behind putting the overwrite inside a conditional. happy to add a "soft cached" check like with(utils::getParseData(parse(text = "'\\1'"))[1, ], col2 - col1), but I'm not sure how robust it is.

I don't think the current test is very expensive. e.g. on tools/R/QC.R (longest file in the R sources; nrow(parseData) is ~87K) the test takes 0.016 seconds.

Happy to add the test, just not sure it's worth the maintenance burden, WDYT?

gaborcsardi commented 1 year ago

Thanks!