-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Document docstrings / doc headers in ReScript #158
Comments
ocaml-community/omd#215 see this PR on how to convert markdown to ocamldoc. Might be helpful. Almost all features map pretty nicely including cross referencing. |
Is there any difference between
Any way to reduce the usage of |
@bobzhang Currently, I discussed with @IwanKaramazow to re-introduce the old Reason functionality of using e.g. how should the parser treat comments attached to variant constructors (to allow doc generation for each variant). So ultimately, this |
This issue was created to clarify the situation regarding ReScript docstrings. It's probably worth creating a temporary doc explaining the situation until the final spec for handling docstrings is implemented.
Right now in ReScript, we don't implement any special comment attaching behavior (not a big deal, it's mostly about spec'ing out how users should document ReScript code), so we still rely on using
@ocaml.doc
decorators.Example:
Upcoming spec (short description):
Our plan is to keep docstring logic minimalistic and easy to deal with (while being useful in editors, like vscode):
Here is a potential example on how it might look like:
There will be more cases to consider, such as where to put comment strings for variants etc, but this will be part of a more thorough spec (\cc @IwanKaramazow for syntax related comments)
The text was updated successfully, but these errors were encountered: