| Crates.io | traverse-solidity |
| lib.rs | traverse-solidity |
| version | 0.1.4 |
| created_at | 2025-09-19 03:08:17.788473+00 |
| updated_at | 2025-09-28 06:19:30.253129+00 |
| description | Solidity language parser and AST for code analysis |
| homepage | https://github.com/calltrace/traverse |
| repository | https://github.com/calltrace/traverse |
| max_upload_size | |
| id | 1845718 |
| size | 228,261 |
Core Solidity parsing and analysis functionality for the Traverse suite.
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.
use traverse_solidity::parse_solidity;
fn main() {
let source_code = r#"
contract Example {
function hello() public pure returns (string memory) {
return "Hello, World!";
}
}
"#;
let tree = parse_solidity(source_code);
// Process the syntax tree
}
This crate uses a customized tree-sitter grammar for Solidity that provides comprehensive coverage of Solidity syntax including:
This crate is part of the Traverse suite of tools for Solidity code analysis, visualization, and test generation.
MIT OR Apache-2.0