adjust special scheme/class keywords to effectively declare themselves as expression forms (PR 10135): merge to 4.1.5

svn: r14137
This commit is contained in:
Matthew Flatt 2009-03-17 00:45:29 +00:00
parent b3cec49237
commit ee084ad7ff

View File

@ -148,10 +148,12 @@
(define-for-syntax not-in-a-class (define-for-syntax not-in-a-class
(lambda (stx) (lambda (stx)
(if (eq? (syntax-local-context) 'expression)
(raise-syntax-error (raise-syntax-error
#f #f
"use of a class keyword is not in a class" "use of a class keyword is not in a class"
stx))) stx)
(quasisyntax/loc stx (#%expression #,stx)))))
(define-syntax define/provide-context-keyword (define-syntax define/provide-context-keyword
(syntax-rules () (syntax-rules ()