-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Using statement with a function call with parameters is not parsed as invocation, instead a variable declaration #326
Comments
I've grown more confident this is indeed a bug. My research leads me to believe that My best idea is currently to have a specific |
So is this project unmaintained? |
There are maintainers around but like a lot of projects we're fixing the issues we individually need/want fixing and shepherding external pull requests given we're all volunteers and not financially backed. Not sure why your PR didn't show up on my notifications - I'll take a look. |
Thinking out loud, I think there are multiple ways to fix this:
|
I'm testing some parsing with big projects and in two instances I think I found the same parsing error. It also reproduces in the TreeSitter playground for csharp.
Simplified issue:
parses into a using_statement->variable_declaration
removing the parameters to the function results in the correct using_statement -> invocation_expression.
Example code:
parses into:
Actual file to parse/copy paste into playground:
https://github.com/NancyFx/Nancy/blob/master/test/Nancy.Hosting.Self.Tests/NancySelfHostFixture.cs#L80
This file has a few using statements - some without arguments that parse to an invocation (as they should) and some, like I linked, with arguments that is parsed to a variable_declarator.
I've started looking at the grammar.js and C# spec to find the issue, it might just be a precedence issues, but wanted to open this issue to ask:
Thanks :)
The text was updated successfully, but these errors were encountered: