|
I am new to Langium. Is there any support for AST traversing? A way to generate a Visitor Module for the generated AST? |
Answered by
msujew
Feb 1, 2025
Replies: 2 comments
|
Hey @crguezl, We don't offer a visitor for ASTs, but you can use the |
0 replies
Answer selected by
msujew
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @crguezl,
We don't offer a visitor for ASTs, but you can use the
AstUtils.streamAllContentsfunction instead. Just pass the root node of your document in there and it will yield a stream of all elements within the root node. You can then apply a visitor pattern on top of that if you want to.