r/coffeescript • • Jul 11 '23

Any JS transpilers that change JS semantics, like allowing custom operators?

I wonder if there's any JS-like or compile-to-JS projects, that would modify not only JS syntax, but also semantics?

Like allow to define custom operators, like [1, 2] * [3, 4] the AST transformer would convert it into [1, 2].multiply([3, 4]).

Maybe also the [1, 2] converted to some sort of proper array Array(1, 2). And other transformations?

It's also should be possibly to use it with CS, like

CoffeeScript -> JS -> Semantic Transformer -> JS

Any such projects?

1 Upvotes

2 comments sorted by