rescript-compiler
rescript-compiler copied to clipboard
The compiler for ReScript.
See e.g. https://github.com/rescript-lang/rescript-compiler/pull/5599
E.g. `let c = '❤️'` gives ``` FAILED: src/DocComments.ast Syntax error! /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:8-9 1 │ let c = '❤️' 2 │ This let-binding misses an expression Syntax error! /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/DocComments.res:1:10 1 │...
This PR fixes #5598 The exception thrown by `JSON.stringify` will be handled with try-with, instead of renaming it. The renaming would cause a breaking change, so we won't do that....
- `.bs.mjs`, `.bs.cjs` to fill the gap between `.bs.js` and `.mjs` - `.res.js`, `.res.mjs`, `.res.cjs` to assist BS → ReScript rebranding
Does it make sense to explore the if-let syntax more seriously? Here's some imaginary example where several different language features could be handled at the same time: https://github.com/cristianoc/rescript-compiler-experiments/pull/1/files#diff-81c7d8224cb32d4696c8931f3c4fa65fd0e1a0b036e6fe9b4fffd730d86d3412R176 Basic, non-nested...
Just saw something like this in a codebase: ```res %%private let x = 42 ``` This usage of `%%private` is allowed by the parser/compiler, but has no effect at all....
There is currently no way to represent an empty record with optional fields. The V4 PPX gets around this by adding `key` to every record, so the empty record is...
The following code (without an optional field) ```rescript type t = { a: string, b: int } let x = { a: "test", b: 1 } let y = {...
In both ReScript 10.0.0-rc.1 and ReScript 9.1.4, ```rescript type options = { a: int, b: int, } @module("some-module") external func: options => unit = "func" let test = a =>...
Thank you for filing! Check list: - [x] Is it a bug? Usage questions should often be asked in the [forum](https://forum.rescript-lang.org) instead. - [ ] Concise, focused, friendly issue title...