Go to file
2024-03-25 23:21:38 +01:00
.github/workflows initial commit 2024-03-25 23:16:07 +01:00
bindings update tree-sitter 2024-03-25 23:21:02 +01:00
corpus initial commit 2024-03-25 23:16:07 +01:00
queries initial commit 2024-03-25 23:16:07 +01:00
script initial commit 2024-03-25 23:16:07 +01:00
src initial commit 2024-03-25 23:16:07 +01:00
test initial commit 2024-03-25 23:16:07 +01:00
tools/highlight-test-generator initial commit 2024-03-25 23:16:07 +01:00
.gitattributes initial commit 2024-03-25 23:16:07 +01:00
.gitignore initial commit 2024-03-25 23:16:07 +01:00
.npmignore initial commit 2024-03-25 23:16:07 +01:00
binding.gyp initial commit 2024-03-25 23:16:07 +01:00
Cargo.toml bump version 2024-03-25 23:21:38 +01:00
grammar.js initial commit 2024-03-25 23:16:07 +01:00
LICENSE initial commit 2024-03-25 23:16:07 +01:00
package.json initial commit 2024-03-25 23:16:07 +01:00
Package.swift initial commit 2024-03-25 23:16:07 +01:00
README.md initial commit 2024-03-25 23:16:07 +01:00
test.js initial commit 2024-03-25 23:16:07 +01:00

tree-sitter-c-sharp

CI discord matrix crates npm

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

Status

Comprehensive supports C# 1 through 11.0 with the following exceptions:

  • async, var and await cannot be used as identifiers everywhere they are valid
  • Raw string literals (C# 11)

C# 12.0 (under development)

  • Alias any type
  • Collection expressions
  • Default lambda parameters
  • Experimental attribute
  • Inline arrays
  • Interceptors
  • Primary constructors
  • Ref readonly parameters

References