-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Syntax Widget: Content Overview #162
Comments
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 |
@ryyppy for the |
@illusionalsagacity something like |
Short note: I reorganized / refined the item list for language constructs and introduced some |
I found a decorator not on your list: |
👋 Recently discovered this project and looking forward to learning and using rescript!
|
@kellydanma sure, go ahead. Just keep an eye out for any existing PRs when submitting new content 👍 |
I think |
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 |
updated |
|
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 |
The list is not up to date anymore.
The following can be added to the widget as well:
|
|
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?
misc_data/syntax
directory for structure and inspirationmaster
) as soon as possible, so other contributors see what's currently being worked onContent Overview
Decorators:
@val
@module
@obj
@scope
@get
@get_index
@set
@set_index
@uncurry
@send
@string
@int
@unwrap
@new
@deriving
@as
@variadic
@inline
@meth
@return
@unboxed
@this
@@warning
@send.pipe
(deprecated)@genType
@react.component
@deprecated
@ignore
@tag
Operators:
->
|>
++
+
,+.
-
,-.
/
,/.
*
,*.
mod
:=
(ref value assignment):>
(type coercion)||
boolean OR&&
boolean AND!
boolean NOTLanguage Constructs:
_
(placeholder, all scenarios like pipe, ignore value)type
let
(let binding)(Apparently not part of the language, although I strongly disagree not including it, because it's user-facing... see Document %external(\"SomeValue") #351)let \"\"
(let binding with invalid identifier name)if
/else
external
() => {}
(function)(.) => {}
(curried function)open
(alsoopen!
)include
(+include module type of ...
)module
[ #value ]
(polyvar definition)switch
(pattern matching: exceptions, values, variants, when clause..)'a
(generic placeholder)+'a
(placeholder for covariance)(Item: Comparable) => {}
(module functor)<MyComponent>
(JSX)""
(string)j`` (implicit string interpolation)(deprecated)' '
(single quote = char)for
loopwhile
loop~
labelled arguments|
or patterns?:
ternary...
(spread, all scenarios like array, list, record, polymorphic variant)Type Specifics:
{.}
(empty object type){ "key": "value" }
(Object type){..}
(includingtype obj<'a> = {.. "a": string } as 'a
) aka Open object typeref
(mutable type)exception
(exn
)module type
module type of
(see playground link)Builtin Functions:
ignore
Extension Points:
%%raw
%raw
%identity
%debugger
%re
Build System Specials:
__POS_OF__(string)
__LINE__
__LOC__
__FILE__
__LOC_OF__
__MODULE__
__LINE_OF__
The text was updated successfully, but these errors were encountered: