rescript-lang / rescript-lang/tree-sitter-rescript

Add a new node for Doc comments

Open
#202 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
60
Forks
21
PR merge metrics
No merged PRs in 30d

Description

ReScript v10.1 introduced docstrings for values, types, and modules.

  • /**Docstring*/: before value and types
  • /***Toplevel docstrins*/: top level modules

The two comments above are parsed as comment.

We can create two nodes (doc_comment and mod_comment) for both types of comments. It would be useful to do markdown injection.

Contributor guide

No contributing guide indexed for this repository

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 by locating the grammar rules that currently parse value, type, and top-level module comments as comment. Check the existing parser coverage for these comment forms, then verify that the two requested node types are distinct and support the intended markdown injection.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.