syntax: leading and trailing periods / dots not tokenized as part of identifier
Given an R document with the code:
.hello.world.
The leading + trailing .s are tokenized as separate entities.
I believe the use of \b here forces VSCode to consider . as a word boundary, and so it fails to tokenize the whole identifier as a single token:
https://github.com/REditorSupport/vscode-R/blob/da579cc17a9485f7a11bf5e75bf6b9c347eca116/syntax/r.json#L165-L168
If so, I think those \bs can be safely removed?
Yes, I think you are right. We should remove those \b. Do you find unnecessary \b in other matches?
I guess another example 42., which R parses as a single number but appears to be tokenized as 42 and .:
https://github.com/REditorSupport/vscode-R/blob/da579cc17a9485f7a11bf5e75bf6b9c347eca116/syntax/r.json#L123-L126
And also for references to packages containing a . in their name:
I'll poke around a bit more for other edge cases...
Could one potential edge case be on S3 methods ? i.e.
as.data.frame.list()
though tbh I'm not exactly sure what you would want to tokenise here :s
This issue is stale because it has been open for 365 days with no activity.
unstale