9 unstable releases (4 breaking)

0.23.1 Nov 11, 2024
0.23.0 Sep 1, 2024
0.21.3 Jul 8, 2024
0.21.2 May 7, 2024
0.16.1 Oct 28, 2020

#1545 in Parser implementations

Download history 3658/week @ 2025-01-05 4792/week @ 2025-01-12 7020/week @ 2025-01-19 10876/week @ 2025-01-26 11568/week @ 2025-02-02 13464/week @ 2025-02-09 11681/week @ 2025-02-16 11428/week @ 2025-02-23 14038/week @ 2025-03-02 12996/week @ 2025-03-09 10439/week @ 2025-03-16 7557/week @ 2025-03-23 6122/week @ 2025-03-30 5880/week @ 2025-04-06 6681/week @ 2025-04-13 8540/week @ 2025-04-20

27,675 downloads per month
Used in 25 crates (21 directly)

MIT license

35MB
1M SLoC

C 1M SLoC // 0.0% comments JavaScript 2K SLoC // 0.0% comments Scheme 181 SLoC // 0.1% comments Rust 33 SLoC // 0.1% comments

tree-sitter-c-sharp

CI discord matrix crates npm pypi

C# grammar for tree-sitter based upon the Roslyn grammar with changes in order to:

  • Deal with differences between the parsing technologies
  • Work around some bugs in that grammar
  • Handle #if, #else, #elif, #endif blocks
  • Support syntax highlighting/parsing of fragments
  • Simplify the output tree
  • Reduce parser state count and complexity
  • Be in-line with tree-sitter's convention where applicable

Status

Comprehensive supports C# 1 through 13.0 with the following exception:

  • async, var and await cannot be used as identifiers everywhere they are valid

References

Dependencies