Skip to content

Support string open/content/close in RStringValue#497

Open
DavisVaughan wants to merge 8 commits into
mainfrom
feature/string-content
Open

Support string open/content/close in RStringValue#497
DavisVaughan wants to merge 8 commits into
mainfrom
feature/string-content

Conversation

@DavisVaughan

@DavisVaughan DavisVaughan commented May 29, 2026

Copy link
Copy Markdown
Collaborator

For r-lib/tree-sitter-r#199

No user facing changes.

Main developer facing change is the ability to do this on an RStringValue, and it works correctly for single quoted strings, double quoted strings, and raw strings:

node.open_token()
node.content_token() // optional
node.close_token()

Note to self:

Instead of 'string_open' and 'string_close' tokens in the ungrammar, I originally had alternations of ('"' | '\'' | 'raw_string_open') and ('"' | '\'' | 'raw_string_close'). This required tweaks to the codegen xtask (similar to ones we have done in the past, and in line with changes biome has made in the meantime). I did not end up needing this, so I reverted the commit but kept it in the history in case we have to do this in the future, because it is not an obvious fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant