-
Notifications
You must be signed in to change notification settings - Fork 218
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? #4636
Comments
These are all very specific to the AST that they are exploring. And this should not be too hard to build ourself. I'm planning on doing that. |
Some parts! Though I had thought the concept of "put your cursor in an editor and highlight the corresponding items in the AST graphs" seemed quite general... |
Do all of the IRs have span fields with which one can link to the source code? Why does it have to be in a web language? Would a python tool be ok? You could potentially have it run in browser with pyodide or run serve a web page. |
Yes! At least LR, PR & PL do (though the latter aren't by default serialized, easy to change)
Sure, whatever works; I had thought that this sort of thing would be best in a browser and browsers were easiest in JS, but no view beyond that... |
I've added "probes" that log data from the compilation to a "debug log" that can be serialized to either a json or html file. That file can be opened with a browser directly, so there is no need to have an HTTP server even. |
Haven't looked deeply at this project, but saw the link on another issue. Not sure if it's a good fit, but this one by @sxzz is more actively maintained: |
What's up?
It would be really nice to be able to explore our AST in something a bit more interactive / "zoom-able" than reading flat YAML. When working on
prqlc fmt
I would have found this v helpful. I briefly discussed this on the most recent dev call with @aljazerzen.I checked out https://astexplorer.net/ — it's pretty nice — you can zoom in & out to different parts of the AST by unfolding & folding the tree; it uses highlights to show where the AST comes from in the code.
It doesn't support multiple stages — it would be even better to have columns with each stage and have the highlighting working across them. It also seems somewhat unmaintained now (fkling/astexplorer#625), and I couldn't managed to get it to build on my local machine.
So:
The text was updated successfully, but these errors were encountered: