Skip to main content

Solidity grammar for the Tree-sitter parsing library

Project description

🌴 tree-sitter-solidity

Node.js CI npm version

💡 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:

-> 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

abch_tree_sitter_solidity-1.0.7-py3-none-win_amd64.whl (54.4 kB view hashes)

Uploaded Python 3 Windows x86-64

abch_tree_sitter_solidity-1.0.7-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (50.7 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.5+ x86-64

abch_tree_sitter_solidity-1.0.7-py3-none-macosx_11_7_x86_64.whl (46.2 kB view hashes)

Uploaded Python 3 macOS 11.7+ x86-64

abch_tree_sitter_solidity-1.0.7-py3-none-macosx_10_15_x86_64.whl (46.2 kB view hashes)

Uploaded Python 3 macOS 10.15+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page