traverse-solidity
Core Solidity parsing and analysis functionality for the Traverse suite.
Overview
This crate provides the foundational Solidity parsing capabilities using tree-sitter, enabling syntactic analysis of smart contracts. It serves as the backbone for all Traverse tools that need to understand Solidity code structure.
Features
- Fast, incremental parsing using tree-sitter
- Complete Solidity syntax support
- AST traversal utilities
- Source location tracking
- Comment preservation
Usage
use parse_solidity;
Tree-sitter Grammar
This crate uses a customized tree-sitter grammar for Solidity that provides comprehensive coverage of Solidity syntax including:
- All contract types (contracts, interfaces, libraries, abstract contracts)
- Solidity 0.8+ features
- Inline assembly (Yul)
- NatSpec comments
Part of Traverse
This crate is part of the Traverse suite of tools for Solidity code analysis, visualization, and test generation.
License
MIT OR Apache-2.0