Skip to content
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

Handler for unknown nodes #1083

Open
brettz9 opened this issue Apr 18, 2022 · 0 comments
Open

Handler for unknown nodes #1083

brettz9 opened this issue Apr 18, 2022 · 0 comments

Comments

@brettz9
Copy link

brettz9 commented Apr 18, 2022

Hi,

I've made an experimental parser to support treating JSDoc blocks as full-blown nodes. I adjust the visitor keys of regular nodes to accept a jsdoc property which holds the structured AST (or in the case of Program, a jsdocBlocks array of JSDoc AST for the sake of unattached comments).

I'm wondering if you might be open to providing a mechanism such that either you optionally support these experimental nodes if you think this may be something of wider interest, or so that one could customize the printing behavior, e.g., to pass in one's own stringifiers.

It looks like there was openness expressed at benjamn/ast-types#286 (comment) , and a connected issue at #219 , but as that looks to be more about customizing the style of printing rather than a fallback for unknown nodes, I thought I'd file this to express my wish for such a use case.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant