Zellic / solidity-parser

Solp is a Python library used for reading, parsing and analysis of Solidity source projects and contracts without a dependency on the solc compiler.
https://solp.zellic.io
GNU Affero General Public License v3.0
51 stars 2 forks source link

some suggestion #33

Open SherlockNovitch opened 2 months ago

SherlockNovitch commented 2 months ago

Hi, after reading your documents and source code, I feel that the interface design is a bit unfriendly. Sometimes, users only need to parse a certain section of code or specify a single file for parsing, but SOLP requires the entire project to be input. Users may need an interface style similar to tree-sitter.

t81lal commented 1 month ago

Hey sorry I didn't see this before.

You can parse a few files on their own but if the code has references that can't be resolved properly at compiletime, you'll only be able to get an AST1 output: it's detailed in this tutorial (up to the Getting AST1 Nodes section). I think you're talking about the boilerplate required by setting up a VFS though and I agree it's quite clunky. Do you have an idea for how you'd want this interface to look like?