Skip to content

Does Langium gives support for AST traversing? #1803

Answered by msujew
crguezl asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @crguezl,

We don't offer a visitor for ASTs, but you can use the AstUtils.streamAllContents function 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.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by msujew
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants