-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
some people want to ignore some node.
I think some refactor step to achieve.
1st step
change tree function.
use switch statement to call specific func to using map to get specific func.
before
switch n.(type) {
case *ast....
}
after
f := functions[fmt.Sprintf("%T", node)]
f(w, ....)
2nd step
create empty function to pass node.
3rd step
set pass function to map when ignore node is given.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels