| Crates.io | tree-sitter-solidity |
| lib.rs | tree-sitter-solidity |
| version | 1.2.13 |
| created_at | 2021-06-16 12:13:16.470708+00 |
| updated_at | 2025-08-04 11:12:50.368759+00 |
| description | Solidity grammar for the tree-sitter parsing library |
| homepage | |
| repository | https://github.com/JoranHonig/tree-sitter-solidity |
| max_upload_size | |
| id | 410837 |
| size | 2,890,213 |
💡 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.
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
-> Ethereum solidity grammar:
-> 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!