-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose source mapping through JSGenApi #8625
Comments
Both |
Yes, but I'm looking to get that information for every sub expression as well. I thought of going through the expressions but it essentially means reimplementing gen_exp and gen_value of genjs. |
|
That would help iterating and finding source positions. But it doesn't help that much finding generated code positions (unless I'm not thinking this through). In the scenario where I'd use JSGenApi to generate expressions I can get the code, then iterate through sub expressions. But to have an idea of position in the generated code (which was already generated for it's parent expr) I'd have to generate code again and then somehow string search its position in the parent code. |
Oh right, now I understand. I'm not sure this can be made easily accessible. The actual positions in the generated code can only be determined once the code is generated, since a change in any expression results in everything after it in the file changing positions as well … Perhaps you could insert |
I was looking into generating split js files(#5831). Hxgenjs does just that using a custom generator but provides no sourcemap support. I realize adding it involves tracking all generated code positions. Couldn't see where to get at that data for |
Would love to get access to source mapping data for generated code by JSGenApi (generateValue & generateStatement).
The text was updated successfully, but these errors were encountered: