What is the best practice to modify AST node and generate the code? #1354
Unanswered
hyphappy011
asked this question in
Q&A
Replies: 1 comment
-
Hey @hyphappy011, general string serialization (i.e. converting any AST-like representation back to DSL code) is still on our todo-list, so there's no automatic way of doing that yet. You will likely need to implement a custom code generator for this. The best solution would only perform delta updates, i.e. identify which elements you need to insert/change and only apply those text changes to the document. That way you don't accidentally delete hidden terminals like comments. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hello,


I had designed a tool to drag and drop flow chart, which is driven by json。the user drag and drop some nodes, and generate json code, and then the web page render flow graph。
now i want convert the json to langium language AST, and then convert the AST to customer DSL(defined by langium)。of course, user can writer the code, generate AST automatic,and convert AST json the render graph Code.
Is there any suggestion or example for me?
Beta Was this translation helpful? Give feedback.
All reactions