Printing and AST into text #683
-
Hi, is there a way to serialise an AST back into its concrete syntax representation? What I have seen right now is that the formatter only work if a AST node has a CST node attached to it. Otherwise the formatters completely ignore them. Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi, a serializer does not exist yet for Langium, but there are thoughts about creating such a project. We could do this in a separate package Current solution until the new package is available: hand-write an AST-to-text generator in the same way as you would write other code generators. CC @sailingKieler @msujew @danieldietrich @pluralia @insafuhrmann |
Beta Was this translation helpful? Give feedback.
Hi, a serializer does not exist yet for Langium, but there are thoughts about creating such a project. We could do this in a separate package
langium-stringify
(separate because Langium's base functionality does not depend on this rather complex feature).Current solution until the new package is available: hand-write an AST-to-text generator in the same way as you would write other code generators.
CC @sailingKieler @msujew @danieldietrich @pluralia @insafuhrmann