Skip to main content

A tree-sitter based typed parser for the solidity language

Project description

tree-sitter-solidity

This is an automatically generated python package using python-tree-sitter-types.

It provides nice typed bindings for the tree-sitter raw parser.

Installation

pip install tree-sitter-solidity

Example

from tree_sitter_solidity import load_language, parse_node
from tree_sitter import Parser

language = load_language('tree-sitter-solidity', 'solidity')

parser = Parser()
parser.set_language(language)

tree = parser.parse(bytes("<some solidity code>", "utf-8"))

typed_tree = parse_node(tree.root_node)

# Your cool clean code:

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

tree-sitter-solidity-0.0.2.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

tree_sitter_solidity-0.0.2-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

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