Skip to content

How can I define a visitor which targets every node on AST & some way to visit all the CommentLines in my code? #12094

Answered by hzoo
MatherLyn asked this question in Q&A
Discussion options

You must be logged in to vote

if you use https://babeljs.io/docs/en/babel-traverse on it's own you can define a catch all enter handler, otherwise you need to specify everything (could use aliases but don't really provide that much) also can do things like "Identifier|FunctionExpression" as a visitor

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MatherLyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants