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
A first step could be to see how a few examples are currently mapped to the AST, and where is the code that deals with the output of this mapping.
Then find a more direct representation of the same information and modify the above code. It might be that a new expression desc, such as Pexp_jsx_element is completely processed by the ppx before it ever reaches the type checker, so is never used by later phased of the compiler (a bunch of places where that expression will never reach).
So I guess the first step is finding out what the current code path are.
Like @cristianoc says, I would also guess that the type checker won't have to care about JSX given that it's transformed to and type checked as regular function calls.
Activity
nojaf commentedon Feb 6, 2025
So, my initial thoughts on this would be:
expression_desc
with a new typePexp_jsx_element
.cristianoc commentedon Feb 6, 2025
A first step could be to see how a few examples are currently mapped to the AST, and where is the code that deals with the output of this mapping.
Then find a more direct representation of the same information and modify the above code. It might be that a new expression desc, such as
Pexp_jsx_element
is completely processed by the ppx before it ever reaches the type checker, so is never used by later phased of the compiler (a bunch of places where that expression will never reach).So I guess the first step is finding out what the current code path are.
zth commentedon Feb 6, 2025
Like @cristianoc says, I would also guess that the type checker won't have to care about JSX given that it's transformed to and type checked as regular function calls.