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

Sandbox AST Dictionary #16

Closed
ianjennings opened this issue Jul 22, 2020 · 3 comments · Fixed by #35
Closed

Sandbox AST Dictionary #16

ianjennings opened this issue Jul 22, 2020 · 3 comments · Fixed by #35
Assignees
Labels
Babel Babel specific knowledge needed Interface
Milestone

Comments

@ianjennings
Copy link
Member

From sandboxes created by wlawt: babel#3

Feature request for Sandbox

The problem is: developers contributing first time to Babel may/may not understand the concepts being used

Outputs we'd consider:

  • Be able to highlight input code and map to AST
  • Mapping between AST nodes to high-level examples (i.e. ; is an EmptyStatement)
  • For each mapping we can have definitions that explain what an EmptyStatement is and other examples that a developer can cycle through

Design spec:

  1. Lots of definitions & examples can be referenced from the Babel parser and handbook
  2. The highlighting should work similar to https://astexplorer.net/

UI Design:

Other possibilities:

  • When searching for "other examples", the added possibility to search through Github and find what other contributors previously used as examples/test cases
@ianjennings
Copy link
Member Author

From https://hackmd.io/js_I3MpUR8GuSvv55DOnGw:

@ianjennings
Copy link
Member Author

How do we parse definitions?

We essentially need to turn these into JSON:

  1. Lots of definitions & examples can be referenced from the Babel parser and handbook
  2. The highlighting should work similar to https://astexplorer.net/

@ianjennings
Copy link
Member Author

Ok, so I should parse specs.md into a JSON
And that can be used later to generate the hovering definition
And if we can incorporate the ASTExplorer then we will be able to tell the node type

Depends heavily on #2

@janiewang26 janiewang26 linked a pull request Jul 29, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Babel Babel specific knowledge needed Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants