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.Dismiss alert
Similar to #68, highlighting line directives such as #line 42 example.R instead of parsing them simply as (program (comment)) could be beneficial.
The default R parser handles it as a separate LINE_DIRECTIVE token:
Mayyyyybe. They aren't used that frequently from what I've seen.
We would probably want to nest them within comment somehow if we did this, like (program (comment (line_directive <fields>))) so that people can iterate over comments and have line directives be included by default, which seems like what you'd want. And you can just skip them (by recognizing the node kind of the child) if you care about handling them separately.
I'm more convinced about including this than roxygen2 support, since this is literally built into the language, but I'm not sure the very small benefit is worth the effort / headache.
You could also use a query to locate them today, but you'd have to do some additional work to make sure they are at the 1st column of the line, and match the correct form of a line directive
Similar to #68, highlighting line directives such as
#line 42 example.R
instead of parsing them simply as(program (comment))
could be beneficial.The default R parser handles it as a separate
LINE_DIRECTIVE
token:The text was updated successfully, but these errors were encountered: