tree-sitter-devicetree 0.12.1__tar.gz → 0.14.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/PKG-INFO +4 -4
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree.egg-info/PKG-INFO +4 -4
- tree_sitter_devicetree-0.14.0/bindings/python/tree_sitter_devicetree.egg-info/requires.txt +3 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/pyproject.toml +4 -4
- tree_sitter_devicetree-0.14.0/queries/highlights.scm +78 -0
- tree_sitter_devicetree-0.14.0/setup.py +77 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/src/parser.c +18137 -18685
- tree_sitter_devicetree-0.14.0/src/tree_sitter/alloc.h +54 -0
- tree_sitter_devicetree-0.14.0/src/tree_sitter/array.h +290 -0
- tree_sitter_devicetree-0.14.0/src/tree_sitter/parser.h +266 -0
- tree_sitter_devicetree-0.12.1/bindings/python/tree_sitter_devicetree.egg-info/requires.txt +0 -3
- tree_sitter_devicetree-0.12.1/setup.py +0 -57
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/LICENSE +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/README.md +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree/__init__.py +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree/__init__.pyi +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree/binding.c +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree/py.typed +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree.egg-info/SOURCES.txt +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree.egg-info/dependency_links.txt +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree.egg-info/not-zip-safe +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/bindings/python/tree_sitter_devicetree.egg-info/top_level.txt +0 -0
- {tree_sitter_devicetree-0.12.1 → tree_sitter_devicetree-0.14.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: tree-sitter-devicetree
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.14.0
|
4
4
|
Summary: Tree-sitter parser for Devicetree files, with support for Zephyr's superset of Devicetree syntax.
|
5
5
|
Author: Joel Spadin
|
6
6
|
License: MIT
|
@@ -11,11 +11,11 @@ Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Topic :: Software Development :: Compilers
|
12
12
|
Classifier: Topic :: Text Processing :: Linguistic
|
13
13
|
Classifier: Typing :: Typed
|
14
|
-
Requires-Python: >=3.
|
14
|
+
Requires-Python: >=3.10
|
15
15
|
Description-Content-Type: text/markdown
|
16
16
|
License-File: LICENSE
|
17
17
|
Provides-Extra: core
|
18
|
-
Requires-Dist: tree-sitter~=0.
|
18
|
+
Requires-Dist: tree-sitter~=0.24; extra == "core"
|
19
19
|
|
20
20
|
# tree-sitter-devicetree
|
21
21
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: tree-sitter-devicetree
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.14.0
|
4
4
|
Summary: Tree-sitter parser for Devicetree files, with support for Zephyr's superset of Devicetree syntax.
|
5
5
|
Author: Joel Spadin
|
6
6
|
License: MIT
|
@@ -11,11 +11,11 @@ Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Topic :: Software Development :: Compilers
|
12
12
|
Classifier: Topic :: Text Processing :: Linguistic
|
13
13
|
Classifier: Typing :: Typed
|
14
|
-
Requires-Python: >=3.
|
14
|
+
Requires-Python: >=3.10
|
15
15
|
Description-Content-Type: text/markdown
|
16
16
|
License-File: LICENSE
|
17
17
|
Provides-Extra: core
|
18
|
-
Requires-Dist: tree-sitter~=0.
|
18
|
+
Requires-Dist: tree-sitter~=0.24; extra == "core"
|
19
19
|
|
20
20
|
# tree-sitter-devicetree
|
21
21
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
[project]
|
6
6
|
name = "tree-sitter-devicetree"
|
7
7
|
description = "Tree-sitter parser for Devicetree files, with support for Zephyr's superset of Devicetree syntax."
|
8
|
-
version = "0.
|
8
|
+
version = "0.14.0"
|
9
9
|
keywords = ["incremental", "parsing", "tree-sitter", "devicetree"]
|
10
10
|
classifiers = [
|
11
11
|
"Intended Audience :: Developers",
|
@@ -15,7 +15,7 @@ classifiers = [
|
|
15
15
|
"Typing :: Typed",
|
16
16
|
]
|
17
17
|
authors = [{ name = "Joel Spadin" }]
|
18
|
-
requires-python = ">=3.
|
18
|
+
requires-python = ">=3.10"
|
19
19
|
license.text = "MIT"
|
20
20
|
readme = "README.md"
|
21
21
|
|
@@ -23,8 +23,8 @@ readme = "README.md"
|
|
23
23
|
Homepage = "https://github.com/joelspadin/tree-sitter-devicetree"
|
24
24
|
|
25
25
|
[project.optional-dependencies]
|
26
|
-
core = ["tree-sitter~=0.
|
26
|
+
core = ["tree-sitter~=0.24"]
|
27
27
|
|
28
28
|
[tool.cibuildwheel]
|
29
|
-
build = "
|
29
|
+
build = "cp310-*"
|
30
30
|
build-frontend = "build"
|
@@ -0,0 +1,78 @@
|
|
1
|
+
[
|
2
|
+
"/delete-node/"
|
3
|
+
"/delete-property/"
|
4
|
+
"/dts-v1/"
|
5
|
+
"/incbin/"
|
6
|
+
"/include/"
|
7
|
+
"/memreserve/"
|
8
|
+
"/omit-if-no-ref/"
|
9
|
+
"#define"
|
10
|
+
"#undef"
|
11
|
+
"#include"
|
12
|
+
"#if"
|
13
|
+
"#elif"
|
14
|
+
"#else"
|
15
|
+
"#endif"
|
16
|
+
"#ifdef"
|
17
|
+
"#ifndef"
|
18
|
+
] @keyword
|
19
|
+
|
20
|
+
[
|
21
|
+
"!"
|
22
|
+
"~"
|
23
|
+
"-"
|
24
|
+
"+"
|
25
|
+
"*"
|
26
|
+
"/"
|
27
|
+
"%"
|
28
|
+
"||"
|
29
|
+
"&&"
|
30
|
+
"|"
|
31
|
+
"^"
|
32
|
+
"&"
|
33
|
+
"=="
|
34
|
+
"!="
|
35
|
+
">"
|
36
|
+
">="
|
37
|
+
"<="
|
38
|
+
">"
|
39
|
+
"<<"
|
40
|
+
">>"
|
41
|
+
] @operator
|
42
|
+
|
43
|
+
[
|
44
|
+
","
|
45
|
+
";"
|
46
|
+
] @punctuation.delimiter
|
47
|
+
|
48
|
+
[
|
49
|
+
"("
|
50
|
+
")"
|
51
|
+
"{"
|
52
|
+
"}"
|
53
|
+
"<"
|
54
|
+
">"
|
55
|
+
] @punctuation.bracket
|
56
|
+
|
57
|
+
(call_expression
|
58
|
+
function: (identifier) @function)
|
59
|
+
|
60
|
+
(node
|
61
|
+
label: (identifier) @label)
|
62
|
+
|
63
|
+
(property
|
64
|
+
label: (identifier) @label)
|
65
|
+
|
66
|
+
(memory_reservation
|
67
|
+
label: (identifier) @label)
|
68
|
+
|
69
|
+
(property
|
70
|
+
name: (identifier) @property)
|
71
|
+
|
72
|
+
(identifier) @variable
|
73
|
+
|
74
|
+
(unit_address) @tag
|
75
|
+
|
76
|
+
(reference) @constant
|
77
|
+
|
78
|
+
(comment) @comment
|
@@ -0,0 +1,77 @@
|
|
1
|
+
from os import path
|
2
|
+
from platform import system
|
3
|
+
from sysconfig import get_config_var
|
4
|
+
|
5
|
+
from setuptools import Extension, find_packages, setup
|
6
|
+
from setuptools.command.build import build
|
7
|
+
from setuptools.command.egg_info import egg_info
|
8
|
+
from wheel.bdist_wheel import bdist_wheel
|
9
|
+
|
10
|
+
sources = [
|
11
|
+
"bindings/python/tree_sitter_devicetree/binding.c",
|
12
|
+
"src/parser.c",
|
13
|
+
]
|
14
|
+
if path.exists("src/scanner.c"):
|
15
|
+
sources.append("src/scanner.c")
|
16
|
+
|
17
|
+
macros: list[tuple[str, str | None]] = [
|
18
|
+
("PY_SSIZE_T_CLEAN", None),
|
19
|
+
("TREE_SITTER_HIDE_SYMBOLS", None),
|
20
|
+
]
|
21
|
+
if limited_api := not get_config_var("Py_GIL_DISABLED"):
|
22
|
+
macros.append(("Py_LIMITED_API", "0x030A0000"))
|
23
|
+
|
24
|
+
if system() != "Windows":
|
25
|
+
cflags = ["-std=c11", "-fvisibility=hidden"]
|
26
|
+
else:
|
27
|
+
cflags = ["/std:c11", "/utf-8"]
|
28
|
+
|
29
|
+
|
30
|
+
class Build(build):
|
31
|
+
def run(self):
|
32
|
+
if path.isdir("queries"):
|
33
|
+
dest = path.join(self.build_lib, "tree_sitter_devicetree", "queries")
|
34
|
+
self.copy_tree("queries", dest)
|
35
|
+
super().run()
|
36
|
+
|
37
|
+
|
38
|
+
class BdistWheel(bdist_wheel):
|
39
|
+
def get_tag(self):
|
40
|
+
python, abi, platform = super().get_tag()
|
41
|
+
if python.startswith("cp"):
|
42
|
+
python, abi = "cp310", "abi3"
|
43
|
+
return python, abi, platform
|
44
|
+
|
45
|
+
|
46
|
+
class EggInfo(egg_info):
|
47
|
+
def find_sources(self):
|
48
|
+
super().find_sources()
|
49
|
+
self.filelist.recursive_include("queries", "*.scm")
|
50
|
+
self.filelist.include("src/tree_sitter/*.h")
|
51
|
+
|
52
|
+
|
53
|
+
setup(
|
54
|
+
packages=find_packages("bindings/python"),
|
55
|
+
package_dir={"": "bindings/python"},
|
56
|
+
package_data={
|
57
|
+
"tree_sitter_devicetree": ["*.pyi", "py.typed"],
|
58
|
+
"tree_sitter_devicetree.queries": ["*.scm"],
|
59
|
+
},
|
60
|
+
ext_package="tree_sitter_devicetree",
|
61
|
+
ext_modules=[
|
62
|
+
Extension(
|
63
|
+
name="_binding",
|
64
|
+
sources=sources,
|
65
|
+
extra_compile_args=cflags,
|
66
|
+
define_macros=macros,
|
67
|
+
include_dirs=["src"],
|
68
|
+
py_limited_api=limited_api,
|
69
|
+
)
|
70
|
+
],
|
71
|
+
cmdclass={
|
72
|
+
"build": Build,
|
73
|
+
"bdist_wheel": BdistWheel,
|
74
|
+
"egg_info": EggInfo,
|
75
|
+
},
|
76
|
+
zip_safe=False
|
77
|
+
)
|