federicobond / solidity-parser-antlr

A Solidity parser for JS built on top of a robust ANTLR4 grammar
MIT License
155 stars 55 forks source link

feat(visitor): support early termination #89

Open yxliang01 opened 5 years ago

yxliang01 commented 5 years ago

It's often that when we have visited interested nodes, the exploration doesn't need to continue. So, it would be great if early termination is supported. I'm thinking to define a class that users can throw inside the visitor. Then, the visitor function catches it and terminate normally. If this sounds good, I can contribute. :)