Solidity grammar for tree-sitter
Project description
🌴 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.
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!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tree_sitter_solidity-1.2.13.tar.gz.
File metadata
- Download URL: tree_sitter_solidity-1.2.13.tar.gz
- Upload date:
- Size: 158.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5de530ee9a3d18632396c55cd51f87fd4a7dae8ebac117eb63e52b4d3bc4a7c1
|
|
| MD5 |
b0e765dcec89b48077361491ba95cf5a
|
|
| BLAKE2b-256 |
ed6ec40fcf4018302b110d48e02e2fd8128e9a009669cae04ba8e3c849e293fb
|
File details
Details for the file tree_sitter_solidity-1.2.13-cp38-abi3-win_arm64.whl.
File metadata
- Download URL: tree_sitter_solidity-1.2.13-cp38-abi3-win_arm64.whl
- Upload date:
- Size: 61.1 kB
- Tags: CPython 3.8+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5caa0b2eafdb5e27e3f035732a6ccca5758231befb08f6adc4287b5e118ab8d2
|
|
| MD5 |
2695c9ae66e721a05ed6bad83fcb8ccd
|
|
| BLAKE2b-256 |
5537316728600710cb8f24dbbcc6f1471b808d722285a65badb7dfc7c500fa94
|
File details
Details for the file tree_sitter_solidity-1.2.13-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: tree_sitter_solidity-1.2.13-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 69.2 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f700a305167e39b984d38dceddf45a56e898124a923bf5cb6bb4b149c2c7063
|
|
| MD5 |
dff5ada917afbe2589ece6de6383aa9c
|
|
| BLAKE2b-256 |
5773f546c9f85cea28da4bb8abb4c0f4efb05694497a5c7d5a222dce6451abc4
|
File details
Details for the file tree_sitter_solidity-1.2.13-cp38-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: tree_sitter_solidity-1.2.13-cp38-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 91.0 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e008987fd7e2329b14b2558ae16b74e98460d2ac50a98affa8d9951772c977e
|
|
| MD5 |
4fd8896447927afd8fbe19e589a1e58f
|
|
| BLAKE2b-256 |
94383b185a4f17d53144892ff275bbb79ad7c3f27c6227b4d5b3e8dd01007477
|
File details
Details for the file tree_sitter_solidity-1.2.13-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: tree_sitter_solidity-1.2.13-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 94.2 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fd017ffcdcf38422175176d1b3623a3499025c6c7c896b2502c0bd55bd2b36d
|
|
| MD5 |
f5d5fa06f83cdb7750bd1d97fe74e1f7
|
|
| BLAKE2b-256 |
2dc7c329e23b3b93c3d55d887e0320794ea42681770704987468060964608cfb
|
File details
Details for the file 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.
File metadata
- Download URL: 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
- Upload date:
- Size: 91.9 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
490a11968c79a17f9b01156d2d655f3e602ff8de9256b026cf1deb6213d34c78
|
|
| MD5 |
12bf63fa7b3bba90a18a9bb81b1ec6a3
|
|
| BLAKE2b-256 |
de81685a3c5dec31ba2c38615da84b74bc8973a77a0989091c5e2efaa7f5e4e8
|
File details
Details for the file tree_sitter_solidity-1.2.13-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tree_sitter_solidity-1.2.13-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 61.9 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
703fa18a90289e20cec25ddfc0fc574440e86781e3c5d26c99acb757a6acb109
|
|
| MD5 |
1d2b021e2555d7c342b5161261e152f8
|
|
| BLAKE2b-256 |
2035a8a5443d95333984914ef51c661bd85b20fee2374b0b866243d25bbc0efe
|
File details
Details for the file tree_sitter_solidity-1.2.13-cp38-abi3-macosx_10_9_x86_64.whl.
File metadata
- Download URL: tree_sitter_solidity-1.2.13-cp38-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 59.1 kB
- Tags: CPython 3.8+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a662d040cbe9d1a9f1083eb2be461c60748b7c90782de1f7505bf6494a1d5c05
|
|
| MD5 |
67f0a37308ba4ef9b7c3315ca3294b1f
|
|
| BLAKE2b-256 |
7ccf9387cd5cda028790dada6f999625e19489d7d76e8e92999403421ad7b1ce
|