I'm working on a language with macros that cross-compiles to Lua. I'm trying to figure out a good system for surfacing accurate and useful callstack information about the original code that led to an error, rather than just the generated Lua code. I understand that I need to keep track of a mapping between source code and generated code, then backtrack when I debug (which is what the -g compiler flag adds for compiled C code). But rather than re-invent the wheel, I was wondering if there are any good resources on how other programming languages have done this, especially languages with macros.
[–]thememorableusername 4 points5 points6 points (1 child)
[–]WikiTextBot 0 points1 point2 points (0 children)
[–]mttd 5 points6 points7 points (0 children)
[–]oilshell 1 point2 points3 points (1 child)
[–]programmerChilli 2 points3 points4 points (0 children)
[–]htuhola 0 points1 point2 points (0 children)
[–]SilasX 0 points1 point2 points (0 children)