tree-sitter-solidity


Nametree-sitter-solidity JSON
Version 1.2.13 PyPI version JSON
download
home_pageNone
SummarySolidity grammar for tree-sitter
upload_time2025-08-04 11:14:26
maintainerNone
docs_urlNone
authorJoran Honig
requires_python>=3.9
licenseMIT
keywords incremental parsing tree-sitter solidity
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 🌴 tree-sitter-solidity 
[![Node.js CI](https://github.com/JoranHonig/tree-sitter-solidity/actions/workflows/node.js.yml/badge.svg)](https://github.com/JoranHonig/tree-sitter-solidity/actions/workflows/node.js.yml)
[![npm version](https://badge.fury.io/js/tree-sitter-solidity.svg)](https://badge.fury.io/js/tree-sitter-solidity)

> 💡 this grammar is still in development, the structure of the generated AST is not stable

This repository contains a grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).

The goal of this project is to provide an parser efficient low-dependency parser for solidity which targets most solidity versions in use and is designed for enabling metaprogramming.


### Navigating this repository
The primary file in this repository is `grammar.js` which describes the tree-sitter grammar.

```
# Primary file:
grammar.js
# Tests:
/test/**/*

# Auto generated:
/src/**/*
index.js
binding.gyp
```

### References
-> Ethereum solidity grammar: 
- https://github.com/ethereum/solidity/blob/develop/docs/grammar/SolidityParser.g4
- https://github.com/ethereum/solidity/blob/develop/docs/grammar/SolidityLexer.g4
- https://docs.soliditylang.org/en/latest/grammar.html?#

-> Tree-sitter javascript grammar: https://github.com/tree-sitter/tree-sitter-javascript/blob/master/grammar.js

-> Solidity antlr grammar: https://github.com/ConsenSys/solidity-parser-antlr

Major inspriration & some structures have been taken from tree-sitter-javascript, a big thanks to the contributors to this repo! 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tree-sitter-solidity",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "incremental, parsing, tree-sitter, solidity",
    "author": "Joran Honig",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ed/6e/c40fcf4018302b110d48e02e2fd8128e9a009669cae04ba8e3c849e293fb/tree_sitter_solidity-1.2.13.tar.gz",
    "platform": null,
    "description": "## \ud83c\udf34 tree-sitter-solidity \n[![Node.js CI](https://github.com/JoranHonig/tree-sitter-solidity/actions/workflows/node.js.yml/badge.svg)](https://github.com/JoranHonig/tree-sitter-solidity/actions/workflows/node.js.yml)\n[![npm version](https://badge.fury.io/js/tree-sitter-solidity.svg)](https://badge.fury.io/js/tree-sitter-solidity)\n\n> \ud83d\udca1 this grammar is still in development, the structure of the generated AST is not stable\n\nThis repository contains a grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).\n\nThe goal of this project is to provide an parser efficient low-dependency parser for solidity which targets most solidity versions in use and is designed for enabling metaprogramming.\n\n\n### Navigating this repository\nThe primary file in this repository is `grammar.js` which describes the tree-sitter grammar.\n\n```\n# Primary file:\ngrammar.js\n# Tests:\n/test/**/*\n\n# Auto generated:\n/src/**/*\nindex.js\nbinding.gyp\n```\n\n### References\n-> Ethereum solidity grammar: \n- https://github.com/ethereum/solidity/blob/develop/docs/grammar/SolidityParser.g4\n- https://github.com/ethereum/solidity/blob/develop/docs/grammar/SolidityLexer.g4\n- https://docs.soliditylang.org/en/latest/grammar.html?#\n\n-> Tree-sitter javascript grammar: https://github.com/tree-sitter/tree-sitter-javascript/blob/master/grammar.js\n\n-> Solidity antlr grammar: https://github.com/ConsenSys/solidity-parser-antlr\n\nMajor inspriration & some structures have been taken from tree-sitter-javascript, a big thanks to the contributors to this repo! \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Solidity grammar for tree-sitter",
    "version": "1.2.13",
    "project_urls": {
        "Homepage": "https://github.com/JoranHonig/tree-sitter-solidity"
    },
    "split_keywords": [
        "incremental",
        " parsing",
        " tree-sitter",
        " solidity"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7ccf9387cd5cda028790dada6f999625e19489d7d76e8e92999403421ad7b1ce",
                "md5": "67f0a37308ba4ef9b7c3315ca3294b1f",
                "sha256": "a662d040cbe9d1a9f1083eb2be461c60748b7c90782de1f7505bf6494a1d5c05"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13-cp38-abi3-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "67f0a37308ba4ef9b7c3315ca3294b1f",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.9",
            "size": 59074,
            "upload_time": "2025-08-04T11:14:19",
            "upload_time_iso_8601": "2025-08-04T11:14:19.404050Z",
            "url": "https://files.pythonhosted.org/packages/7c/cf/9387cd5cda028790dada6f999625e19489d7d76e8e92999403421ad7b1ce/tree_sitter_solidity-1.2.13-cp38-abi3-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2035a8a5443d95333984914ef51c661bd85b20fee2374b0b866243d25bbc0efe",
                "md5": "1d2b021e2555d7c342b5161261e152f8",
                "sha256": "703fa18a90289e20cec25ddfc0fc574440e86781e3c5d26c99acb757a6acb109"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13-cp38-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "1d2b021e2555d7c342b5161261e152f8",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.9",
            "size": 61855,
            "upload_time": "2025-08-04T11:14:20",
            "upload_time_iso_8601": "2025-08-04T11:14:20.244861Z",
            "url": "https://files.pythonhosted.org/packages/20/35/a8a5443d95333984914ef51c661bd85b20fee2374b0b866243d25bbc0efe/tree_sitter_solidity-1.2.13-cp38-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2dc7c329e23b3b93c3d55d887e0320794ea42681770704987468060964608cfb",
                "md5": "f5d5fa06f83cdb7750bd1d97fe74e1f7",
                "sha256": "3fd017ffcdcf38422175176d1b3623a3499025c6c7c896b2502c0bd55bd2b36d"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "f5d5fa06f83cdb7750bd1d97fe74e1f7",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.9",
            "size": 94185,
            "upload_time": "2025-08-04T11:14:21",
            "upload_time_iso_8601": "2025-08-04T11:14:21.310474Z",
            "url": "https://files.pythonhosted.org/packages/2d/c7/c329e23b3b93c3d55d887e0320794ea42681770704987468060964608cfb/tree_sitter_solidity-1.2.13-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "de81685a3c5dec31ba2c38615da84b74bc8973a77a0989091c5e2efaa7f5e4e8",
                "md5": "12bf63fa7b3bba90a18a9bb81b1ec6a3",
                "sha256": "490a11968c79a17f9b01156d2d655f3e602ff8de9256b026cf1deb6213d34c78"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "12bf63fa7b3bba90a18a9bb81b1ec6a3",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.9",
            "size": 91941,
            "upload_time": "2025-08-04T11:14:22",
            "upload_time_iso_8601": "2025-08-04T11:14:22.320536Z",
            "url": "https://files.pythonhosted.org/packages/de/81/685a3c5dec31ba2c38615da84b74bc8973a77a0989091c5e2efaa7f5e4e8/tree_sitter_solidity-1.2.13-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "94383b185a4f17d53144892ff275bbb79ad7c3f27c6227b4d5b3e8dd01007477",
                "md5": "4fd8896447927afd8fbe19e589a1e58f",
                "sha256": "6e008987fd7e2329b14b2558ae16b74e98460d2ac50a98affa8d9951772c977e"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13-cp38-abi3-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4fd8896447927afd8fbe19e589a1e58f",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.9",
            "size": 90993,
            "upload_time": "2025-08-04T11:14:23",
            "upload_time_iso_8601": "2025-08-04T11:14:23.536665Z",
            "url": "https://files.pythonhosted.org/packages/94/38/3b185a4f17d53144892ff275bbb79ad7c3f27c6227b4d5b3e8dd01007477/tree_sitter_solidity-1.2.13-cp38-abi3-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5773f546c9f85cea28da4bb8abb4c0f4efb05694497a5c7d5a222dce6451abc4",
                "md5": "dff5ada917afbe2589ece6de6383aa9c",
                "sha256": "3f700a305167e39b984d38dceddf45a56e898124a923bf5cb6bb4b149c2c7063"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13-cp38-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "dff5ada917afbe2589ece6de6383aa9c",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.9",
            "size": 69156,
            "upload_time": "2025-08-04T11:14:24",
            "upload_time_iso_8601": "2025-08-04T11:14:24.608231Z",
            "url": "https://files.pythonhosted.org/packages/57/73/f546c9f85cea28da4bb8abb4c0f4efb05694497a5c7d5a222dce6451abc4/tree_sitter_solidity-1.2.13-cp38-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5537316728600710cb8f24dbbcc6f1471b808d722285a65badb7dfc7c500fa94",
                "md5": "2695c9ae66e721a05ed6bad83fcb8ccd",
                "sha256": "5caa0b2eafdb5e27e3f035732a6ccca5758231befb08f6adc4287b5e118ab8d2"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13-cp38-abi3-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "2695c9ae66e721a05ed6bad83fcb8ccd",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.9",
            "size": 61063,
            "upload_time": "2025-08-04T11:14:25",
            "upload_time_iso_8601": "2025-08-04T11:14:25.595661Z",
            "url": "https://files.pythonhosted.org/packages/55/37/316728600710cb8f24dbbcc6f1471b808d722285a65badb7dfc7c500fa94/tree_sitter_solidity-1.2.13-cp38-abi3-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ed6ec40fcf4018302b110d48e02e2fd8128e9a009669cae04ba8e3c849e293fb",
                "md5": "b0e765dcec89b48077361491ba95cf5a",
                "sha256": "5de530ee9a3d18632396c55cd51f87fd4a7dae8ebac117eb63e52b4d3bc4a7c1"
            },
            "downloads": -1,
            "filename": "tree_sitter_solidity-1.2.13.tar.gz",
            "has_sig": false,
            "md5_digest": "b0e765dcec89b48077361491ba95cf5a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 158785,
            "upload_time": "2025-08-04T11:14:26",
            "upload_time_iso_8601": "2025-08-04T11:14:26.576792Z",
            "url": "https://files.pythonhosted.org/packages/ed/6e/c40fcf4018302b110d48e02e2fd8128e9a009669cae04ba8e3c849e293fb/tree_sitter_solidity-1.2.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-04 11:14:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JoranHonig",
    "github_project": "tree-sitter-solidity",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tree-sitter-solidity"
}
        
Elapsed time: 1.95475s