Yesterday I learned an unexpected but interesting use of the highr package
from a Github issue. This package is
intended for syntax highlighting R code, but the user wanted to identify
function calls from given R code. What he did was to first syntax highlight the
code, and then look for LaTeX code \kwd{}
in the result. I told him that this
task could be done with getParseData()
, but there were a few edge cases. For
example:
getParseData(parse(text = …