From: Chris Hanson Date: Fri, 26 Jan 2018 04:07:40 +0000 (-0800) Subject: Use keyword syntactic environment to implement keywords. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~306 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=564b17635a9b3166e95b0aa3e053e50b9c6385d2;p=mit-scheme.git Use keyword syntactic environment to implement keywords. --- diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index a9341e35a..747769c2b 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -4465,6 +4465,7 @@ USA. ->syntactic-environment bind-variable! make-internal-syntactic-environment + make-keyword-syntactic-environment make-partial-syntactic-environment make-top-level-syntactic-environment null-syntactic-environment diff --git a/src/runtime/syntax-environment.scm b/src/runtime/syntax-environment.scm index a56ec2b0d..fff0b8075 100644 --- a/src/runtime/syntax-environment.scm +++ b/src/runtime/syntax-environment.scm @@ -96,7 +96,7 @@ USA. ;;; Keyword environments are used to make keywords that represent items. -(define (make-keyword-environment name item) +(define (make-keyword-syntactic-environment name item) (define (get-type) 'keyword) diff --git a/src/runtime/syntax.scm b/src/runtime/syntax.scm index fc66c1883..1d85a91f7 100644 --- a/src/runtime/syntax.scm +++ b/src/runtime/syntax.scm @@ -169,10 +169,7 @@ USA. (item->keyword (make-compiler-item compiler))) (define (item->keyword item) - (let ((environment - (make-internal-syntactic-environment null-syntactic-environment))) - (syntactic-environment/define environment 'KEYWORD item) - (close-syntax 'KEYWORD environment))) + (close-syntax 'keyword (make-keyword-syntactic-environment 'keyword item))) (define (capture-syntactic-environment expander) `(,(classifier->keyword