tree-sitter-ocaml


Nametree-sitter-ocaml JSON
Version 0.23.1 PyPI version JSON
download
home_pageNone
SummaryOCaml grammar for tree-sitter
upload_time2024-09-27 00:03:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords incremental parsing tree-sitter ocaml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tree-sitter-ocaml

[![CI][ci]](https://github.com/tree-sitter/tree-sitter-ocaml/actions/workflows/ci.yml)
[![pypi][pypi]](https://pypi.org/project/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

```sh
pip install tree-sitter-ocaml
```

You will probably also need the [tree-sitter binding][tree-sitter binding].

```sh
pip install tree-sitter
```

## Usage

Load the grammar as a `Language` object:

```python
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:

```python
parser = Parser(language_ocaml)
```

Parse some source code:

```python
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.

[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-ocaml/ci.yml?logo=github&label=CI
[pypi]: https://img.shields.io/pypi/v/tree-sitter-ocaml?logo=pypi&logoColor=white&label=PyPI
[tree-sitter]: https://tree-sitter.github.io/tree-sitter/
[tree-sitter binding]: https://pypi.org/project/tree-sitter/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tree-sitter-ocaml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "incremental, parsing, tree-sitter, ocaml",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/0b/ad/a4fd2820fb46f364dee6853bb39a0e90cc52727e65310fb6349224655a5e/tree_sitter_ocaml-0.23.1.tar.gz",
    "platform": null,
    "description": "# tree-sitter-ocaml\n\n[![CI][ci]](https://github.com/tree-sitter/tree-sitter-ocaml/actions/workflows/ci.yml)\n[![pypi][pypi]](https://pypi.org/project/tree-sitter-ocaml/)\n\nThis module provides OCaml grammars for the [tree-sitter][] parsing library.\nThere are separate grammars for implementations (`.ml`), interfaces (`.mli`)\nand types.\n\n## Installation\n\n```sh\npip install tree-sitter-ocaml\n```\n\nYou will probably also need the [tree-sitter binding][tree-sitter binding].\n\n```sh\npip install tree-sitter\n```\n\n## Usage\n\nLoad the grammar as a `Language` object:\n\n```python\nimport tree_sitter_ocaml\nfrom tree_sitter import Language, Parser\n\nlanguage_ocaml = Language(tree_sitter_ocaml.language_ocaml())\n```\n\nCreate a `Parser` and configure it to use the language:\n\n```python\nparser = Parser(language_ocaml)\n```\n\nParse some source code:\n\n```python\ntree = parser.parse(\n    b\"\"\"\n    module M : sig\n      val x : int\n    end\n    \"\"\"\n)\n```\n\nUse `language_ocaml_interface()` to parse interface files (with `.mli` extension)\nand `language_ocaml_type()` to parse type signatures.\n\n[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-ocaml/ci.yml?logo=github&label=CI\n[pypi]: https://img.shields.io/pypi/v/tree-sitter-ocaml?logo=pypi&logoColor=white&label=PyPI\n[tree-sitter]: https://tree-sitter.github.io/tree-sitter/\n[tree-sitter binding]: https://pypi.org/project/tree-sitter/\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "OCaml grammar for tree-sitter",
    "version": "0.23.1",
    "project_urls": {
        "Homepage": "https://github.com/tree-sitter/tree-sitter-ocaml"
    },
    "split_keywords": [
        "incremental",
        " parsing",
        " tree-sitter",
        " ocaml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a30e2a77a84fbe43c4840dc2f477a03ef7c4db87ab40117004b10b966d89954",
                "md5": "5cec3d507171cf78ed0598cb21e6d54e",
                "sha256": "0222f7ab20344962c9384eff9468fb67a47616209d5c27e0bb491039b8986f7a"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5cec3d507171cf78ed0598cb21e6d54e",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1436525,
            "upload_time": "2024-09-27T00:03:08",
            "upload_time_iso_8601": "2024-09-27T00:03:08.142542Z",
            "url": "https://files.pythonhosted.org/packages/1a/30/e2a77a84fbe43c4840dc2f477a03ef7c4db87ab40117004b10b966d89954/tree_sitter_ocaml-0.23.1-cp39-abi3-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9e6cca01ee968c10ddf74f18187fb1a2a32c57e30939cf847daa3263a98a7e0",
                "md5": "5fdc38b663ffc076271cd83f48174246",
                "sha256": "b9925483bbbdb9421fa1d8358fc877c0519f815effdf0ca4cded930b5cb11c58"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "5fdc38b663ffc076271cd83f48174246",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1540881,
            "upload_time": "2024-09-27T00:03:09",
            "upload_time_iso_8601": "2024-09-27T00:03:09.524614Z",
            "url": "https://files.pythonhosted.org/packages/c9/e6/cca01ee968c10ddf74f18187fb1a2a32c57e30939cf847daa3263a98a7e0/tree_sitter_ocaml-0.23.1-cp39-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af20e2faa32c711bab17cfba374f88e6505b9951213f4ffa10474fb9fbb50a39",
                "md5": "dad18d6ed4b1889cfd89b08474e074c0",
                "sha256": "2a115bf330e5405774004e8f6f6b069f33a06ef122f5dfc3d1b4520e59b00a2e"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "dad18d6ed4b1889cfd89b08474e074c0",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1593216,
            "upload_time": "2024-09-27T00:03:11",
            "upload_time_iso_8601": "2024-09-27T00:03:11.529253Z",
            "url": "https://files.pythonhosted.org/packages/af/20/e2faa32c711bab17cfba374f88e6505b9951213f4ffa10474fb9fbb50a39/tree_sitter_ocaml-0.23.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd9371aecabbc3cfde08d508afd6fbfa84e5e0f3cc8462ec485f4aa822e4ed5c",
                "md5": "90690bd145c74134cb6f28665fb6d022",
                "sha256": "7a3452a28dcc161f56db74fbb4e68696a0248d87327f05ec499d1a5d98c686f1"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "90690bd145c74134cb6f28665fb6d022",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1549370,
            "upload_time": "2024-09-27T00:03:13",
            "upload_time_iso_8601": "2024-09-27T00:03:13.359716Z",
            "url": "https://files.pythonhosted.org/packages/fd/93/71aecabbc3cfde08d508afd6fbfa84e5e0f3cc8462ec485f4aa822e4ed5c/tree_sitter_ocaml-0.23.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5148ba44d36fbe6b34f5d8d507dc0334b57c86e05b120c7651e76a16596adc7c",
                "md5": "c1d66ff6e50066bfc4450fbce0ff39e5",
                "sha256": "a9e2fdb53b87d30d97c71f29f32c531049e222622da29605fcd16c0ef15e78c5"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "c1d66ff6e50066bfc4450fbce0ff39e5",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1491293,
            "upload_time": "2024-09-27T00:03:14",
            "upload_time_iso_8601": "2024-09-27T00:03:14.718788Z",
            "url": "https://files.pythonhosted.org/packages/51/48/ba44d36fbe6b34f5d8d507dc0334b57c86e05b120c7651e76a16596adc7c/tree_sitter_ocaml-0.23.1-cp39-abi3-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0df58d0efa3d198241b65e279eabbdb963d3d9a128c7cdc939bad9eb0f7fbbb6",
                "md5": "110fcf2af62e5a51cf19a8324ffd66ce",
                "sha256": "593a10cde645e66509f44a26c0c6f7a33889736057ade72f105d2926b2bafb11"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "110fcf2af62e5a51cf19a8324ffd66ce",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1506188,
            "upload_time": "2024-09-27T00:03:16",
            "upload_time_iso_8601": "2024-09-27T00:03:16.816931Z",
            "url": "https://files.pythonhosted.org/packages/0d/f5/8d0efa3d198241b65e279eabbdb963d3d9a128c7cdc939bad9eb0f7fbbb6/tree_sitter_ocaml-0.23.1-cp39-abi3-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "946f2c2b57b025245a373ba00384e5f5012b1d77e9017cd9dde762c5fae37138",
                "md5": "bf9a0b27889ff51b7889974d02ef005f",
                "sha256": "88caab5cb09fad08bcd2b1cec8e2b9d7ef6a3d04df40af260c8c75f7e374597f"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "bf9a0b27889ff51b7889974d02ef005f",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1443035,
            "upload_time": "2024-09-27T00:03:18",
            "upload_time_iso_8601": "2024-09-27T00:03:18.053414Z",
            "url": "https://files.pythonhosted.org/packages/94/6f/2c2b57b025245a373ba00384e5f5012b1d77e9017cd9dde762c5fae37138/tree_sitter_ocaml-0.23.1-cp39-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f94d2850d3b3d38a20ab9196c5a9e72b4dd94d060bf6527b64022d1483e1009",
                "md5": "e3ce584fec5c091a7b70980a86135735",
                "sha256": "3b8f9dbdf1ab6cacae4c7079ed01d4f441fcf65756fd06ea1257f98eb6c6df41"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1-cp39-abi3-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "e3ce584fec5c091a7b70980a86135735",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 1428485,
            "upload_time": "2024-09-27T00:03:19",
            "upload_time_iso_8601": "2024-09-27T00:03:19.697301Z",
            "url": "https://files.pythonhosted.org/packages/5f/94/d2850d3b3d38a20ab9196c5a9e72b4dd94d060bf6527b64022d1483e1009/tree_sitter_ocaml-0.23.1-cp39-abi3-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0bada4fd2820fb46f364dee6853bb39a0e90cc52727e65310fb6349224655a5e",
                "md5": "1e7d2da586f259f92b29ae71ba47a2b8",
                "sha256": "6887f0f3f0dc3996423552a9d06d98cc80d874ea2a86e28b9936662df0f2985e"
            },
            "downloads": -1,
            "filename": "tree_sitter_ocaml-0.23.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1e7d2da586f259f92b29ae71ba47a2b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 3669123,
            "upload_time": "2024-09-27T00:03:21",
            "upload_time_iso_8601": "2024-09-27T00:03:21.073328Z",
            "url": "https://files.pythonhosted.org/packages/0b/ad/a4fd2820fb46f364dee6853bb39a0e90cc52727e65310fb6349224655a5e/tree_sitter_ocaml-0.23.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-27 00:03:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tree-sitter",
    "github_project": "tree-sitter-ocaml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tree-sitter-ocaml"
}
        
Elapsed time: 0.36389s