Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
AST location information lost when emitting yield replacement (and others) #342
See in this sample from http://sokra.github.io/source-map-visualization for a sample async function passed through Babel.
Note how the
This specific example is for
Where essentially ideally it would do
so the location information from the yield expression is carried over onto the
Depending how ambitious we want to be, this probably also comes up in a few other places where regenerator creates new AST nodes, like all of these cases:
the replacement UpdateExpression will not have the location information that the original node did, which may not be ideal.
Think I've got someone who wants to look into making a PR for this. Handling the
This seems doable! In general, statements that do not contain any
Yeah, I think it at least partially depends on how ambitious someone wants to be with fixing things. This could be split into multiple tasks. In this case at least fixing the
Right now you can set a breakpoint on