-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose parents in regexp vistor #16
Comments
@connor4312 Couldn't you use the function getParents(node: AST.Node): AST.Node[] {
const path: AST.Node[] = [];
let n = node.parent;
for (; n; n = n.parent) {
path.push(n);
}
return path.reverse();
} |
ota-meshi
pushed a commit
to ota-meshi/regexpp
that referenced
this issue
Jan 14, 2023
BREAKING CHANGE: Requires Node@^12.0.0 || ^14.0.0 || ^16.0.0 || >=18.0.0
Hi @connor4312! Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/regexpp For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now in the visitor it's not possible to see the chain of parent nodes, unless you add a handler for every single node type and maintain your own array. It'd be useful to pass the parents in as a second parameter.
The text was updated successfully, but these errors were encountered: