You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First announcements on our latest efforts for a better syntax parser.
10
10
---
11
11
12
12
> **Update / August 13th 2020:**
13
-
> BuckleScript is now called ReScript, more infos [here](/blog/bucklescript-is-rebranding)
13
+
> BuckleScript is now called ReScript, more infos [here](/blog/bucklescript-is-rebranding).
14
14
15
15
## What's new?
16
16
17
-
The release of BuckleScript 8.1 contains a new important addition: we've rewritten the Reason syntax parser and printer.
17
+
The release of BuckleScript 8.1 contains a new important addition: we've rewritten the vendored Reason syntax parser and printer.
18
18
19
19
The rewrite was done by a community member of ours, [Maxim](https://twitter.com/_binary_search). Maxim was a main contributor to the old Reason repo, and together we've reached the conclusion a while ago that the codebase needed a revamp. After wrestling with it for the longest time, we've settled on a low-key rewrite.
20
20
21
-
We apologize for having kept this under wrap; syntax discussions have always been churny, so we didn't want to prematurity announce something before it's ready. After testing this extensively; we now deem it solid enough for your consumption.
21
+
Syntax discussions have always been churny, so we didn't want to prematurity announce something before it's ready for proper critiques. After testing this extensively; we now deem it solid enough for your consumption.
22
22
23
23
**Here's what you need to know:**
24
-
- The new syntax comes directly with your BuckleScript 8.1 installation. You won't have to install anything else. It does not depend on the old `refmt`.
25
-
- There are a few differences in syntax, documented [here](/docs/manual/v8.0.0/migrate-from-bucklescript-reason).
26
-
-This is BuckleScript-only currently.
27
-
-Our editor support is currently limited; we'd like to take this occasion to clean it up. In the meantime, if you upgrade your [VSCode](https://marketplace.visualstudio.com/items?itemName=jaredly.reason-vscode) or [Sublime Text](https://github.com/reasonml-editor/sublime-reason) plugin, you should get the proper highlighting.
28
-
-We've made a refmt-to-new-syntax converter that we'll release later. We'd like you to test it on small bits of code for now; a wholesale conversion at this stage would be a bit too rushed.
24
+
- The new syntax comes directly with your BuckleScript >=8.1 installation. You won't have to install anything else. It does not depend on the old `refmt`.
25
+
- There are a few differences in syntax between the Reason syntax, documented in the [migration docs](/docs/manual/v8.0.0/migrate-from-bucklescript-reason).
26
+
-The migration docs also guides you toward converting your codebase to the new syntax, file by file or project by project.
27
+
-This syntax isn't available on Reason native compilation.
28
+
-As always, check our documentation's Editor Plugins section for your editor's support of this new syntax.
29
29
- To avoid conflict, we've employed the new file extensions `.res` and `.resi`, for implementation and interface respectively.
30
-
- This means the syntax sits alongside the existing Reason and ml syntax. We'd like to avoid eagerly deprecating the other syntaxes, but if this new one works well, we'd like to move onto more ambitious territories. Either way: your existing code will keep working!
31
-
- Issues for the new syntax should go to [https://github.com/BuckleScript/syntax](https://github.com/BuckleScript/syntax) (to lessen the load on the main BuckleScript repo)
30
+
- This means the syntax sits alongside the existing Reason and ml syntax. Your existing code will keep working!
31
+
- Issues for the new syntax go [here](https://github.com/rescript-lang/syntax).
12 │ let message = jHello ${userName->Js.String.toUpperCase}!`
66
-
13 │
67
-
14 │ type student<'extraInfo> = {
68
-
69
-
Did you forget to close this template expression with a backtick?
68
+
Did you forget to close this template expression with a backtick?
70
69
```
71
70
72
-
The short version: install [email protected], create a new `.res` file in your new/existing project, then have fun!
71
+
The short version: install [email protected] or later, create a new `.res` file in your new/existing project, then have fun!
73
72
74
-
Quality-wise, the parser now features excellent error messages, is noticeably faster on projects of all scales, and should be much more robust. The rearchitecture also allows us to release in a more professional manner. We'll go into more details on the motivation and architecture in our upcoming blog posts; these will prove to be **very** interesting and illuminating for all engineers. Stay tuned! In the meantime, for any immediate questions, please ask in this [Discourse thread](https://reasonml.chat/t/bucklescript-8-1-new-syntax-option/2379).
73
+
Quality-wise, the parser now features excellent error messages, is noticeably faster on projects of all scales, and should be much more robust. The rearchitecture also allows us to release in a more professional manner. We'll go into more details on the motivation and architecture in the future when the syntax pans out well; hopefully, these will prove to be **very** interesting and illuminating for all engineers. Stay tuned!
75
74
76
-
Maxim's effort is our community at its best and we hope that you'll enjoy his work as much as we did testing it!
75
+
Maxim's effort is our community at its best and we hope that you'll enjoy his work as much as we did!
0 commit comments