tree-sitter-ocaml
This module provides OCaml grammars for the tree-sitter parsing library.
There are separate grammars for implementations (.ml), interfaces (.mli)
and types.
Installation
pip install tree-sitter-ocaml
You will probably also need the tree-sitter binding.
pip install tree-sitter
Usage
Load the grammar as a Language object:
import tree_sitter_ocaml
from tree_sitter import Language, Parser
language_ocaml = Language(tree_sitter_ocaml.language_ocaml())
Create a Parser and configure it to use the language:
parser = Parser(language_ocaml)
Parse some source code:
tree = parser.parse(
b"""
module M : sig
val x : int
end
"""
)
Use language_ocaml_interface() to parse interface files (with .mli extension)
and language_ocaml_type() to parse type signatures.
Metadata
Release files for tree-sitter-ocaml 0.26.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tree_sitter_ocaml-0.26.0.tar.gz | 2.9 MB | Details |
Built distributions (wheels)
Total release size: 11.9 MB
Release files / tree_sitter_ocaml-0.26.0.tar.gz
| Download URL | tree_sitter_ocaml-0.26.0.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
898a17c23dc93961ea4e317ed0edc990811a9eaa032034905b3197e19b08ce80
|
|
BLAKE2b-256 checksum How to use checksums |
e71d3201aa4f0a2450ba50e1ebfd12ed36f36f76cdf72ac73d6a1717b70b922e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-win_arm64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
187972f78109a449e6a3c8a6b847fce28670174a6ad36798e0f8a76000a5f512
|
|
BLAKE2b-256 checksum How to use checksums |
0cf59dbbdd5b08dd6dffbe40062cbe42733ef33240e12fbce8a2352bbbb4bb01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-win_amd64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
828a59dd11c5c11db7cbee516571782d3c85fd8dfeaa5fc42179f1c97d5c9b80
|
|
BLAKE2b-256 checksum How to use checksums |
b3a7218cf6600e0967f20b087ec5810420a11ebef8f6f67d235d1769ef721a77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b4dc579f83044a7f8dfbe06a29c62b9eee44d1f98f7e894a5248796471631b18
|
|
BLAKE2b-256 checksum How to use checksums |
6287e1fe22b6f28817a95c41aa08cfb63ab50adb56f46cfe551359ac28e2e611
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4d6df3042222e8117111b15e10a8442d95c65ff119b5ba2cfe422cc6de83f77e
|
|
BLAKE2b-256 checksum How to use checksums |
febb8fe2a6f7a8c00778c776c733e4e48e1bb5942df24e000fd93804be4efde7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
cf83ceb4f85026246d0c1d2364c50f270e9e99e106831e6b9c92bb7ebec75514
|
|
BLAKE2b-256 checksum How to use checksums |
2c115c7fcc4743cad0c22948ec56c521ce685ef9a4556c8cefa064be61f2b208
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
679d8077bafb6a1304154e5ce1dbbce1812d6c38f5984509131849d3b93deba3
|
|
BLAKE2b-256 checksum How to use checksums |
c16e14719208f923b0d7a970d6cf56b441c3831c7a39c12ca772e67422ccefcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b680891bc13d1231ff93a02a3c6e8e43be95a239db9bb2517471cfd7d780b2ac
|
|
BLAKE2b-256 checksum How to use checksums |
6e577ccdf4785fb2ebb8052eb9fcf46b7977ed7efb6e727cd7c6b4f92ffae93e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tree_sitter_ocaml-0.26.0-cp310-abi3-macosx_10_9_x86_64.whl
| Download URL | tree_sitter_ocaml-0.26.0-cp310-abi3-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 abi3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
fe9f2fa352bd74d008b8bf63c5293de2c07b7522f5fc4b9d564fbd572737abc2
|
|
BLAKE2b-256 checksum How to use checksums |
4daf43b9f7b6518dc706b17e88635a4442000d095a24f5275aeb20bf2b82163c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|