This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Embedded sequence element expression in string template
- From: Per Bothner <per at bothner dot com>
- To: Ito Kazumitsu <kaz at maczuka dot gcd dot org>, kawa at sourceware dot org
- Date: Mon, 15 Sep 2014 18:30:53 -0700
- Subject: Re: Embedded sequence element expression in string template
- Authentication-results: sourceware.org; auth=none
- References: <20140915 dot 213427 dot 396734455 dot kaz at maczuka dot gcd dot org>
On 09/15/2014 05:34 AM, Ito Kazumitsu wrote:
#|kawa:2|# (define a '#("A" "B" "C"))
#|kawa:3|# &{&[(vector-ref a 1)]}
B
#|kawa:4|# &{&[(a 1)]}
1
#|kawa:5|#
I expect &{&[(a 1)]} to be "B".
As would I. This turned out to a missing $splice$ in the literals
part of a syntax-rules rule implementing the $string$ expander.
Thus the pattern for handling splices matched, when it shouldn't have.
I checked in the fix, along with a simple test-case.
--
--Per Bothner
per@bothner.com http://per.bothner.com/