eclipse-langium / langium-website

Source of langium.org
https://langium.org/
MIT License
14 stars 34 forks source link

Visualize the Playground AST #204

Open emilkrebs opened 10 months ago

emilkrebs commented 10 months ago

Visualize this like the DomainModel example with interactivity: image

spoenemann commented 10 months ago

I would prefer to keep the JSON-like syntax because it's more precise and it can be copied into a JS/TS file to test something with it. I don't see much value in a graphical representation in this case.

montymxb commented 10 months ago

I would think we would keep the JSON syntax, but also provide an additional context to view the AST structure that is not just textual.

I would suggest another way to look at this as well. The value lies in garnering more interest around Langium & ASTs by providing some way other than JSON to inspect the results. Especially in demonstrating alternative ways that ASTs can be understood & observed for those who are not familiar with them (consider newcomers to Langium or DSL design in general). The intended audience here is not just experts, who are seeking textual tools, but newcomers who are seeking additional aides (like visual aides) to help learn more about this field. In this context, I think this could make a worthwhile addition, and is least worth investigating for this purpose.

spoenemann commented 10 months ago

Ok if it's an optional view that is added on demand we could do that.

montymxb commented 10 months ago

Yep, that's the plan, as the existing output is very important to retain. In the end we can observe how this supplemental approach works in practice, and see if it makes sense to continue in this direction.