Closed void4 closed 4 years ago
Did you try using that visitor for horast and were there errors? It might work just like that. If there were errors, try using the typed_ast.ast3.NodeVisitor, because AST in horast is based on typed_ast. There is no separate implementation of NodeVisitor in horast.
Although I don't currently explicitly test if the visitors from upstream work as expected in horast, I might include such tests in the future if it doesn't.
And, as far as I remember, the NodeVisitor in typed_ast works exactly the same as the one in ast. As a side note, typed_ast codebase was merged into CPython, so ast module in Python 3.8 will become what is now typed_ast. At that point I plan to adapt horast to not work with typed_ast anymore, as the module will become obsolete. But that's a thing for the future.
I'm closing this because of no new activity for a long time. Please reopen if anything about this problem is unclear.
Can you please provide an example of an ast.NodeVisitor equivalent in horast? This library looks very useful because it includes comments. I want to use it to automatically generate documentation from source, since tools like sphinx only seem to include function doc strings.