|
|
@ -2,11 +2,10 @@
|
|
|
|
(provide (all-defined-out))
|
|
|
|
(provide (all-defined-out))
|
|
|
|
|
|
|
|
|
|
|
|
(define #'(introduce-scope _color . _parents)
|
|
|
|
(define #'(introduce-scope _color . _parents)
|
|
|
|
(replace-context #'_color
|
|
|
|
|
|
|
|
(with-syntax ([color #'_color]
|
|
|
|
(with-syntax ([color #'_color]
|
|
|
|
[color-string (format "~a" (syntax->datum #'_color))]
|
|
|
|
[color-string (format "~a" (syntax->datum #'_color))]
|
|
|
|
[define:color (format-id #f "define:~a" #'_color)]
|
|
|
|
[color:define (format-id #f "~a:define" #'_color)]
|
|
|
|
[id:color (format-id #f "id:~a" #'_color)]
|
|
|
|
[color:id (format-id #f "~a:id" #'_color)]
|
|
|
|
[color-binding-id (format-id #f "~a-binding-id" #'_color)]
|
|
|
|
[color-binding-id (format-id #f "~a-binding-id" #'_color)]
|
|
|
|
[color-binding-form (format-id #f "~a-binding-form" #'_color)]
|
|
|
|
[color-binding-form (format-id #f "~a-binding-form" #'_color)]
|
|
|
|
[color-id (format-id #f "~a-id" #'_color)]
|
|
|
|
[color-id (format-id #f "~a-id" #'_color)]
|
|
|
@ -14,6 +13,7 @@
|
|
|
|
[parents (if (pair? (syntax->list #'_parents))
|
|
|
|
[parents (if (pair? (syntax->list #'_parents))
|
|
|
|
(car (syntax->list #'_parents))
|
|
|
|
(car (syntax->list #'_parents))
|
|
|
|
(syntax->list #'_parents))])
|
|
|
|
(syntax->list #'_parents))])
|
|
|
|
|
|
|
|
(replace-context #'_color
|
|
|
|
#'(begin
|
|
|
|
#'(begin
|
|
|
|
(module module-name br
|
|
|
|
(module module-name br
|
|
|
|
(require (for-syntax br/datum br/syntax))
|
|
|
|
(require (for-syntax br/datum br/syntax))
|
|
|
@ -22,13 +22,13 @@
|
|
|
|
(begin-for-syntax
|
|
|
|
(begin-for-syntax
|
|
|
|
(define-scope color parents))
|
|
|
|
(define-scope color parents))
|
|
|
|
|
|
|
|
|
|
|
|
(define #'(define:color _id-in _expr)
|
|
|
|
(define #'(color:define _id-in _expr)
|
|
|
|
(with-syntax* ([id:color (shared-syntax (format-datum "~a:~a" #'_id-in color-string))]
|
|
|
|
(with-syntax* ([color:id (shared-syntax (format-datum "~a:~a" color-string #'_id-in))]
|
|
|
|
[color-binding-id (color-binding-form #'_id-in)]
|
|
|
|
[color-binding-id (color-binding-form #'_id-in)]
|
|
|
|
[color-id (color #'color-binding-id)])
|
|
|
|
[color-id (color #'color-binding-id)])
|
|
|
|
#'(begin
|
|
|
|
#'(begin
|
|
|
|
(define color-binding-id _expr)
|
|
|
|
(define color-binding-id _expr)
|
|
|
|
(define-syntax id:color
|
|
|
|
(define-syntax color:id
|
|
|
|
(syntax-id-rules ()
|
|
|
|
(syntax-id-rules ()
|
|
|
|
[_ color-id]))))))
|
|
|
|
[_ color-id]))))))
|
|
|
|
(require 'module-name)))))
|
|
|
|
(require 'module-name)))))
|
|
|
|