MetaScript icon indicating copy to clipboard operation
MetaScript copied to clipboard

Missing a "line preserve" option

Open marcominetti opened this issue 10 years ago • 3 comments

When using with other compilers that feature sourcemap support, lines are no preserved against original source code causing line mismatch during debugging or code coverage analysis.

Can you add this option?

marcominetti avatar Apr 27 '15 08:04 marcominetti

Unfortunately, I don't have the time atm to dig though full fledged source map generation, which I assume would be required here. If you know of any tools to make this easier, let me know. I am also always happy to see a PR :)

dcodeIO avatar Apr 27 '15 14:04 dcodeIO

Hi! I'll review your code and try to assess whether is quick to integrate the sourcemap-related tools... And definitely wait for a PR... ;)

Do u use any AST parser or plain string-handling stuff?

marcominetti avatar Apr 27 '15 16:04 marcominetti

The source is actually quite short. Here is how it compiles: https://github.com/dcodeIO/MetaScript/blob/master/MetaScript.js#L79

dcodeIO avatar Apr 27 '15 16:04 dcodeIO