Skip to content

Releases: rescript-lang/tree-sitter-rescript

v6.0.0

26 Apr 13:23
5b90cd4

Choose a tag to compare

What's Changed

Breaking Changes

  • Separate line and block comments into distinct node types (#271) — line_comment and block_comment are now separate named AST nodes instead of a single comment node. Queries and tooling that match (comment) must be updated.

New Features

  • Dict syntax support — added dict{…} constructor, dict value access, and dict keyword handling in the scanner (#260, #274)
  • Regex literal parsing — regex expressions are now parsed as first-class nodes (#265)
  • Nested types (ReScript v12) — support for nested module types (#264)
  • Exponentiation operator ** — parsed as right-associative (#279)
  • Array spreads, variant type spreads, and newer operators (#267)
  • Explicit partial application syntax (f(a, ...)) (#239)
  • Record type spread — {...t, field: type} in type positions
  • Dynamic module import — import expressions
  • Optional fields in record patterns — {field?: value}
  • Aliased inline types and better support for aliased types (#239)
  • Generic and polymorphic types in coercion expressions (#273)
  • Separate named node for type spreads (#239)
  • GraphQL injection for rescript-relay — language injection for %relay(…) nodes
  • Decorator moved to scanner — more robust decorator parsing (#218)
  • Variant ? prefix — nullable variant constructor support
  • Pattern type annotation — patterns can carry type annotations
  • include statement improvements — broader expression support (#206)
  • try expression — allows arbitrary expressions in try bodies (#204)
  • Module paths in member_expression (#248)

Bug Fixes

  • Fix and keyword recognition in scanner (#229)
  • Fix block comment not recognized inside switch expressions (#275)
  • Fix multiple consecutive block comments in switch expressions (#275)
  • Fix module_unpack to allow type annotation on call expressions (#270)
  • Fix module type parsing (#266)
  • Fix else / else if parsing when on a new line after closing brace (#262)
  • Fix JSX element inside pipe expression (#239)
  • Fix generic type spread (#239)
  • Fix infinite loop in scanner (#226)
  • Fix lazy pattern (#226)
  • Fix functor parsing (#223)
  • Fix empty char literal (#208)
  • Fix negative decimal integer literal (#253)
  • Fix injections
  • Remove redundant seq call (#253)
  • Allow unpack as a valid identifier (#201)
  • Hex literal and decimal number improvements (#212)

Highlighting

  • Highlight fixes (#241)
  • Dict syntax highlighting
  • Fix highlighting regressions

Infrastructure

  • Bump tree-sitter to 0.26.8 (#276)
  • Update tree-sitter to 0.25.2 (#257)
  • Add playground publish pipeline (#261)
  • Fix playground build and deploy (#280, #281)
  • Update CI configuration (#258, #278)
  • Include parser.c and generated files in repository (#240, #245, #277)

New Contributors

Full Changelog: v5.0.0...v6.0.0