support local open in variable declarations #6

Open
opened 2026-03-22 13:12:43 +01:00 by christian · 0 comments
Owner

The following syntax currently can be parsed:

open Css

let%css bg_color =
  [ (".light-mode", rgb 255 0 0); (".dark-mode", rgb 255 255 0) ]

But if we're using a local open instead, it does not parse:

let%css bg_color =
  let open Css in
  [ (".light-mode", rgb 255 0 0); (".dark-mode", rgb 255 255 0) ]
The following syntax currently can be parsed: ```ocaml open Css let%css bg_color = [ (".light-mode", rgb 255 0 0); (".dark-mode", rgb 255 255 0) ] ``` But if we're using a local open instead, it does not parse: ```ocaml let%css bg_color = let open Css in [ (".light-mode", rgb 255 0 0); (".dark-mode", rgb 255 255 0) ] ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
christian/ppx_stylesheet#6
No description provided.