SapphireDensetsu / ypsilon

Automatically exported from code.google.com/p/ypsilon
Other
0 stars 0 forks source link

syntax-rules' <syntax rule> must have only two elements #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Ypsilon 0.9.5-trunk Copyright (c) 2008 Y.Fujita, LittleWing Company Limited.
> (define-syntax s
    (syntax-rules ()
      [(_ x) "oops" (list x)]))
> (s 1)
(1)
> (define-syntax s2
    (syntax-rules ()
      [(_ x) #f (list x)]))
> (s2 1)

error in s2: invalid syntax
  >  (s2 1)
  ..."/dev/stdin" line 1

backtrace:
  0  (syntax-dispatch patvars L0 '() (list '(_ x) (lambda (patvars) #f)
(lambda (patvars ...) ...) ...) ...)
  ..."/dev/stdin" line 3

> 

According to R6RS 11.19:
"Each <syntax rule> must have the following form: (<srpattern> <template>)"

Original issue reported on code.google.com by derick.e...@gmail.com on 22 Jun 2008 at 8:57

GoogleCodeExporter commented 8 years ago
I have fixed the bug and trunk directory is updated. Please try.
Thank you!

Original comment by y.fujita...@gmail.com on 23 Jun 2008 at 2:12