C# grammar for tree-sitter
Project description
tree-sitter-c-sharp
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
andawait
cannot be used as identifiers everywhere they are valid
References
- Official C# 6 Language Spec provides chapters that formally define the language grammar.
- Roslyn C# language grammar export
- SharpLab (web-based syntax tree playground based on Roslyn)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file tree-sitter-c-sharp-0.21.2.tar.gz
.
File metadata
- Download URL: tree-sitter-c-sharp-0.21.2.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7404ccf96ccf5c02fcf48d78537d4358ba34672cf6fb89481f163fae971e07bc |
|
MD5 | e5f06015d2a9e21a180b6f9e23abf49b |
|
BLAKE2b-256 | f21b88b6d60b68bfda6f004e39197f3454d323b542a56a5cf6432866b2eaf6c8 |
File details
Details for the file tree_sitter_c_sharp-0.21.2-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: tree_sitter_c_sharp-0.21.2-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 367.7 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88cfc8e3980a88fbcf64d86b45286ff19f7bec1cac2a71299b26b9c92bf4b558 |
|
MD5 | 5e2ccdf2c1dc936572ea92162644feae |
|
BLAKE2b-256 | 3538f815b96ac8213856d8e17db400b45f4b4f28dc127665d5379827266b508c |
File details
Details for the file tree_sitter_c_sharp-0.21.2-cp38-abi3-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: tree_sitter_c_sharp-0.21.2-cp38-abi3-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 394.7 kB
- Tags: CPython 3.8+, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12a78b17bfcf343efe01c6df52ebba67fecfbdfd41408ac11b100ed2083ca3cc |
|
MD5 | 12a934e8ee866e200a3a1550d7ab4f73 |
|
BLAKE2b-256 | 5e779c8894a8bf3876c43310ec050f06fc5534d8cfa73645cf750138752eb04f |
File details
Details for the file tree_sitter_c_sharp-0.21.2-cp38-abi3-musllinux_1_1_aarch64.whl
.
File metadata
- Download URL: tree_sitter_c_sharp-0.21.2-cp38-abi3-musllinux_1_1_aarch64.whl
- Upload date:
- Size: 406.4 kB
- Tags: CPython 3.8+, musllinux: musl 1.1+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e5c95644603f3dedbeddc1bca2258e1d2ce2b3995225bca6fa216f08333cae |
|
MD5 | d3cc9b02619200aafe26577a10e09b51 |
|
BLAKE2b-256 | b5ea7ee6b22355650549eb0acc865a7ac6584c5c9f2e31185a930122843410a7 |
File details
Details for the file tree_sitter_c_sharp-0.21.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: tree_sitter_c_sharp-0.21.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 406.8 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3669971d973c1cc58ea5606bf884aa6c504d1121d1433cea9461eed2c44d4604 |
|
MD5 | 7f276b24da5e9337e7929eb8fd05d5de |
|
BLAKE2b-256 | 378289ebc1c7edb102a5c752277e3897532dc53521359cfaa6403a83dc287d34 |
File details
Details for the file tree_sitter_c_sharp-0.21.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tree_sitter_c_sharp-0.21.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 394.4 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82dc46e929dad7fc64f3a22077d8a3e39bc597cf0f4ce9a50b12be62aacf54d1 |
|
MD5 | f8bc36a00f0b0ac16a7e0e79511bdecf |
|
BLAKE2b-256 | 3faae19a130b9812d719a90a4a71b51d39452d6140b5df4267e787c95ad936e9 |
File details
Details for the file tree_sitter_c_sharp-0.21.2-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: tree_sitter_c_sharp-0.21.2-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 408.4 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc9ea671205124a454ce347c90158582b08e7463467cffd60f9a78f4ad1e76d9 |
|
MD5 | ad8fad085632e312dd42068e103bfab8 |
|
BLAKE2b-256 | 674a529948d18ba2f5c80d2a40434720d001725932ec95c2222e12abd1757563 |
File details
Details for the file tree_sitter_c_sharp-0.21.2-cp38-abi3-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: tree_sitter_c_sharp-0.21.2-cp38-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 364.0 kB
- Tags: CPython 3.8+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72f05432910a660976256f661507cbbb9c474430c43e136b540806c734707965 |
|
MD5 | f775d873ce8bace0a63c9aef54e639ea |
|
BLAKE2b-256 | 92445a9ada938519ab5077bf0d8e445f6269677e182bf2a3b4175f07db0a62d6 |