Skip to content

Add open and close fields everywhere appropriate #119

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

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

DavisVaughan
Copy link
Member

To make it easier to grab these nodes by name, rather than by index

CC @lionel-

To make it easier to grab these nodes by name, rather than by index
Comment on lines +56 to +57
open: "{" [(2, 0), (2, 1)]
open: (ERROR [(2, 1), (2, 2)]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will resolve itself when we update tree-sitter to 0.22.6 in {treesitter} due to tree-sitter/tree-sitter#3330. ERROR nodes are treated as extras when they are generated during error recovery:

https://github.com/tree-sitter/tree-sitter/blob/3da7deedd8e0a3decd2db32b76ea51513876914e/lib/src/subtree.c#L547-L559

https://github.com/tree-sitter/tree-sitter/blob/3da7deedd8e0a3decd2db32b76ea51513876914e/lib/src/parser.c#L1220

@DavisVaughan DavisVaughan merged commit 88e6c42 into r-lib:next Jun 11, 2024
10 checks passed
@DavisVaughan DavisVaughan deleted the feature/open-close-everywhere branch June 11, 2024 20:05
DavisVaughan added a commit that referenced this pull request Jun 12, 2024
To make it easier to grab these nodes by name, rather than by index
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