SemanticDiff icon indicating copy to clipboard operation
SemanticDiff copied to clipboard

C# parser cannot handle identifiers named async

Open joefeser opened this issue 1 year ago • 4 comments

Describe the Bug There is a parsing error for a few files that are just function declarations.

To Reproduce Steps to reproduce the behavior:

  1. Select the File

Expected Behavior No Parsing Error

Link https://app.semanticdiff.com/gh/joefeser/opensearch-net/pull/3/changes#src/ApiGenerator/Domain/Code/HighLevel/Methods/FluentSyntaxView.cs?ignore_comments=true

https://app.semanticdiff.com/gh/joefeser/opensearch-net/pull/3/changes#src/ApiGenerator/Domain/Code/HighLevel/Methods/InitializerSyntaxView.cs?ignore_comments=true

image

image

joefeser avatar Aug 10 '24 02:08 joefeser

Thanks for reporting this bug.

The issue is actually unrelated to the arrow style function declaration, but has to do with the async parameter. The async in (syntax, async) is parsed as a keyword instead of an identifier, leading to the parsing error.

We will try to fix this in an upcoming update.

mmueller2012 avatar Aug 12 '24 10:08 mmueller2012

The issue has been fixed for our GitHub App by switching the C# parser as explained in #66.

I will close the issue once the new parser has also been shipped as part of our VS Code extension.

mmueller2012 avatar Sep 03 '24 14:09 mmueller2012

Thank you. I will wait for the new version and give it a try. I perform my PR's in VS Code.

joefeser avatar Sep 03 '24 16:09 joefeser

As mentioned in #66, the SemanticDiff 0.10.0 release which should fix your issue is now out for VS Code. Please give it a try and report back if it works :-).

mmueller2012 avatar Jan 08 '25 12:01 mmueller2012