New reference implementation taylanbayirli@xxxxxx (29 Aug 2015 17:38 UTC)
Re: New reference implementation Per Bothner (29 Aug 2015 20:23 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (29 Aug 2015 21:38 UTC)
Re: New reference implementation Per Bothner (30 Aug 2015 09:20 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (30 Aug 2015 10:45 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (31 Aug 2015 21:22 UTC)
Re: New reference implementation Per Bothner (31 Aug 2015 22:11 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (01 Sep 2015 08:44 UTC)
Re: New reference implementation Per Bothner (01 Sep 2015 10:44 UTC)
Re: New reference implementation John Cowan (30 Aug 2015 01:24 UTC)
Re: New reference implementation Arthur A. Gleckler (30 Aug 2015 04:35 UTC)
Re: New reference implementation John Cowan (30 Aug 2015 17:10 UTC)
Re: New reference implementation Per Bothner (30 Aug 2015 05:06 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (30 Aug 2015 08:06 UTC)
Re: New reference implementation Per Bothner (30 Aug 2015 08:25 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (30 Aug 2015 08:49 UTC)
Re: New reference implementation Per Bothner (30 Aug 2015 09:33 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (30 Aug 2015 12:35 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (22 Sep 2015 21:27 UTC)
Re: New reference implementation Per Bothner (24 Sep 2015 00:25 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (24 Sep 2015 08:26 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (26 Sep 2015 11:49 UTC)
Re: New reference implementation Per Bothner (28 Sep 2015 17:47 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (28 Sep 2015 19:54 UTC)
Re: New reference implementation Per Bothner (02 Oct 2015 06:07 UTC)
Re: New reference implementation Per Bothner (02 Oct 2015 06:36 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (02 Oct 2015 09:39 UTC)
Re: New reference implementation Per Bothner (06 Oct 2015 21:13 UTC)
Re: New reference implementation taylanbayirli@xxxxxx (07 Oct 2015 09:17 UTC)

Re: New reference implementation Per Bothner 02 Oct 2015 06:07 UTC
in Kawa only

On 09/28/2015 12:55 PM, Taylan Ulrich Bayırlı/Kammer wrote:
> Per Bothner <xxxxxx@bothner.com> writes:
>
>> Some concerns:
>>
>> * I still don't see any line number information in the output.
>
> It seems to work for some forms but not all.  I might need some help on
> this, here's the story:

The key to make syntax-source and syntax-line work in Kawa is to understand that
only pairs have source position info: The reader creates a PairWithPosition
object, where PairWithPosition is a subclass of Pair, which which has extra fields
for the file/line/column information from the start of the pair in the source code.

Thus:
   (source-info <expr>)
only works if <expr> is a pair, which is not guaranteed.  Instead you
need to call source-info the entire (test-equal ...) expression,
or some tail thereof.  The following doesn't work:
   (source-info #`(test-compare equals? . #,<rest>))
because that gives you the source-info of the (test-compare ...)
which is in execution.body.scm.  The following would probably work:
   (source-info (cddr #`(test-compare equals? . #,<rest>)))
Basically, you need to pass the <rest> list to source-info.

The attachment is one solution.  It seems to work for test-equal,
and presumably other tests based on test-compare.  test-assert
would need a similar re-write.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/