tree-sitter-devicetree 0.14.0__cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

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.
@@ -0,0 +1,42 @@
1
+ """Tree-sitter parser for Devicetree files, with support for Zephyr's superset of Devicetree syntax."""
2
+
3
+ from importlib.resources import files as _files
4
+
5
+ from ._binding import language
6
+
7
+
8
+ def _get_query(name, file):
9
+ query = _files(f"{__package__}.queries") / file
10
+ globals()[name] = query.read_text()
11
+ return globals()[name]
12
+
13
+
14
+ def __getattr__(name):
15
+ # NOTE: uncomment these to include any queries that this grammar contains:
16
+
17
+ # if name == "HIGHLIGHTS_QUERY":
18
+ # return _get_query("HIGHLIGHTS_QUERY", "highlights.scm")
19
+ # if name == "INJECTIONS_QUERY":
20
+ # return _get_query("INJECTIONS_QUERY", "injections.scm")
21
+ # if name == "LOCALS_QUERY":
22
+ # return _get_query("LOCALS_QUERY", "locals.scm")
23
+ # if name == "TAGS_QUERY":
24
+ # return _get_query("TAGS_QUERY", "tags.scm")
25
+
26
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
27
+
28
+
29
+ __all__ = [
30
+ "language",
31
+ # "HIGHLIGHTS_QUERY",
32
+ # "INJECTIONS_QUERY",
33
+ # "LOCALS_QUERY",
34
+ # "TAGS_QUERY",
35
+ ]
36
+
37
+
38
+ def __dir__():
39
+ return sorted(__all__ + [
40
+ "__all__", "__builtins__", "__cached__", "__doc__", "__file__",
41
+ "__loader__", "__name__", "__package__", "__path__", "__spec__",
42
+ ])
@@ -0,0 +1,10 @@
1
+ from typing import Final
2
+
3
+ # NOTE: uncomment these to include any queries that this grammar contains:
4
+
5
+ # HIGHLIGHTS_QUERY: Final[str]
6
+ # INJECTIONS_QUERY: Final[str]
7
+ # LOCALS_QUERY: Final[str]
8
+ # TAGS_QUERY: Final[str]
9
+
10
+ def language() -> object: ...
Binary file
@@ -0,0 +1,27 @@
1
+ #include <Python.h>
2
+
3
+ typedef struct TSLanguage TSLanguage;
4
+
5
+ TSLanguage *tree_sitter_devicetree(void);
6
+
7
+ static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) {
8
+ return PyCapsule_New(tree_sitter_devicetree(), "tree_sitter.Language", NULL);
9
+ }
10
+
11
+ static PyMethodDef methods[] = {
12
+ {"language", _binding_language, METH_NOARGS,
13
+ "Get the tree-sitter language for this grammar."},
14
+ {NULL, NULL, 0, NULL}
15
+ };
16
+
17
+ static struct PyModuleDef module = {
18
+ .m_base = PyModuleDef_HEAD_INIT,
19
+ .m_name = "_binding",
20
+ .m_doc = NULL,
21
+ .m_size = -1,
22
+ .m_methods = methods
23
+ };
24
+
25
+ PyMODINIT_FUNC PyInit__binding(void) {
26
+ return PyModule_Create(&module);
27
+ }
File without changes
@@ -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,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Joel Spadin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.2
2
+ Name: tree-sitter-devicetree
3
+ Version: 0.14.0
4
+ Summary: Tree-sitter parser for Devicetree files, with support for Zephyr's superset of Devicetree syntax.
5
+ Author: Joel Spadin
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/joelspadin/tree-sitter-devicetree
8
+ Keywords: incremental,parsing,tree-sitter,devicetree
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Topic :: Software Development :: Compilers
12
+ Classifier: Topic :: Text Processing :: Linguistic
13
+ Classifier: Typing :: Typed
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Provides-Extra: core
18
+ Requires-Dist: tree-sitter~=0.24; extra == "core"
19
+
20
+ # tree-sitter-devicetree
21
+
22
+ A [tree-sitter](https://github.com/tree-sitter/tree-sitter) grammar for Devicetree
23
+ with support for [Zephyr's](https://github.com/zephyrproject-rtos/zephyr)
24
+ superset of Devicetree syntax.
25
+
26
+ Some parts of the grammar are adapted from [tree-sitter-c](https://github.com/tree-sitter/tree-sitter-c).
@@ -0,0 +1,11 @@
1
+ tree_sitter_devicetree-0.14.0.dist-info/LICENSE,sha256=tTnBtMzYaMjU_IllHIEzoWeII_UFfi4agUVaPfT0wLg,1077
2
+ tree_sitter_devicetree-0.14.0.dist-info/WHEEL,sha256=z-rvPltY6gRlSoO_HkxPRkOQf_gpk5yU-BlB-TPbDz8,151
3
+ tree_sitter_devicetree-0.14.0.dist-info/METADATA,sha256=xtZfnQIUHX4yN30OWmMm2eatyByrOvUiqfYqtUIK4yY,1044
4
+ tree_sitter_devicetree-0.14.0.dist-info/top_level.txt,sha256=jv6jDMuzAt9jDH9LI-C4CSek3wnQmz-agZrtTybV6sY,32
5
+ tree_sitter_devicetree-0.14.0.dist-info/RECORD,,
6
+ tree_sitter_devicetree/__init__.py,sha256=el2Yq5EXXc1LlZoVKUDGnkXC0w--PCJPbs6mSNBZcbc,1222
7
+ tree_sitter_devicetree/binding.c,sha256=XDU0jAYGOVLVUsb2UjJqLJm2pkinNslBvvObbEOi27A,691
8
+ tree_sitter_devicetree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ tree_sitter_devicetree/__init__.pyi,sha256=oixFm8lXsZZWYa5cRwj6brbqh37_fzN2rLE-dmX9_rA,247
10
+ tree_sitter_devicetree/_binding.abi3.so,sha256=gLF2nlBaPjV1XuaCZUPuly47srpEJkB8dVthBtnFXUU,305088
11
+ tree_sitter_devicetree/queries/highlights.scm,sha256=kSnylUk7o99qYr3k0aPNJebHN2Bg1aJnJVCbo4J3Ncg,885
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.8.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-abi3-manylinux_2_17_aarch64
5
+ Tag: cp310-abi3-manylinux2014_aarch64
6
+
@@ -0,0 +1,2 @@
1
+ _binding
2
+ tree_sitter_devicetree