konomanoasa-tree-sitter-javascript 0.1.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.
Files changed (22) hide show
  1. konomanoasa_tree_sitter_javascript-0.1.0/LICENSE +21 -0
  2. konomanoasa_tree_sitter_javascript-0.1.0/LICENSE-UNICODE +42 -0
  3. konomanoasa_tree_sitter_javascript-0.1.0/PKG-INFO +46 -0
  4. konomanoasa_tree_sitter_javascript-0.1.0/README.md +34 -0
  5. konomanoasa_tree_sitter_javascript-0.1.0/bindings/python/__init__.py +9 -0
  6. konomanoasa_tree_sitter_javascript-0.1.0/bindings/python/binding.c +34 -0
  7. konomanoasa_tree_sitter_javascript-0.1.0/bindings/python/binding.pyi +3 -0
  8. konomanoasa_tree_sitter_javascript-0.1.0/bindings/python/py.typed +0 -0
  9. konomanoasa_tree_sitter_javascript-0.1.0/dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/PKG-INFO +46 -0
  10. konomanoasa_tree_sitter_javascript-0.1.0/dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/SOURCES.txt +20 -0
  11. konomanoasa_tree_sitter_javascript-0.1.0/dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/dependency_links.txt +1 -0
  12. konomanoasa_tree_sitter_javascript-0.1.0/dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/top_level.txt +1 -0
  13. konomanoasa_tree_sitter_javascript-0.1.0/pyproject.toml +75 -0
  14. konomanoasa_tree_sitter_javascript-0.1.0/queries/highlights.scm +482 -0
  15. konomanoasa_tree_sitter_javascript-0.1.0/setup.cfg +4 -0
  16. konomanoasa_tree_sitter_javascript-0.1.0/setup.py +30 -0
  17. konomanoasa_tree_sitter_javascript-0.1.0/src/parser.c +910099 -0
  18. konomanoasa_tree_sitter_javascript-0.1.0/src/scanner.c +901 -0
  19. konomanoasa_tree_sitter_javascript-0.1.0/src/tokens.h +1266 -0
  20. konomanoasa_tree_sitter_javascript-0.1.0/src/tree_sitter/alloc.h +54 -0
  21. konomanoasa_tree_sitter_javascript-0.1.0/src/tree_sitter/array.h +336 -0
  22. konomanoasa_tree_sitter_javascript-0.1.0/src/tree_sitter/parser.h +286 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 konomanoasa
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,42 @@
1
+ The generated Unicode character ranges are obtained through
2
+ @unicode/unicode-17.0.0. The following notice applies to these data.
3
+
4
+ UNICODE LICENSE V3
5
+
6
+ COPYRIGHT AND PERMISSION NOTICE
7
+
8
+ Copyright © 1991-2026 Unicode, Inc.
9
+
10
+ NOTICE TO USER: Carefully read the following legal agreement. BY
11
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
12
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
13
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
14
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a
17
+ copy of data files and any associated documentation (the "Data Files") or
18
+ software and any associated documentation (the "Software") to deal in the
19
+ Data Files or Software without restriction, including without limitation
20
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
21
+ copies of the Data Files or Software, and to permit persons to whom the
22
+ Data Files or Software are furnished to do so, provided that either (a)
23
+ this copyright and permission notice appear with all copies of the Data
24
+ Files or Software, or (b) this copyright and permission notice appear in
25
+ associated Documentation.
26
+
27
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
28
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
30
+ THIRD PARTY RIGHTS.
31
+
32
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
33
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
34
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
35
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
36
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
37
+ FILES OR SOFTWARE.
38
+
39
+ Except as contained in this notice, the name of a copyright holder shall
40
+ not be used in advertising or otherwise to promote the sale, use or other
41
+ dealings in these Data Files or Software without prior written
42
+ authorization of the copyright holder.
@@ -0,0 +1,46 @@
1
+ Metadata-Version: 2.4
2
+ Name: konomanoasa-tree-sitter-javascript
3
+ Version: 0.1.0
4
+ Summary: Tree-sitter grammar for JavaScript.
5
+ License-Expression: MIT
6
+ Project-URL: Repository, https://github.com/konomanoasa/tree-sitter-javascript
7
+ Requires-Python: >=3.13
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ License-File: LICENSE-UNICODE
11
+ Dynamic: license-file
12
+
13
+ # tree-sitter-javascript
14
+
15
+ [![CI](https://github.com/konomanoasa/tree-sitter-javascript/actions/workflows/ci.yaml/badge.svg)](https://github.com/konomanoasa/tree-sitter-javascript/actions/workflows/ci.yaml)
16
+ [![crates.io](https://img.shields.io/crates/v/konomanoasa-tree-sitter-javascript)](https://crates.io/crates/konomanoasa-tree-sitter-javascript)
17
+ [![npm](https://img.shields.io/npm/v/@konomanoasa/tree-sitter-javascript)](https://www.npmjs.com/package/@konomanoasa/tree-sitter-javascript)
18
+ [![PyPI](https://img.shields.io/pypi/v/konomanoasa-tree-sitter-javascript)](https://pypi.org/project/konomanoasa-tree-sitter-javascript/)
19
+
20
+ [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for JavaScript (ECMAScript 2026).
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ npm install @konomanoasa/tree-sitter-javascript
26
+ ```
27
+
28
+ ## Parsing Policy
29
+
30
+ [Parsing Policy](https://github.com/konomanoasa/tree-sitter-javascript/blob/main/PARSING_POLICY.md)
31
+
32
+ ## Development
33
+
34
+ ```sh
35
+ npm ci
36
+ npm test
37
+ ```
38
+
39
+ ## Specification
40
+
41
+ [ECMA-262, 17th edition](https://262.ecma-international.org/17.0/)
42
+
43
+ ## Licenses
44
+
45
+ - [MIT](LICENSE)
46
+ - [Unicode License V3](LICENSE-UNICODE) (Unicode data)
@@ -0,0 +1,34 @@
1
+ # tree-sitter-javascript
2
+
3
+ [![CI](https://github.com/konomanoasa/tree-sitter-javascript/actions/workflows/ci.yaml/badge.svg)](https://github.com/konomanoasa/tree-sitter-javascript/actions/workflows/ci.yaml)
4
+ [![crates.io](https://img.shields.io/crates/v/konomanoasa-tree-sitter-javascript)](https://crates.io/crates/konomanoasa-tree-sitter-javascript)
5
+ [![npm](https://img.shields.io/npm/v/@konomanoasa/tree-sitter-javascript)](https://www.npmjs.com/package/@konomanoasa/tree-sitter-javascript)
6
+ [![PyPI](https://img.shields.io/pypi/v/konomanoasa-tree-sitter-javascript)](https://pypi.org/project/konomanoasa-tree-sitter-javascript/)
7
+
8
+ [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for JavaScript (ECMAScript 2026).
9
+
10
+ ## Installation
11
+
12
+ ```sh
13
+ npm install @konomanoasa/tree-sitter-javascript
14
+ ```
15
+
16
+ ## Parsing Policy
17
+
18
+ [Parsing Policy](https://github.com/konomanoasa/tree-sitter-javascript/blob/main/PARSING_POLICY.md)
19
+
20
+ ## Development
21
+
22
+ ```sh
23
+ npm ci
24
+ npm test
25
+ ```
26
+
27
+ ## Specification
28
+
29
+ [ECMA-262, 17th edition](https://262.ecma-international.org/17.0/)
30
+
31
+ ## Licenses
32
+
33
+ - [MIT](LICENSE)
34
+ - [Unicode License V3](LICENSE-UNICODE) (Unicode data)
@@ -0,0 +1,9 @@
1
+ from importlib.resources import files
2
+
3
+ from .binding import language
4
+
5
+ HIGHLIGHTS_QUERY: str = (
6
+ files(__package__).joinpath("queries/highlights.scm").read_text("utf-8")
7
+ )
8
+
9
+ __all__ = ["HIGHLIGHTS_QUERY", "language"]
@@ -0,0 +1,34 @@
1
+ #include <Python.h>
2
+
3
+ #include "../../src/tree_sitter/parser.h"
4
+
5
+ const TSLanguage *tree_sitter_javascript(void);
6
+
7
+ static PyObject *language(PyObject *self, PyObject *args) {
8
+ (void)self;
9
+ (void)args;
10
+ return PyCapsule_New(
11
+ (void *)tree_sitter_javascript(),
12
+ "tree_sitter.Language",
13
+ NULL
14
+ );
15
+ }
16
+
17
+ static PyMethodDef methods[] = {
18
+ {"language",
19
+ language,
20
+ METH_NOARGS,
21
+ "Return the JavaScript language capsule."},
22
+ {NULL, NULL, 0, NULL},
23
+ };
24
+
25
+ static struct PyModuleDef module = {
26
+ PyModuleDef_HEAD_INIT,
27
+ .m_name = "binding",
28
+ .m_size = -1,
29
+ .m_methods = methods,
30
+ };
31
+
32
+ PyMODINIT_FUNC PyInit_binding(void) {
33
+ return PyModule_Create(&module);
34
+ }
@@ -0,0 +1,3 @@
1
+ from types import CapsuleType
2
+
3
+ def language() -> CapsuleType: ...
@@ -0,0 +1,46 @@
1
+ Metadata-Version: 2.4
2
+ Name: konomanoasa-tree-sitter-javascript
3
+ Version: 0.1.0
4
+ Summary: Tree-sitter grammar for JavaScript.
5
+ License-Expression: MIT
6
+ Project-URL: Repository, https://github.com/konomanoasa/tree-sitter-javascript
7
+ Requires-Python: >=3.13
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ License-File: LICENSE-UNICODE
11
+ Dynamic: license-file
12
+
13
+ # tree-sitter-javascript
14
+
15
+ [![CI](https://github.com/konomanoasa/tree-sitter-javascript/actions/workflows/ci.yaml/badge.svg)](https://github.com/konomanoasa/tree-sitter-javascript/actions/workflows/ci.yaml)
16
+ [![crates.io](https://img.shields.io/crates/v/konomanoasa-tree-sitter-javascript)](https://crates.io/crates/konomanoasa-tree-sitter-javascript)
17
+ [![npm](https://img.shields.io/npm/v/@konomanoasa/tree-sitter-javascript)](https://www.npmjs.com/package/@konomanoasa/tree-sitter-javascript)
18
+ [![PyPI](https://img.shields.io/pypi/v/konomanoasa-tree-sitter-javascript)](https://pypi.org/project/konomanoasa-tree-sitter-javascript/)
19
+
20
+ [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for JavaScript (ECMAScript 2026).
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ npm install @konomanoasa/tree-sitter-javascript
26
+ ```
27
+
28
+ ## Parsing Policy
29
+
30
+ [Parsing Policy](https://github.com/konomanoasa/tree-sitter-javascript/blob/main/PARSING_POLICY.md)
31
+
32
+ ## Development
33
+
34
+ ```sh
35
+ npm ci
36
+ npm test
37
+ ```
38
+
39
+ ## Specification
40
+
41
+ [ECMA-262, 17th edition](https://262.ecma-international.org/17.0/)
42
+
43
+ ## Licenses
44
+
45
+ - [MIT](LICENSE)
46
+ - [Unicode License V3](LICENSE-UNICODE) (Unicode data)
@@ -0,0 +1,20 @@
1
+ LICENSE
2
+ LICENSE-UNICODE
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ bindings/python/__init__.py
7
+ bindings/python/binding.c
8
+ bindings/python/binding.pyi
9
+ bindings/python/py.typed
10
+ dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/PKG-INFO
11
+ dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/SOURCES.txt
12
+ dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/dependency_links.txt
13
+ dist/metadata/konomanoasa_tree_sitter_javascript.egg-info/top_level.txt
14
+ queries/highlights.scm
15
+ src/parser.c
16
+ src/scanner.c
17
+ src/tokens.h
18
+ src/tree_sitter/alloc.h
19
+ src/tree_sitter/array.h
20
+ src/tree_sitter/parser.h
@@ -0,0 +1,75 @@
1
+ [project]
2
+ name = "konomanoasa-tree-sitter-javascript"
3
+ version = "0.1.0"
4
+ description = "Tree-sitter grammar for JavaScript."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE", "LICENSE-UNICODE"]
8
+ requires-python = ">=3.13"
9
+
10
+ [project.urls]
11
+ Repository = "https://github.com/konomanoasa/tree-sitter-javascript"
12
+
13
+ [dependency-groups]
14
+ dev = [
15
+ "poethepoet==0.49.0",
16
+ "ruff==0.17.6",
17
+ "setuptools==84.2.1",
18
+ "tree-sitter==0.27.0",
19
+ "twine==7.0.0",
20
+ "ty==0.0.112",
21
+ ]
22
+
23
+ [build-system]
24
+ requires = ["setuptools==84.2.1"]
25
+ build-backend = "setuptools.build_meta"
26
+
27
+ [tool.setuptools]
28
+ include-package-data = false
29
+ packages = ["tree_sitter_javascript", "tree_sitter_javascript.queries"]
30
+
31
+ [tool.setuptools.package-dir]
32
+ tree_sitter_javascript = "bindings/python"
33
+ "tree_sitter_javascript.queries" = "queries"
34
+
35
+ [tool.setuptools.package-data]
36
+ tree_sitter_javascript = ["*.pyi", "py.typed"]
37
+ "tree_sitter_javascript.queries" = ["*.scm"]
38
+
39
+ [tool.poe]
40
+ executor.type = "simple"
41
+
42
+ [tool.poe.tasks]
43
+ build = "uv build --no-sources"
44
+ check = [
45
+ { cmd = "ruff check setup.py bindings/python test/bindings.test.py" },
46
+ { cmd = "ty check setup.py bindings/python test/bindings.test.py" },
47
+ { cmd = "ruff format --check setup.py bindings/python test/bindings.test.py" },
48
+ ]
49
+ format = "ruff format setup.py bindings/python test/bindings.test.py"
50
+ test = "python test/bindings.test.py"
51
+
52
+ [tool.ruff]
53
+ indent-width = 4
54
+ line-length = 80
55
+
56
+ [tool.ruff.format]
57
+ indent-style = "space"
58
+ skip-magic-trailing-comma = true
59
+
60
+ [tool.ruff.lint.isort]
61
+ split-on-trailing-comma = false
62
+
63
+ [tool.uv]
64
+ cache-keys = [
65
+ { file = "LICENSE" },
66
+ { file = "LICENSE-UNICODE" },
67
+ { file = "README.md" },
68
+ { file = "bindings/python/*" },
69
+ { file = "pyproject.toml" },
70
+ { file = "queries/*.scm" },
71
+ { file = "setup.py" },
72
+ { file = "src/*.c" },
73
+ { file = "src/*.h" },
74
+ { file = "src/tree_sitter/*.h" },
75
+ ]