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

#410 in Text editors

Download history 14421/week @ 2025-10-09 18528/week @ 2025-10-16 36274/week @ 2025-10-23 31812/week @ 2025-10-30 48422/week @ 2025-11-06 43754/week @ 2025-11-13 51087/week @ 2025-11-20 41636/week @ 2025-11-27 52499/week @ 2025-12-04 35852/week @ 2025-12-11 36916/week @ 2025-12-18 47744/week @ 2025-12-25 44099/week @ 2026-01-01 54735/week @ 2026-01-08 55294/week @ 2026-01-15 73369/week @ 2026-01-22

235,666 downloads per month
Used in 116 crates (64 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