show example of nested syntax matching

This commit is contained in:
Jon Rafkind 2010-06-28 14:33:00 -06:00
parent c7772cbf08
commit ccac23d648

View File

@ -168,6 +168,13 @@ A syntax object matches a @scheme[pattern] as follows:
(syntax-case #'(ops 1 2 3 => +) (=>)
[(_ x ... => op) #'(op x ...)])
(syntax-case #'(let ([x 5] [y 9] [z 12])
(+ x y z))
(let)
[(let ([var expr] ...) body ...)
(list #'(var ...)
#'(expr ...))])
]}
@defform[(syntax-case* stx-expr (literal-id ...) id-compare-expr