Closed fotonick closed 5 years ago
A visitor interface would indeed be nice to have. I wanted to add one, but I don't think I will have time in the coming weeks to do so. The design from syn
with a trait and traversal functions looks good, so it might be good idea to to copy it.
Hello, I found your crate and I really like it. I needed to traverse the ast so I went ahead and created a simple read-only visitor pattern. I can make a PR for it if you'd like.
should this be closed?
It's very nice to have a fully compliant C11 parser, but seems like the AST is fairly hard to search or manipulate at present. One possibility would be to match the
visit
,visit_*_mut
, andfold
functionality as exposed in thesyn
crate for manipulating Rust ASTs. Do you have direct plans? Or else a path that you like and would accept if submitted? Or else would you recommend providing such functionality in a separate crate?