When I was first implementing source maps, I remember running into an issue where a use of stringifyNode() was messing them up. I don't remember the exact details, but I think I had to shift some of the logic around to get the mappings into the correct order. If that's right, then yes, stringifyNode() will create mappings.
-- Josh Tynjala Bowler Hat LLC <https://bowlerhat.dev> On Fri, Sep 13, 2019 at 4:08 PM Greg Dove <greg.d...@gmail.com> wrote: > Josh, I think this is a question more for you... > > In terms of source mapping... is the 'stringifyNode' pattern that is used > in some places supported? > > For example > > s = stringifyNode(myNode); //<-walks and presumably creates mappings like > normal > > write("("): //<-- some wrapper around 's' content (could be any arbitrary > length pre-pended for example > s = s.substring(2,s.length()-3); //<--- some manipulation of s > write(")") //<-- something else to wrap the stuff that changed. > > I did not look to see if this was somehow supported, so this is just a lazy > question based on my wondering if/how it was. I did not specifically test > output that uses those parts yet. >