News for hackers. Stuff that matters.
Re:Carp: A statically typed Lisp, without a GC, for real-tim... by andybest on Friday April 13, 2018 @11:18AM (#16830775)
Interesting, I wasn't aware of the #line directive, thanks!

Yes, you would need to keep track of the source locations for each node in the AST. There is a nice example in the LLVM Kaleidoscope tutorial here: https://llvm.org/docs/tutorial/LangImpl09.html

Re:Carp: A statically typed Lisp, without a GC, for real-tim... by gnulinux on Saturday April 14, 2018 @05:16AM (#16836603)
Bison and lex use #line to make generated C/C++ code (lexer, parser) debuggable, or at least their GNU implementation does, I don't know about other implementations.