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

AST explorer in playground #110

Open
tom-sherman opened this issue Nov 14, 2020 · 1 comment
Open

AST explorer in playground #110

tom-sherman opened this issue Nov 14, 2020 · 1 comment

Comments

@tom-sherman
Copy link

As a complete newbie teaching myself Rescript, it's very difficult to know what to google for when you're not sure on some syntax. I find it very useful to past a snippet into a tool like https://astexplorer.net to find out what's going on in the syntax.

Could such a tool be added to the playground? Maybe it would be easier to integrate Recript into astexplorer itself, such is the case for Reason: https://astexplorer.net/#/gist/3412c637cd5ffe6019f772f540d14365/f0a2a0945bba8cade7a1d28896409db872a0af0e

@ryyppy
Copy link
Member

ryyppy commented Nov 16, 2020

As a complete newbie teaching myself Rescript, it's very difficult to know what to google for when you're not sure on some syntax

We recently saw this pretty nice UI idea about discovering JS operators and would be interested in designing something similar as well. Just a matter of creating a stateful component that gets an array of keywords / documentation text that gets embedded on a markdown page (advantage here is that we can use the mdx JSX functionality to edit our documentation text in markdown, passing it as a React.element to our component when rendering).

There are no plans on exposing AST functionality on the playground... not only because it would take some time to get the necessary infrastructure in place, but also because ASTs shouldn't be the way to explore the language. We are also on a tight time budget and would like to ship some more important features instead.

Edit: I added a separate ticket #111 for the implementation details of the syntax discovery widget mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants