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
BuckleScript added a primitive conditional compilation support in the ocaml compiler codebase. We can not use cppo there since it would make the patches to ocaml codebase more intrusive(including changes to the build script). Since it is a patch to the ocaml lexer, it is small and minimal so we don't have too much complexity budget as cppo.
I am wondering if we can work together to tweak the syntax to make a minimal common subset to achieve code reuse.
@bobzhang I'll note that Rust has an interesting syntax for specifying conditional compilation that does not break parsing tools by pretending to be a preprocessor; it would be possible to implement something similar in OCaml pretty easily using attributes or extension nodes.
Related issue rescript-lang/rescript-compiler#3820
BuckleScript added a primitive conditional compilation support in the ocaml compiler codebase. We can not use cppo there since it would make the patches to ocaml codebase more intrusive(including changes to the build script). Since it is a patch to the ocaml lexer, it is small and minimal so we don't have too much complexity budget as cppo.
I am wondering if we can work together to tweak the syntax to make a minimal common subset to achieve code reuse.
The syntax is documented here https://bucklescript.github.io/docs/en/conditional-compilation#docsNav
cc @ELLIOTTCABLE
The text was updated successfully, but these errors were encountered: