On Sun, Jul 24, 2011 at 09:10:33PM -0400, Josh Grams wrote: > I have been doing a bit of literate programming, and so of course then I > want gforth to report errors relative to the original source and not the > generated files. After a bit of poking around in the source, I came up > with the following (which is easily wrapped in a parsing version that > handles the C #line syntax): > > : >sourcefile ( u.line# c-addr u -- ) > 2dup included? 0= if 2dup add-included-file then > loadfilename 2! 1- loadline ! ;
Nice. > Are > there other gotchas that I need to watch out for? None come to my mind. - anton
