[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] #line directive?

From: Anton Ertl
Subject: Re: [gforth] #line directive?
Date: Mon, 25 Jul 2011 14:42:12 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

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 ! ;


> Are
> there other gotchas that I need to watch out for?

None come to my mind.

- anton

reply via email to

[Prev in Thread] Current Thread [Next in Thread]