pull out syntax punctuations too
svn: r15099
This commit is contained in:
parent
62325eb7cf
commit
2104900bb6
|
@ -417,12 +417,16 @@
|
|||
(define (get-rprefixes) ; return punctuation prefixes in reverse
|
||||
(let loop ([r '()])
|
||||
(let-values ([(line col pos) (port-next-location inp)])
|
||||
(cond [(*match1 #rx#"^(?:'|`|,@?)")
|
||||
(cond [(*match1 #rx#"^#?(?:'|`|,@?)")
|
||||
=> (lambda (m)
|
||||
(let ([sym (cond [(assoc m '([#"'" quote]
|
||||
[#"`" quasiquote]
|
||||
[#"," unquote]
|
||||
[#",@" unquote-splicing]))
|
||||
(let ([sym (cond [(assoc m '([#"'" quote]
|
||||
[#"`" quasiquote]
|
||||
[#"," unquote]
|
||||
[#",@" unquote-splicing]
|
||||
[#"#'" syntax]
|
||||
[#"#`" quasisyntax]
|
||||
[#"#," unsyntax]
|
||||
[#"#,@" unsyntax-splicing]))
|
||||
=> cadr]
|
||||
[else (internal-error 'get-rprefixes)])])
|
||||
(loop (cons (datum->syntax #f sym
|
||||
|
|
|
@ -255,6 +255,7 @@ wrapping the @italic{whole} expression.
|
|||
|
||||
@scribble-examples|==={
|
||||
@`',@foo{blah}
|
||||
@#`#'#,@foo{blah}
|
||||
}===|
|
||||
|
||||
When writing Scheme code, this means that @litchar|{@`',@foo{blah}}|
|
||||
|
|
Loading…
Reference in New Issue
Block a user