syntax
syntax copied to clipboard
ReScript's syntax as a standalone repo.
Regarding issue https://github.com/rescript-lang/rescript-compiler/issues/5735 This PR improves the parsing and printing attributes of functions and arguments so that it makes the implementation simple and clear for future development extensibility.
From https://github.com/rescript-lang/syntax/issues/686#issuecomment-1279897564: ```rescript (await (server->start))->ignore ``` loses the `await` on reformat: ```rescript server->start->ignore ```
```rescript await server->start ``` is parsed/printed as ```rescript (await server)->start ``` I would have expected it to mean ```rescript await (server->start) ```
```res ``` => ```res ```
Currently, `...` is only allowed in the tail position, `list {1,2,... tail}`, For example: ```res let l = a => list{1,2,...a} // works ``` ```res let l = a =>...
Spoke to @cristianoc and it might be useful to comment/document in the code what parts of the AST will never actually have anything generated from it. Example: `Pexp_function`, `Pstr_class`, etc.
```rescript @react.component let make = (~html) => { } ```