chore: add scanner.c to the bindings

This commit is contained in:
Uy Ha 2024-06-05 08:42:21 +00:00
parent a414a4c83d
commit 135aae6dd4
6 changed files with 10 additions and 16 deletions

View file

@ -9,12 +9,7 @@ edition = "2018"
license = "MIT"
build = "bindings/rust/build.rs"
include = [
"bindings/rust/*",
"grammar.js",
"queries/*",
"src/*",
]
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
[lib]
path = "bindings/rust/lib.rs"

1
Package.swift generated
View file

@ -36,6 +36,7 @@ let package = Package(
],
sources: [
"src/parser.c",
"src/scanner.c",
// NOTE: if your language has an external scanner, add it here.
],
resources: [

1
binding.gyp generated
View file

@ -11,6 +11,7 @@
"sources": [
"bindings/node/binding.cc",
"src/parser.c",
"src/scanner.c",
# NOTE: if your language has an external scanner, add it here.
],
"cflags_c": [

View file

@ -2,6 +2,7 @@ package tree_sitter_cmake
// #cgo CFLAGS: -std=c11 -fPIC
// #include "../../src/parser.c"
// #include "../../src/scanner.c"
// // NOTE: if your language has an external scanner, add it here.
import "C"

View file

@ -12,7 +12,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Compilers",
"Topic :: Text Processing :: Linguistic",
"Typing :: Typed"
"Typing :: Typed",
]
requires-python = ">=3.8"
license.text = "MIT"

14
setup.py generated
View file

@ -36,22 +36,18 @@ setup(
sources=[
"bindings/python/tree_sitter_cmake/binding.c",
"src/parser.c",
"src/scanner.c",
# NOTE: if your language uses an external scanner, add it here.
],
extra_compile_args=(
["-std=c11"] if system() != 'Windows' else []
),
extra_compile_args=(["-std=c11"] if system() != "Windows" else []),
define_macros=[
("Py_LIMITED_API", "0x03080000"),
("PY_SSIZE_T_CLEAN", None)
("PY_SSIZE_T_CLEAN", None),
],
include_dirs=["src"],
py_limited_api=True,
)
],
cmdclass={
"build": Build,
"bdist_wheel": BdistWheel
},
zip_safe=False
cmdclass={"build": Build, "bdist_wheel": BdistWheel},
zip_safe=False,
)