Do not forward "private" pattern variables (in our case, clause names are the only ones)
This commit is contained in:
parent
99ca3ede0d
commit
faade53994
|
@ -7,7 +7,8 @@
|
||||||
eh-post-group
|
eh-post-group
|
||||||
eh-post-group!
|
eh-post-group!
|
||||||
clause-counter
|
clause-counter
|
||||||
get-new-clause!))
|
get-new-clause!
|
||||||
|
is-clause-id-sym?))
|
||||||
|
|
||||||
(define-syntax-rule (define-dynamic-accumulator-parameter parameter-name name!)
|
(define-syntax-rule (define-dynamic-accumulator-parameter parameter-name name!)
|
||||||
(begin
|
(begin
|
||||||
|
@ -22,6 +23,13 @@
|
||||||
(define-dynamic-accumulator-parameter eh-post-accumulate eh-post-accumulate!)
|
(define-dynamic-accumulator-parameter eh-post-accumulate eh-post-accumulate!)
|
||||||
(define-dynamic-accumulator-parameter eh-post-group eh-post-group!)
|
(define-dynamic-accumulator-parameter eh-post-group eh-post-group!)
|
||||||
|
|
||||||
|
;; This is a crude hack.
|
||||||
|
(define-for-syntax (is-clause-id-sym? id-sym)
|
||||||
|
(and (symbol? id-sym)
|
||||||
|
(regexp-match #px"^ -clause-.* $" (symbol->string id-sym))))
|
||||||
|
|
||||||
(define-for-syntax clause-counter (make-parameter #f))
|
(define-for-syntax clause-counter (make-parameter #f))
|
||||||
(define-for-syntax (get-new-clause!)
|
(define-for-syntax (get-new-clause!)
|
||||||
(string->symbol (format "clause~a" ((clause-counter)))))
|
(datum->syntax #'here
|
||||||
|
;; keep the spaces, they allow us to recognize clauses later.
|
||||||
|
(string->symbol (format " -clause-~a " ((clause-counter))))))
|
Loading…
Reference in New Issue
Block a user