tree-sitter-c-sharp icon indicating copy to clipboard operation
tree-sitter-c-sharp copied to clipboard

C# Grammar for tree-sitter

Results 37 tree-sitter-c-sharp issues
Sort by recently updated
recently updated
newest added

per [docs](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated), these are valid and invalid cases starting with c# 11 ```c# // valid x = $"""The point "{X}, {Y}" is {Math.Sqrt(X * X + Y * Y)} from...

Valid C# code: ```C# var hi = [Foo] () => Console.WriteLine("hi"); public class FooAttribute : System.Attribute {} ``` Executing command below results in error ```Console $ tree-sitter parse Program.cs ```...

bug

Issue to track the various parts of C# 11 support - currently in preview so subject to change before then. Some C# 11 syntax works already as we are not...

First attempt at XML doc comment parsing referenced in #18 I'm pretty happy with how this has turned out so far and it's quite in-line with the Roslyn way of...

This PR allows to publish automatically `tree-sitter-c-sharp` on crates.io when a new tag is set. To make it work, it is just necessary to define the `CARGO_REGISTRY_TOKEN` as secret. It...

``` var a = b?.Something?.Something; ``` Actual: ``` (equals_value_clause [6, 14] - [6, 39] (conditional_access_expression [6, 16] - [6, 39] (conditional_access_expression [6, 16] - [6, 28] (identifier [6, 16] -...

help wanted
precedence-bug

E.g. ``` #if false this is a fairly common pattern in C# to disable code, but can also be used for comments or anything else. #endif ``` Currently, this grammar...

There is a lot of XML specified in the grammar.txt but it is not clear if/how it ties in with the `///` commenting (there is no pattern for `///` listed)

enhancement
nice to have

According to compiler error [CS0439](https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0439), `extern_alias_directive` must precede all other elements defined in the namespace. Meaning, only comments, preprocessor directives and `extern alias` can precede another `extern alias` . e.g....