Skip to content

Conversation

@tsnobip
Copy link
Member

@tsnobip tsnobip commented Nov 27, 2025

Module types and record optional field punning was not well supported, this is now fixed with rescript-lezer v0.7.0, eg:

module Foo: {
  type t
  let make: (~bar: option<int>=?, ~baz: option<int>=?) => t
} = {
  type t = {
    bar?: option<int>,
    baz?: option<int>,
  }
  let make = (~bar: option<option<int>>=?, ~baz=?) => {?bar, ?baz}
}

compare highlighting of this code with this PR vs master

@cloudflare-workers-and-pages
Copy link

Deploying rescript-lang-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d7af2a
Status: ✅  Deploy successful!
Preview URL: https://9d2cda3e.rescript-lang.pages.dev
Branch Preview URL: https://improve-highlighting.rescript-lang.pages.dev

View logs

@tsnobip tsnobip merged commit ff3a3c1 into master Nov 27, 2025
2 checks passed
@tsnobip tsnobip deleted the improve-highlighting branch November 27, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants