difftastic/vendor/tree-sitter-c-sharp
Wilfred Hughes 4f64c10859 Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982' 2021-12-31 19:25:00 +07:00
..
.github/workflows Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
bindings Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
corpus Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982' 2021-12-31 19:25:00 +07:00
queries Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
script Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
src Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982' 2021-12-31 19:25:00 +07:00
test/queries Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
.gitattributes Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
.gitignore Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
.npmignore Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
Cargo.toml Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982' 2021-12-31 19:25:00 +07:00
LICENSE Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
README.md Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982' 2021-12-31 19:25:00 +07:00
binding.gyp Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
grammar.js Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982' 2021-12-31 19:25:00 +07:00
index.js Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00
package.json Merge commit '3104df21065af0f3d51e05a96cd0e2ff16a6f982' 2021-12-31 19:25:00 +07:00
test.js Add 'vendor/tree-sitter-c-sharp/' from commit '4a3d9677f86aab13b7e721df22e12004416e2539' 2021-09-22 22:12:22 +07:00

README.md

tree-sitter-c-sharp

Build Status

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 10.0 with the following exceptions:

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

C# 9.0 (complete)

  • Covariant returns
  • Extending partial methods
  • Extension GetEnumerator
  • Function pointers
  • Init properties
  • Lambda discard parameters
  • Local function attributes
  • Module initializers
  • Native integers
  • Patterns
    • Simple type patterns
    • Relational patterns
    • Logical patterns
  • Records
  • Skip Locals Init
  • Static anonymous functions
  • Target-typed conditional expression
  • Target-typed new
  • Top-level statements

C# 10.0 (complete?)

  • global using directives
  • File-scoped namespace declaration
  • Extended property patterns
  • Allow const interpolated strings
  • Record types can seal ToString()
  • Allow both assignment and declaration in the same deconstruction
  • Allow AsyncMethodBuilder attribute on methods
  • Record structs

References