-
Notifications
You must be signed in to change notification settings - Fork 56
Natspec feature throwing errors in natspec not attached to functions #82
Comments
Cool, this is exactly the kind of feedback I wanted to get before publishing 0.5.0. Thank you @Janther! I'll try to look into this in the next days, but I don't have much time. Pinging @andremedeiros if he wants to check this out too. |
on the top of my mind, the nodes that are direct child of
I hope this helps. |
Hi Fede 👋🏻 Was this released in the latest version? I've been contacted by one of Aragon's engineers to tell me that their CI broke because btw, thanks for maintaining this project! ❤️ |
Yes, I messed up the latest release, sorry! I created the I don't have much time today, but if you can help me out we should be able to get this solved by rebuilding the stable branch here with the fixed stable branch tip from |
Well, I think I got it fixed in |
It works now :) Thanks @federicobond ! |
Hey, const ast = parser.parse(
`/**
* @dev This is the Sum contract.
* @title Sum Contract
* @author username
*/
contract Sum { }`
);
console.log(ast); I'm using 0.4.11 |
As far as I know, the Natspec feature was put on hold until this issue is solved. |
hmm, When I did this, I didn't parse variables natspec, and now I was planning to do so. |
when running the latest code of master against openzepellin contracts there are many errors because of the natspec feature.
for example when running it against
contracts/mocks/ERC165/ERC165InterfacesSupported.sol
I get these errors.my guess is that probably the current rules only consider natspec for functions, contracts, libraries, and interfaces (notice that the constructor is a valid place for natspec and also throws an error in the example shown).
While the
solc
only considers these cases, people use natspec for variable declaration and modifier among other nodes so perhaps ignore these cases without throwing errors or also parse them (I like the latter better but it's up to you).The text was updated successfully, but these errors were encountered: