Hacker News new | ask | show | jobs
by rerdavies 16 days ago
I've done that for transpilation from SAOL (an MPEG 4 historically curious language) to C++. It does make it incredibly easy to write the compiler.

The big drawback that I never managed to sort out is how to integrate with visual debuggers. How to generate GDB source mappings (or .PDB source mappings) that reference the original LanguageX source files.

So you end up with a toy language that is un-debuggable. Which is not nearly as much fun as it should be.

1 comments

if you compile to c# you can use #line directives to get integration with debuggers. it is really simple. for debug builds you can do an ANF pass and generate debugging locations for every different expression.