We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
_parameter_with_default
optional()
"default"
https://github.com/r-lib/tree-sitter-r/blob/a0d3e3307489c3ca54da8c7b5b4e0c5f5fd6953a/grammar.js#L239C5-L243
If we see the = and go down the _parameter_with_default route, then according to the gram.y, a default value is required https://github.com/wch/r-source/blob/988774e05497bcf2cfac47bfbec59d551432e3fb/src/main/gram.y#L559-L564
=
For example, this doesn't parse in R parse(text = "function(x = ) {}")
parse(text = "function(x = ) {}")
This may be a holdover from when we used optional() more aggressively
I have a feeling removing this will improve error recovery in some places
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://github.com/r-lib/tree-sitter-r/blob/a0d3e3307489c3ca54da8c7b5b4e0c5f5fd6953a/grammar.js#L239C5-L243
If we see the
=
and go down the_parameter_with_default
route, then according to the gram.y, a default value is requiredhttps://github.com/wch/r-source/blob/988774e05497bcf2cfac47bfbec59d551432e3fb/src/main/gram.y#L559-L564
For example, this doesn't parse in R
parse(text = "function(x = ) {}")
This may be a holdover from when we used
optional()
more aggressivelyI have a feeling removing this will improve error recovery in some places
The text was updated successfully, but these errors were encountered: