Repository navigation
Add AST panel to Playground v2 - #3706
Closed
Jake Bailey (jakebailey) wants to merge 3 commits into
Closed
Jake Bailey (jakebailey) wants to merge 3 commits into
Jake Bailey (jakebailey) wants to merge 3 commits into
Conversation
Match the v1 AST viewer to help users understand parser output for the active file.
Child and cursor lookups could resolve against a newer AST than the rendered root once a compile or edit changed the worker's sources, and the hidden panel still queried the worker on every edit and cursor move. Snapshot the tree per root request so lookups stay tied to the rendered source, and query only while the panel is visible. Start the panel collapsed like the v1 AST tab, surface AST failures in the panel, keep a clicked node selected instead of jumping to its deepest descendant, and support arrow-key tree navigation. Enum reverse mappings also reported marker aliases such as FirstStatement, so node kinds now use their declared names.
Cursor positions shared by adjacent nodes should identify the node that\nstarts at that position. This keeps the AST selection aligned with\nthe source identifier under the cursor.
Contributor
|
Azure Static Web Apps: Your preview site is ready! Visit it here: https://victorious-plant-05c166c10-3706.centralus.5.azurestaticapps.net |
Member
Author
|
not a fan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let copilot make an AST viewer, let's see what it looks like