eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
750 stars 68 forks source link

Provide a "Syntax Tree View" pane in VSCode #1752

Open ebousse opened 6 days ago

ebousse commented 6 days ago

The Langium Playground provides a fantastic "Syntax Tree View" in the right pane which instantly shows the AST obtained when parsing the program written in the middle pane. This is a small tool very useful for many purposes: debugging, teaching, writing a visitor using an example AST, etc.

image

My suggestion would be to make this "Syntax Tree View" part of the Langium VSCode extension (or part of each DSL extension generated with Langium), which could be opened in one click when editing a program of the DSL being made.

spoenemann commented 2 days ago

Maybe we could provide this using a tree view in VS Code. That would be considerably easier than creating a Webview. Including this as an optional part in the Yeoman generator might be a good approach.

ebousse commented 2 days ago

Indeed, great idea, a native tree view sounds even better!