change syntax/loc to leave alone a template that contains just a pattern variable
svn: r3601
This commit is contained in:
parent
96bfdf5101
commit
8fa40a972a
File diff suppressed because it is too large
Load Diff
|
@ -1681,7 +1681,7 @@
|
|||
EVAL_ONE_STR(
|
||||
"(module #%stxloc #%kernel"
|
||||
"(require #%stxcase #%define-et-al)"
|
||||
"(require-for-syntax #%kernel #%stxcase)"
|
||||
"(require-for-syntax #%kernel #%stxcase #%sc)"
|
||||
"(-define-syntax syntax-case*"
|
||||
"(lambda(stx)"
|
||||
"(syntax-case** #f #t stx() module-identifier=?"
|
||||
|
@ -1705,7 +1705,11 @@
|
|||
"(lambda(stx)"
|
||||
"(syntax-case** #f #t stx() module-identifier=?"
|
||||
"((_ loc pattern)"
|
||||
"(syntax(relocate loc(syntax pattern)))))))"
|
||||
"(if(if(symbol?(syntax-e #'pattern))"
|
||||
"(syntax-mapping?(syntax-local-value #'pattern(lambda() #f)))"
|
||||
" #f)"
|
||||
"(syntax(syntax pattern))"
|
||||
"(syntax(relocate loc(syntax pattern))))))))"
|
||||
"(provide syntax/loc syntax-case* syntax-case))"
|
||||
);
|
||||
EVAL_ONE_STR(
|
||||
|
|
|
@ -1980,7 +1980,7 @@
|
|||
|
||||
(module #%stxloc #%kernel
|
||||
(require #%stxcase #%define-et-al)
|
||||
(require-for-syntax #%kernel #%stxcase)
|
||||
(require-for-syntax #%kernel #%stxcase #%sc)
|
||||
|
||||
;; Regular syntax-case
|
||||
(-define-syntax syntax-case*
|
||||
|
@ -2013,7 +2013,11 @@
|
|||
(lambda (stx)
|
||||
(syntax-case** #f #t stx () module-identifier=?
|
||||
[(_ loc pattern)
|
||||
(syntax (relocate loc (syntax pattern)))])))
|
||||
(if (if (symbol? (syntax-e #'pattern))
|
||||
(syntax-mapping? (syntax-local-value #'pattern (lambda () #f)))
|
||||
#f)
|
||||
(syntax (syntax pattern))
|
||||
(syntax (relocate loc (syntax pattern))))])))
|
||||
|
||||
(provide syntax/loc syntax-case* syntax-case))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user