John Barton (2014-03-08T17:10:22.000Z)
domenic at domenicdenicola.com (2014-03-20T16:23:26.806Z)
You may like to take a look at how the traceur compiler ( https://github.com/google/traceur-compiler) works. It allows one to write code like var statement = parseStatement `${result}[${index}++] = ${expression};`; where the ${} syntax surrounds variables from the caller that are substituted into the string. In our case the result 'statement' is an AST but it could source code just as well. And source maps work fine for our code. Well as fine a source maps ever work ;-)