Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualize the Playground AST #204

Open
emilkrebs opened this issue Nov 14, 2023 · 4 comments
Open

Visualize the Playground AST #204

emilkrebs opened this issue Nov 14, 2023 · 4 comments
Labels
enhancement New feature or request playground Issues related to the playground functionalits

Comments

@emilkrebs
Copy link
Contributor

Visualize this like the DomainModel example with interactivity:
image

@emilkrebs emilkrebs added playground Issues related to the playground functionalits enhancement New feature or request labels Nov 14, 2023
@spoenemann
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@montymxb
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request playground Issues related to the playground functionalits
Projects
None yet
Development

No branches or pull requests

3 participants