• Stars
    star
    190
  • Rank 203,739 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

C# Grammar for tree-sitter

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# 10.0

  • 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
  • Lambda improvements

C# 11.0 (under development)

  • Generic attributes
  • Static abstract members in interfaces
  • Newlines in string interpolations
  • List patterns
  • Slice pattern
  • Required members
  • File scoped classes
  • Raw string literals
  • File scoped types
  • Scoped ref

References

More Repositories

1

tree-sitter

An incremental parsing system for programming tools
Rust
18,352
star
2

py-tree-sitter

Python bindings to the Tree-sitter parsing library
C
825
star
3

node-tree-sitter

Node.js bindings for tree-sitter
C++
464
star
4

tree-sitter-rust

Rust grammar for tree-sitter
JavaScript
335
star
5

tree-sitter-javascript

Javascript grammar for tree-sitter
JavaScript
272
star
6

tree-sitter-typescript

TypeScript grammar for tree-sitter
JavaScript
272
star
7

tree-sitter-python

Python grammar for tree-sitter
JavaScript
261
star
8

tree-sitter-go

Go grammar for tree-sitter
JavaScript
224
star
9

tree-sitter-cpp

C++ grammar for tree-sitter
JavaScript
198
star
10

tree-sitter-graph

Construct graphs from parsed source code
Rust
196
star
11

tree-sitter-c

C grammar for tree-sitter
JavaScript
175
star
12

tree-sitter-haskell

Haskell grammar for tree-sitter.
C
155
star
13

tree-sitter-scala

Scala grammar for tree-sitter
JavaScript
153
star
14

haskell-tree-sitter

Haskell bindings for tree-sitter
Haskell
152
star
15

tree-sitter-bash

Bash grammar for tree-sitter
JavaScript
152
star
16

tree-sitter-ruby

Ruby grammar for tree-sitter
JavaScript
137
star
17

tree-sitter-verilog

SystemVerilog grammar for tree-sitter
JavaScript
91
star
18

tree-sitter-java

Java grammar for tree-sitter
JavaScript
86
star
19

tree-sitter-json

JSON grammar for tree-sitter
Makefile
86
star
20

tree-sitter-php

PHP grammar for tree-sitter
JavaScript
86
star
21

tree-sitter-html

HTML grammar for Tree-sitter
C++
82
star
22

tree-sitter-julia

Julia grammar for Tree-sitter
JavaScript
78
star
23

tree-sitter-ocaml

OCaml grammar for tree-sitter
JavaScript
74
star
24

tree-sitter-css

CSS grammar for Tree-sitter
JavaScript
66
star
25

ruby-tree-sitter.old

Ruby bindings to tree-sitter
C
60
star
26

tree-sitter-swift

Swift grammar for tree-sitter
JavaScript
56
star
27

tree-sitter-regex

Tree-sitter parser for regular expressions
JavaScript
47
star
28

tree-sitter-cli

CLI tool for creating and testing tree-sitter parsers
JavaScript
43
star
29

tree-sitter-embedded-template

Tree-sitter grammar for embedded template languages like ERB, EJS
C
34
star
30

rust-tree-sitter

Rust bindings to Tree-sitter
Rust
30
star
31

tree-sitter-agda

Agda grammar for tree-sitter
Yacc
29
star
32

tree-sitter-jsdoc

JSDoc grammar for Tree-sitter
Rust
20
star
33

tree-sitter-ql

tree-sitter grammar for the CodeQL language
JavaScript
17
star
34

tree-sitter.github.io

Source HTML for the Tree-sitter organization site
JavaScript
10
star
35

highlight-schema

Schema for syntax highlighting property sheets
JavaScript
7
star
36

csharp-tree-sitter

C# bindings to the Tree-sitter parsing library
C#
6
star
37

tree-sitter-tsq

tree-sitter grammar for the tree-sitter query language
JavaScript
6
star
38

afl-tree-sitter

AFL test harness for tree-sitter runtime and parsers
C
5
star
39

tree-sitter-fluent

JavaScript
4
star
40

tree-sitter-razor

(WIP) C# Razor grammar for tree-sitter
C
4
star
41

tree-sitter-ql-dbscheme

tree-sitter support for `.dbscheme` files (as used in CodeQL).
JavaScript
2
star
42

.github

Tree-sitter organization info
2
star