Closed mrx23dot closed 2 years ago
Hey @mrx23dot,
function.name
will currently only work with real functions, not modifiers
. If there's a use case for you to extract all modifier names we might be able to make that happen in the same fashion. Otherwise there's an example in the Readme that shows how to find specific modifier names 🙌
Works great with non-modifiers, thanks!
the version released today should allow you to extract modifier names too. cheers 🙌
Could you also release it on npm then I will give it a go.
Is there an option to dump the AST to file from cli for further processing? thank you
Should --find="contract.name" return interface names too? 02253dfa1f23e72e2e3e1c6b9cd2b8b0a2fc7bc5_SoEToken.txt
@mrx23dot, yes, it matches interface contracts too.
You can include/exclude interfaces like this:
⇒ ./bin/main.js examples/02253dfa1f23e72e2e3e1c6b9cd2b8b0a2fc7bc5_SoEToken.sol --find="contract.name && contract.kind=='interface'"
Running
solgrep --find="function.name" test.sol
on
gives no results: