Skip to content

Remove unmatched_delimiter #92

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

Conversation

DavisVaughan
Copy link
Member

Closes #90

Comment on lines 113 to 126
(subset2 [(1, 0), (1, 5)]
function: (identifier [(1, 0), (1, 1)])
arguments: (arguments [(1, 1), (1, 5)]
"[[" [(1, 1), (1, 3)]
argument: (argument [(1, 3), (1, 4)]
value: (float [(1, 3), (1, 4)])
)
argument: (argument [(1, 4), (1, 5)]
value: (unmatched_delimiter [(1, 4), (1, 5)]
"]" [(1, 4), (1, 5)]
)
)
"]]" [(1, 5), (1, 5)]
)
(identifier [(1, 0), (1, 1)])

Text
x

S-Expression
(ERROR [(1, 1), (1, 5)]
"[[" [(1, 1), (1, 3)]
(ERROR [(1, 4), (1, 5)])
)
Copy link
Member Author

Choose a reason for hiding this comment

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

With x[[2], I'm a little surprised that it couldn't detect that we are in a subset2 node, but I guess the ] really throws things off.

Nevertheless the new error still allows us to do

x[[2]
 ~~~~
 ^
 |
 - Syntax error

@DavisVaughan DavisVaughan force-pushed the feature/no-more-unmatched-delimiter branch from 6e39316 to 250055e Compare June 11, 2024 16:45
@DavisVaughan DavisVaughan merged commit beb0295 into r-lib:next Jun 11, 2024
10 checks passed
@DavisVaughan DavisVaughan deleted the feature/no-more-unmatched-delimiter branch June 11, 2024 16:53
DavisVaughan added a commit that referenced this pull request Jun 12, 2024
* Remove `unmatched_delimiter`

* Add more motivating tests for no `unmatched_delimiter`

* Rerun with updated treesitter package and grammar

* Tweak outdated comment
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