Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding "open" and "close" field names for strings #139

Open
DavisVaughan opened this issue Sep 10, 2024 · 0 comments
Open

Consider adding "open" and "close" field names for strings #139

DavisVaughan opened this issue Sep 10, 2024 · 0 comments

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Sep 10, 2024

tree-sitter-r/grammar.js

Lines 481 to 491 in c8b6e5f

_single_quoted_string: $ => seq(
'\'',
optional(field("content", alias($._single_quoted_string_content, $.string_content))),
'\''
),
_double_quoted_string: $ => seq(
'"',
optional(field("content", alias($._double_quoted_string_content, $.string_content))),
'"'
),

So you can get at whether it is a single or double quoted string by field name

Using "open" and "close" is similar to what we do in other places

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

No branches or pull requests

1 participant