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