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

Add a more structured demangling method #2

Open
khuey opened this issue Nov 6, 2022 · 2 comments
Open

Add a more structured demangling method #2

khuey opened this issue Nov 6, 2022 · 2 comments

Comments

@khuey
Copy link
Contributor

khuey commented Nov 6, 2022

cpp_demangle has a structured_demangle method that takes a limited form of a visitor trait that gets notified when certain AST nodes are traversed. The way the visitor trait is designed, emitted characters can be tied to certain AST nodes, allowing the consumer to do things like elide template arguments by default.

I'd like to introduce something similar to ast-demangle. Would you be satisfied with a limited visitor trait like cpp_demangle has or would you prefer something that's called for each AST node?

@EFanZh
Copy link
Owner

EFanZh commented Nov 21, 2022

@khuey: Do you mean you need a method to traversal the symbol structure without building the Symbol object?

@khuey
Copy link
Contributor Author

khuey commented Nov 23, 2022

No, I want to produce the Symbol and then see which nodes output which characters (without duplicating that logic myself).

What I'm using right now is in https://github.com/Pernosco/ast-demangle if you want to take a look.

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

2 participants