Skip to content

Commit bf99ce8

Browse files
committed
build: update bindings and manifests
1 parent bbfb435 commit bf99ce8

11 files changed

+1641
-146
lines changed

.gitattributes

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
/src/** linguist-vendored
2-
/script/** text eol=lf
3-
/src/parser.c -diff
4-
/src/grammar.json -diff
1+
* text eol=lf
2+
3+
src/*.json linguist-generated
4+
src/parser.c linguist-generated
5+
src/tree_sitter/* linguist-generated
6+
7+
bindings/** linguist-generated
8+
binding.gyp linguist-generated
9+
setup.py linguist-generated
10+
Makefile linguist-generated
11+
Package.swift linguist-generated

.gitignore

+37-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
1+
# Rust artifacts
12
Cargo.lock
2-
node_modules
3-
build
4-
npm-debug.log
5-
package-lock.json
6-
parser.exp
7-
parser.lib
8-
parser.obj
9-
examples
10-
!examples/.gitkeep
11-
scanner.obj
12-
/target/
13-
.build/
3+
target/
4+
5+
# Node artifacts
6+
build/
7+
prebuilds/
8+
node_modules/
9+
*.tgz
10+
11+
# Swift artifacts
12+
.build/
13+
14+
# Go artifacts
15+
go.sum
16+
_obj/
17+
18+
# Python artifacts
19+
.venv/
20+
dist/
21+
*.egg-info
22+
*.whl
23+
24+
# C artifacts
25+
*.a
26+
*.so
27+
*.so.*
28+
*.dylib
29+
*.dll
30+
*.pc
31+
32+
# Example dirs
33+
/examples/*/
34+
35+
# Grammar volatiles
36+
*.wasm
37+
*.obj
38+
*.o

.npmignore

-6
This file was deleted.

Cargo.toml

+9-19
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
11
[package]
22
name = "tree-sitter-c-sharp"
3-
description = "C# grammar for the tree-sitter parsing library"
3+
description = "C# grammar for tree-sitter"
44
version = "0.20.0"
55
authors = [
6-
"Damien Guard <[email protected]>",
7-
"Max Brunsfeld <[email protected]>",
8-
"Martin Midtgaard <[email protected]>",
9-
"Sjoerd Langkemper <[email protected]>",
10-
"Patrick Thomson <[email protected]>",
11-
"Noelle Caldwell <[email protected]>",
12-
"Douglas Creager <[email protected]>",
6+
"Max Brunsfeld <[email protected]>",
7+
"Amaan Qureshi <[email protected]>",
138
]
149
license = "MIT"
15-
readme = "bindings/rust/README.md"
16-
keywords = ["incremental", "parsing", "c-sharp"]
10+
keywords = ["incremental", "parsing", "tree-sitter", "c-sharp"]
1711
categories = ["parsing", "text-editors"]
1812
repository = "https://github.com/tree-sitter/tree-sitter-c-sharp"
19-
edition = "2018"
13+
edition = "2021"
14+
autoexamples = false
2015

2116
build = "bindings/rust/build.rs"
22-
include = [
23-
"bindings/rust/*",
24-
"grammar.js",
25-
"queries/*",
26-
"src/*",
27-
]
17+
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
2818

2919
[lib]
3020
path = "bindings/rust/lib.rs"
3121

3222
[dependencies]
33-
tree-sitter = ">= 0.19, < 0.21"
23+
tree-sitter = ">=0.21.0"
3424

3525
[build-dependencies]
36-
cc = "1.0"
26+
cc = "1.0.96"

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2023 Max Brunsfeld, Damien Guard, and contributors.
3+
Copyright (c) 2014-2023 Max Brunsfeld, Damien Guard, Amaan Qureshi, and contributors.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+5-13
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
66
[![crates][crates]](https://crates.io/crates/tree-sitter-c-sharp)
77
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-c-sharp)
8+
[![pypi][pypi]](https://pypi.org/project/tree-sitter-c-sharp)
89

910
C# grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter) based upon the Roslyn grammar with changes in order to:
1011

@@ -13,24 +14,14 @@ C# grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter) based u
1314
- Handle `#if`, `#else`, `#elif`, `#endif` blocks
1415
- Support syntax highlighting/parsing of fragments
1516
- Simplify the output tree
17+
- Reduce parser state count and complexity
18+
- Be in-line with tree-sitter's convention where applicable
1619

1720
### Status
1821

19-
Comprehensive supports C# 1 through 11.0 with the following exceptions:
22+
Comprehensive supports C# 1 through 13.0 with the following exception:
2023

2124
- [ ] `async`, `var` and `await` cannot be used as identifiers everywhere they are valid
22-
- [ ] Raw string literals (C# 11)
23-
24-
#### C# 12.0 (under development)
25-
26-
- [ ] Alias any type
27-
- [ ] Collection expressions
28-
- [ ] Default lambda parameters
29-
- [x] Experimental attribute
30-
- [ ] Inline arrays
31-
- [x] Interceptors
32-
- [ ] Primary constructors
33-
- [ ] Ref readonly parameters
3425

3526
### References
3627

@@ -43,3 +34,4 @@ Comprehensive supports C# 1 through 11.0 with the following exceptions:
4334
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
4435
[npm]: https://img.shields.io/npm/v/tree-sitter-c-sharp?logo=npm
4536
[crates]: https://img.shields.io/crates/v/tree-sitter-c-sharp?logo=rust
37+
[pypi]: https://img.shields.io/pypi/v/tree-sitter-c-sharp?logo=pypi&logoColor=ffd242

bindings/rust/README.md

-37
This file was deleted.

bindings/rust/build.rs

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/rust/lib.rs

+18-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)