# tree-sitter-c-sharp
[![CI][ci]](https://github.com/tree-sitter/tree-sitter-c-sharp/actions/workflows/ci.yml)
[![discord][discord]](https://discord.gg/w7nTvsVJhm)
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![crates][crates]](https://crates.io/crates/tree-sitter-c-sharp)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-c-sharp)
[![pypi][pypi]](https://pypi.org/project/tree-sitter-c-sharp)
C# grammar for [tree-sitter](https://github.com/tree-sitter/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
- [Official C# 6 Language Spec](https://github.com/dotnet/csharplang/blob/master/spec/) provides chapters that formally define the language grammar.
- [Roslyn C# language grammar export](https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Generated/CSharp.Generated.g4)
- [SharpLab](https://sharplab.io) (web-based syntax tree playground based on Roslyn)
[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-c-sharp/ci.yml?logo=github&label=CI
[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-c-sharp?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-c-sharp?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-c-sharp?logo=pypi&logoColor=ffd242
Raw data
{
"_id": null,
"home_page": null,
"name": "tree-sitter-c-sharp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "incremental, parsing, tree-sitter, c-sharp",
"author": null,
"author_email": "Max Brunsfeld <maxbrunsfeld@gmail.com>, Amaan Qureshi <amaanq12@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/22/85/a61c782afbb706a47d990eaee6977e7c2bd013771c5bf5c81c617684f286/tree_sitter_c_sharp-0.23.1.tar.gz",
"platform": null,
"description": "# tree-sitter-c-sharp\n\n[![CI][ci]](https://github.com/tree-sitter/tree-sitter-c-sharp/actions/workflows/ci.yml)\n[![discord][discord]](https://discord.gg/w7nTvsVJhm)\n[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)\n[![crates][crates]](https://crates.io/crates/tree-sitter-c-sharp)\n[![npm][npm]](https://www.npmjs.com/package/tree-sitter-c-sharp)\n[![pypi][pypi]](https://pypi.org/project/tree-sitter-c-sharp)\n\nC# grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter) based upon the Roslyn grammar with changes in order to:\n\n- Deal with differences between the parsing technologies\n- Work around some bugs in that grammar\n- Handle `#if`, `#else`, `#elif`, `#endif` blocks\n- Support syntax highlighting/parsing of fragments\n- Simplify the output tree\n- Reduce parser state count and complexity\n- Be in-line with tree-sitter's convention where applicable\n\n### Status\n\nComprehensive supports C# 1 through 13.0 with the following exception:\n\n- [ ] `async`, `var` and `await` cannot be used as identifiers everywhere they are valid\n\n### References\n\n- [Official C# 6 Language Spec](https://github.com/dotnet/csharplang/blob/master/spec/) provides chapters that formally define the language grammar.\n- [Roslyn C# language grammar export](https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Generated/CSharp.Generated.g4)\n- [SharpLab](https://sharplab.io) (web-based syntax tree playground based on Roslyn)\n\n[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-c-sharp/ci.yml?logo=github&label=CI\n[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord\n[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix\n[npm]: https://img.shields.io/npm/v/tree-sitter-c-sharp?logo=npm\n[crates]: https://img.shields.io/crates/v/tree-sitter-c-sharp?logo=rust\n[pypi]: https://img.shields.io/pypi/v/tree-sitter-c-sharp?logo=pypi&logoColor=ffd242\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "C# grammar for tree-sitter",
"version": "0.23.1",
"project_urls": {
"Homepage": "https://github.com/tree-sitter/tree-sitter-c-sharp"
},
"split_keywords": [
"incremental",
" parsing",
" tree-sitter",
" c-sharp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5804f6c2df4c53a588ccd88d50851155945cff8cd887bd70c175e00aaade7edf",
"md5": "ce12c51122bbf4529aa75c1a3b5fbc34",
"sha256": "2b612a6e5bd17bb7fa2aab4bb6fc1fba45c94f09cb034ab332e45603b86e32fd"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1-cp39-abi3-macosx_10_9_x86_64.whl",
"has_sig": false,
"md5_digest": "ce12c51122bbf4529aa75c1a3b5fbc34",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 372235,
"upload_time": "2024-11-11T05:25:19",
"upload_time_iso_8601": "2024-11-11T05:25:19.424235Z",
"url": "https://files.pythonhosted.org/packages/58/04/f6c2df4c53a588ccd88d50851155945cff8cd887bd70c175e00aaade7edf/tree_sitter_c_sharp-0.23.1-cp39-abi3-macosx_10_9_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "99101aa9486f1e28fc22810fa92cbdc54e1051e7f5536a5e5b5e9695f609b31e",
"md5": "2b4e083020e967fccb08d4efc87c9da5",
"sha256": "1a8b98f62bc53efcd4d971151950c9b9cd5cbe3bacdb0cd69fdccac63350d83e"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1-cp39-abi3-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "2b4e083020e967fccb08d4efc87c9da5",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 419046,
"upload_time": "2024-11-11T05:25:20",
"upload_time_iso_8601": "2024-11-11T05:25:20.679053Z",
"url": "https://files.pythonhosted.org/packages/99/10/1aa9486f1e28fc22810fa92cbdc54e1051e7f5536a5e5b5e9695f609b31e/tree_sitter_c_sharp-0.23.1-cp39-abi3-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0f2113df29f8fcb9ba9f209b7b413a4764b673dfd58989a0dd67e9c7e19e9c2e",
"md5": "5b1ab8bbf60076b33dcc08d39d84300b",
"sha256": "986e93d845a438ec3c4416401aa98e6a6f6631d644bbbc2e43fcb915c51d255d"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "5b1ab8bbf60076b33dcc08d39d84300b",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 415999,
"upload_time": "2024-11-11T05:25:22",
"upload_time_iso_8601": "2024-11-11T05:25:22.359940Z",
"url": "https://files.pythonhosted.org/packages/0f/21/13df29f8fcb9ba9f209b7b413a4764b673dfd58989a0dd67e9c7e19e9c2e/tree_sitter_c_sharp-0.23.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ca72fc6846795bcdae2f8aa94cc8b1d1af33d634e08be63e294ff0d6794b1efc",
"md5": "300c8fb33c842c26386ef031a8eb5859",
"sha256": "a8024e466b2f5611c6dc90321f232d8584893c7fb88b75e4a831992f877616d2"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "300c8fb33c842c26386ef031a8eb5859",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 402830,
"upload_time": "2024-11-11T05:25:24",
"upload_time_iso_8601": "2024-11-11T05:25:24.198169Z",
"url": "https://files.pythonhosted.org/packages/ca/72/fc6846795bcdae2f8aa94cc8b1d1af33d634e08be63e294ff0d6794b1efc/tree_sitter_c_sharp-0.23.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fe3ab6028c5890ce6653807d5fa88c72232c027c6ceb480dbeb3b186d60e5971",
"md5": "d46f16e4345851aa734da74336a740c1",
"sha256": "7f9bf876866835492281d336b9e1f9626ab668737f74e914c31d285261507da7"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1-cp39-abi3-musllinux_1_2_x86_64.whl",
"has_sig": false,
"md5_digest": "d46f16e4345851aa734da74336a740c1",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 397880,
"upload_time": "2024-11-11T05:25:25",
"upload_time_iso_8601": "2024-11-11T05:25:25.937268Z",
"url": "https://files.pythonhosted.org/packages/fe/3a/b6028c5890ce6653807d5fa88c72232c027c6ceb480dbeb3b186d60e5971/tree_sitter_c_sharp-0.23.1-cp39-abi3-musllinux_1_2_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "47d24facaa34b40f8104d8751746d0e1cd2ddf0beb9f1404b736b97f372bd1f3",
"md5": "e5f4707789f61cadd29e94b77e705c42",
"sha256": "ae9a9e859e8f44e2b07578d44f9a220d3fa25b688966708af6aa55d42abeebb3"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1-cp39-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "e5f4707789f61cadd29e94b77e705c42",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 377562,
"upload_time": "2024-11-11T05:25:27",
"upload_time_iso_8601": "2024-11-11T05:25:27.539600Z",
"url": "https://files.pythonhosted.org/packages/47/d2/4facaa34b40f8104d8751746d0e1cd2ddf0beb9f1404b736b97f372bd1f3/tree_sitter_c_sharp-0.23.1-cp39-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d8883cf6bd9959d94d1fec1e6a9c530c5f08ff4115a474f62aedb5fedb0f7241",
"md5": "f9a4d80773a8720bf36d5d330392ae93",
"sha256": "c81548347a93347be4f48cb63ec7d60ef4b0efa91313330e69641e49aa5a08c5"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1-cp39-abi3-win_arm64.whl",
"has_sig": false,
"md5_digest": "f9a4d80773a8720bf36d5d330392ae93",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 375157,
"upload_time": "2024-11-11T05:25:30",
"upload_time_iso_8601": "2024-11-11T05:25:30.839784Z",
"url": "https://files.pythonhosted.org/packages/d8/88/3cf6bd9959d94d1fec1e6a9c530c5f08ff4115a474f62aedb5fedb0f7241/tree_sitter_c_sharp-0.23.1-cp39-abi3-win_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2285a61c782afbb706a47d990eaee6977e7c2bd013771c5bf5c81c617684f286",
"md5": "96b8ad9f3927630062232753b8daf1c3",
"sha256": "322e2cfd3a547a840375276b2aea3335fa6458aeac082f6c60fec3f745c967eb"
},
"downloads": -1,
"filename": "tree_sitter_c_sharp-0.23.1.tar.gz",
"has_sig": false,
"md5_digest": "96b8ad9f3927630062232753b8daf1c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1317728,
"upload_time": "2024-11-11T05:25:32",
"upload_time_iso_8601": "2024-11-11T05:25:32.535637Z",
"url": "https://files.pythonhosted.org/packages/22/85/a61c782afbb706a47d990eaee6977e7c2bd013771c5bf5c81c617684f286/tree_sitter_c_sharp-0.23.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 05:25:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tree-sitter",
"github_project": "tree-sitter-c-sharp",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tree-sitter-c-sharp"
}