rescript-association / rescript-lang.org

Official documentation website for the ReScript programming language
https://rescript-lang.org
MIT License
1.85k stars 245 forks source link

Syntax Widget: Content Overview #162

Open ryyppy opened 3 years ago

ryyppy commented 3 years ago

Last update: June 14th, 2024

We've got the Syntax Lookup Widget skeleton (#114 ) in place now, so we need content writers to cover quick glance overviews over each topic.

This issue is here to collect a list of language constructs we should definitely cover. Feel free to propose more topics if something is missing. I will continuously update this issue for completeness reasons.

How to work on this?

Content Overview

Decorators:

Operators:

Language Constructs:

Type Specifics:

Builtin Functions:

Extension Points:

Build System Specials:

ryyppy commented 3 years ago

Lots of things already shipped thanks to @kevanstannard's help!

We already got some Operators / Decorators documented, so I think it's already useful enough to merge it into master.

In case you want to open a new PR to add more content, please use master as your target branch in the future.

illusionalsagacity commented 3 years ago

@ryyppy for the := operator, is there a formal name for it? I have referred to it as the ref assignment operator in a branch, will publish a draft PR shortly

ryyppy commented 3 years ago

@illusionalsagacity something like ref value assignment sounds good to me.

ryyppy commented 3 years ago

Short note: I reorganized / refined the item list for language constructs and introduced some Type Specifics category, just to separate the value / type space syntax little bit more

fhammerschmidt commented 3 years ago

I found a decorator not on your list: @deprecated.

kellydanma commented 3 years ago

👋 Recently discovered this project and looking forward to learning and using rescript! I didn't find PRs for the following language constructs, could I work on them:

ryyppy commented 3 years ago

@kellydanma sure, go ahead. Just keep an eye out for any existing PRs when submitting new content 👍

Minnozz commented 3 years ago

I think {..} is missing from the list

Minnozz commented 3 years ago

Changes that can be applied to the OP:

Tip: you can use the following GitHub syntax to create a task list with clickable checkboxes:

- [ ] Not done
- [x] Done
ryyppy commented 3 years ago

updated

Minnozz commented 3 years ago

%re() (RegExp literal) is missing from the list

frou commented 2 years ago

I'd like to humbly suggest that such documentation shouldn't use a font with "programming ligatures". They're something that some people choose to use in their own customised editors, but it's not appropriate for documentation, which should always show the concrete syntax of the language.

Screenshot 2021-11-11 at 16 55 50
Kingdutch commented 1 year ago

Even though it may not be complete, can we make the syntax widget more discoverable with a link from the API docs or the header itself?

I only recently found out this exists (and I've been doing ReScript for a while now) but even the current version can safe me a ton of time (e.g. to remember how to use %re or to find decorators without first finding the decorator overview page). This is an amazing tool for anyone using ReScript and should be front and center.

fhammerschmidt commented 1 year ago

The list is not up to date anymore.

The following are merged but not checked:

The following can be added to the widget as well:

fhammerschmidt commented 1 year ago

Update: I would remove j`` from the list, since it's deprecated