tree-sitter-devicetree 0.11.1__cp38-abi3-macosx_10_9_x86_64.whl → 0.12.1__cp38-abi3-macosx_10_9_x86_64.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,42 @@
1
- "Devicetree grammar for tree-sitter"
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
2
4
 
3
5
  from ._binding import language
4
6
 
5
- __all__ = ["language"]
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
+ ])
@@ -1 +1,10 @@
1
- def language() -> int: ...
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
@@ -4,8 +4,8 @@ typedef struct TSLanguage TSLanguage;
4
4
 
5
5
  TSLanguage *tree_sitter_devicetree(void);
6
6
 
7
- static PyObject* _binding_language(PyObject *self, PyObject *args) {
8
- return PyLong_FromVoidPtr(tree_sitter_devicetree());
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
9
  }
10
10
 
11
11
  static PyMethodDef methods[] = {
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tree-sitter-devicetree
3
- Version: 0.11.1
4
- Summary: Devicetree grammar for tree-sitter
3
+ Version: 0.12.1
4
+ Summary: Tree-sitter parser for Devicetree files, with support for Zephyr's superset of Devicetree syntax.
5
+ Author: Joel Spadin
5
6
  License: MIT
6
- Project-URL: Homepage, https://github.com/tree-sitter/tree-sitter-devicetree
7
+ Project-URL: Homepage, https://github.com/joelspadin/tree-sitter-devicetree
7
8
  Keywords: incremental,parsing,tree-sitter,devicetree
8
9
  Classifier: Intended Audience :: Developers
9
10
  Classifier: License :: OSI Approved :: MIT License
@@ -14,7 +15,7 @@ Requires-Python: >=3.9
14
15
  Description-Content-Type: text/markdown
15
16
  License-File: LICENSE
16
17
  Provides-Extra: core
17
- Requires-Dist: tree-sitter~=0.21; extra == "core"
18
+ Requires-Dist: tree-sitter~=0.22; extra == "core"
18
19
 
19
20
  # tree-sitter-devicetree
20
21
 
@@ -0,0 +1,11 @@
1
+ tree_sitter_devicetree/__init__.pyi,sha256=oixFm8lXsZZWYa5cRwj6brbqh37_fzN2rLE-dmX9_rA,247
2
+ tree_sitter_devicetree/binding.c,sha256=XDU0jAYGOVLVUsb2UjJqLJm2pkinNslBvvObbEOi27A,691
3
+ tree_sitter_devicetree/__init__.py,sha256=el2Yq5EXXc1LlZoVKUDGnkXC0w--PCJPbs6mSNBZcbc,1222
4
+ tree_sitter_devicetree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ tree_sitter_devicetree/_binding.abi3.so,sha256=D8HhED0icpykupOV1yR1Z9-yfOLFGd5u_lQSG2yZQuI,158240
6
+ tree_sitter_devicetree/queries/highlights.scm,sha256=kSnylUk7o99qYr3k0aPNJebHN2Bg1aJnJVCbo4J3Ncg,885
7
+ tree_sitter_devicetree-0.12.1.dist-info/RECORD,,
8
+ tree_sitter_devicetree-0.12.1.dist-info/LICENSE,sha256=tTnBtMzYaMjU_IllHIEzoWeII_UFfi4agUVaPfT0wLg,1077
9
+ tree_sitter_devicetree-0.12.1.dist-info/WHEEL,sha256=N3RZ2XnlTS_1KEj1Ig2aE6hf95tup1alXGfeyscmPhw,109
10
+ tree_sitter_devicetree-0.12.1.dist-info/top_level.txt,sha256=jv6jDMuzAt9jDH9LI-C4CSek3wnQmz-agZrtTybV6sY,32
11
+ tree_sitter_devicetree-0.12.1.dist-info/METADATA,sha256=zDwu-F8d_VHm7xdS_iIlTHyQ6hT27RJqIgS-ZtydsqU,1043
@@ -1,11 +0,0 @@
1
- tree_sitter_devicetree-0.11.1.dist-info/RECORD,,
2
- tree_sitter_devicetree-0.11.1.dist-info/LICENSE,sha256=tTnBtMzYaMjU_IllHIEzoWeII_UFfi4agUVaPfT0wLg,1077
3
- tree_sitter_devicetree-0.11.1.dist-info/WHEEL,sha256=N3RZ2XnlTS_1KEj1Ig2aE6hf95tup1alXGfeyscmPhw,109
4
- tree_sitter_devicetree-0.11.1.dist-info/top_level.txt,sha256=jv6jDMuzAt9jDH9LI-C4CSek3wnQmz-agZrtTybV6sY,32
5
- tree_sitter_devicetree-0.11.1.dist-info/METADATA,sha256=TbdA5b63CGJLp00Ygs34TVYM_HeZtpvcVLc1TPNsXpk,961
6
- tree_sitter_devicetree/__init__.pyi,sha256=8xf7bY1szgDY9HRJ7FJ326So4SFgMiSRfCB4LADkTpU,27
7
- tree_sitter_devicetree/binding.c,sha256=ck0dYPjXvby7b_Dfds0cPacqniKIW23GLuDngYJVP0U,644
8
- tree_sitter_devicetree/__init__.py,sha256=kFuSF8GksH8AQiZV4ySpxbvuMs-Sqxa7gSIsXsO8YhA,93
9
- tree_sitter_devicetree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- tree_sitter_devicetree/_binding.abi3.so,sha256=kR_8G_T4haEJxMJuGCPBuaXG5sNLjtlMJKl4expLF5g,158256
11
- tree_sitter_devicetree/queries/highlights.scm,sha256=kSnylUk7o99qYr3k0aPNJebHN2Bg1aJnJVCbo4J3Ncg,885