rescript-lang / rescript-lang/rescript

Add AST info capability

Open
#5,405 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

playground
Dominant language
OCaml
Stars
7.5k
Forks
485
Avg merge
1d 2h
Merged PRs (30d)
55

Description

We'd like to explore a way to be able to render a simple AST explorer on the playground interface. We may take some parts of what the ocaml-vscode extension uses (ppx_tools dumpast), adapt it to our needs and render the specific AST in a custom tab on the rescript-lang playground website.

See: https://github.com/ocamllabs/vscode-ocaml-platform/blob/master/src/ast_editor.ml

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced ocamllabs vscode-ocaml-platform/src/ast_editor.ml and the existing ReScript playground interface. Investigate how ppx_tools dumpast could provide AST data and how a custom playground tab could render it. Done means an agreed approach and a working AST explorer for the selected input.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.