[plt-scheme] Usage of raise-syntax-error

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Sat Oct 20 20:29:34 EDT 2007

Grant Rettke wrote:
> I was looking at using raise-syntax-error within a macro defined using
> syntax-rules.
>
> I found that when you use syntax-rules you don't have a reference to
> that syntax object to pass in to raise-syntax-error.
>
> It seems that you need to use syntax-case in order to do so, from the manual:
>
> 12.2.1  Syntax Patterns
>
> The following example shows one reason to use syntax-case instead of
> syntax-rules: custom error reporting.
>
>   
Correct.

> Is it worth cutting over from syntax-rules to syntax-case just to have
> access to that? What does it provide?
>   
Yes. And syntax-case provides much more than that.

Chongkai


Posted on the users mailing list.