hkust-taco / mlscript

The MLscript programming language. Functional and object-oriented; structurally typed and sound; with powerful type inference. Soon to have full interop with TypeScript!
https://hkust-taco.github.io/mlscript
MIT License
178 stars 27 forks source link

Add `readonly` and `const` Parsing in `ts2mls` #153

Closed NeilKleistGao closed 1 year ago

NeilKleistGao commented 2 years ago

Related Issue: #134

NeilKleistGao commented 2 years ago

I wonder if types like mut string acceptable. I made some changes in NewParser.scala because I found that we can do like this in OCaml:

val x : int ref = {contents = 42}

NeilKleistGao commented 2 years ago

We will continue to work on this PR after this syntax's implementation:

class Foo { x: T; mut y: S; ... }