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 1 1 1 24 7 0 expr FALSE #> 1 1 1 1 1 1 3 SYMBOL TRUE x #> 3 1 1 1 1 3 7 expr FALSE #> 2 1 3 1 4 2 7 LEFT_ASSIGN TRUE <- #> 4 1 6 1 24 4 6 STR_CONST TRUE "hello, "world") #> 6 1 6 1 24 6 7 expr FALSE
Note that for STR_CONST, the opening delimiter is not included, but the paren from the closing delimiter is. Best, Gabor ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel