You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Started with making the Visitor interface ... as dart doesn't support overloading methods with different parameters, I used generic types, and the Element interface that will accept this visitor.
Thanks for taking this up! We probably want to have them all in one class. It's nicer if we have a single visitor class, with multiple void methods: visitClass, visitMethod, ... So the user doesn't have to think about creating multiple classes.
Thank you for the note! Combining everything into a single visitor class makes the design cleaner and easier to use. Here’s the revised code based on your suggestion:
In the Class element, I've updated the accept method to automatically propagate the visitor to each method in its methods list, making it easier for the user to apply the visitor across all contained methods:
Minor adjustment is to visit the class first, and not visit the methods if the class is already excluded by the visitor. But you can go ahead and open a PR for this.
Started with making the Visitor interface ... as dart doesn't support overloading methods with different parameters, I used generic types, and the Element interface that will accept this visitor.
then the simple AST only containing (classes, methods)
then implementing the Excluder Visitors
The text was updated successfully, but these errors were encountered: