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:
parent
b3cec49237
commit
ee084ad7ff
|
@ -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 ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user