tree-sitter-devicetree 0.11.1__tar.gz → 0.12.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (20) hide show
  1. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/PKG-INFO +5 -4
  2. tree_sitter_devicetree-0.12.1/bindings/python/tree_sitter_devicetree/__init__.py +42 -0
  3. tree_sitter_devicetree-0.12.1/bindings/python/tree_sitter_devicetree/__init__.pyi +10 -0
  4. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/bindings/python/tree_sitter_devicetree/binding.c +2 -2
  5. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/bindings/python/tree_sitter_devicetree.egg-info/PKG-INFO +5 -4
  6. tree_sitter_devicetree-0.12.1/bindings/python/tree_sitter_devicetree.egg-info/requires.txt +3 -0
  7. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/pyproject.toml +6 -5
  8. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/src/parser.c +10695 -10695
  9. tree_sitter_devicetree-0.11.1/bindings/python/tree_sitter_devicetree/__init__.py +0 -5
  10. tree_sitter_devicetree-0.11.1/bindings/python/tree_sitter_devicetree/__init__.pyi +0 -1
  11. tree_sitter_devicetree-0.11.1/bindings/python/tree_sitter_devicetree.egg-info/requires.txt +0 -3
  12. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/LICENSE +0 -0
  13. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/README.md +0 -0
  14. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/bindings/python/tree_sitter_devicetree/py.typed +0 -0
  15. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/bindings/python/tree_sitter_devicetree.egg-info/SOURCES.txt +0 -0
  16. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/bindings/python/tree_sitter_devicetree.egg-info/dependency_links.txt +0 -0
  17. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/bindings/python/tree_sitter_devicetree.egg-info/not-zip-safe +0 -0
  18. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/bindings/python/tree_sitter_devicetree.egg-info/top_level.txt +0 -0
  19. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/setup.cfg +0 -0
  20. {tree_sitter_devicetree-0.11.1 → tree_sitter_devicetree-0.12.1}/setup.py +0 -0
@@ -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,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: ...
@@ -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
 
@@ -4,25 +4,26 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tree-sitter-devicetree"
7
- description = "Devicetree grammar for tree-sitter"
8
- version = "0.11.1"
7
+ description = "Tree-sitter parser for Devicetree files, with support for Zephyr's superset of Devicetree syntax."
8
+ version = "0.12.1"
9
9
  keywords = ["incremental", "parsing", "tree-sitter", "devicetree"]
10
10
  classifiers = [
11
11
  "Intended Audience :: Developers",
12
12
  "License :: OSI Approved :: MIT License",
13
13
  "Topic :: Software Development :: Compilers",
14
14
  "Topic :: Text Processing :: Linguistic",
15
- "Typing :: Typed"
15
+ "Typing :: Typed",
16
16
  ]
17
+ authors = [{ name = "Joel Spadin" }]
17
18
  requires-python = ">=3.9"
18
19
  license.text = "MIT"
19
20
  readme = "README.md"
20
21
 
21
22
  [project.urls]
22
- Homepage = "https://github.com/tree-sitter/tree-sitter-devicetree"
23
+ Homepage = "https://github.com/joelspadin/tree-sitter-devicetree"
23
24
 
24
25
  [project.optional-dependencies]
25
- core = ["tree-sitter~=0.21"]
26
+ core = ["tree-sitter~=0.22"]
26
27
 
27
28
  [tool.cibuildwheel]
28
29
  build = "cp39-*"